:root {
  --ink: #14142b;
  --ink-soft: #4a4a68;
  --paper: #fafaff;
  --paper-deep: #eef0ff;
  --accent: #4f46e5;
  --accent-deep: #372fbe;
  --line: #dadaf0;

  /* fixed, theme-independent surface used for the privacy band and code
     block — these are deliberately dark in both light and dark mode, so
     they read as a consistent "always dark" surface rather than flipping
     to a low-contrast light surface under prefers-color-scheme: dark. */
  --contrast-bg: #1e1b4b;
  --contrast-fg: #f5f5ff;
  --contrast-fg-soft: rgba(245, 245, 255, 0.72);
  --contrast-accent: #a599ff;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --measure: 62ch;
  --edge: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(4rem, 8vw, 7rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f2fb;
    --ink-soft: #b6b6d6;
    --paper: #0e0e22;
    --paper-deep: #16162f;
    --accent: #8b83ff;
    --accent-deep: #b3aeff;
    --line: #2b2b4c;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
  max-width: var(--measure);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- mark (finder-pattern glyph) ---------- */

.mark {
  width: 1em;
  height: 1em;
  flex: none;
}

/* ---------- nav ---------- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--edge);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
}

.wordmark .mark {
  font-size: 1.4rem;
  color: var(--accent);
}

.nav-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(3rem, 8vw, 6rem) var(--edge) var(--section-gap);
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: 72rem;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }
}

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.6rem;
  box-shadow: 0 24px 48px -24px rgba(20, 20, 43, 0.35);
  transform: rotate(-3deg);
  width: 100%;
  max-width: 320px;
}

.hero-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-card .qr-finder {
  opacity: 0;
  transform-origin: center;
  animation: finderIn 0.5s ease-out 0.15s forwards;
}

.hero-card .qr-dots {
  opacity: 0;
  animation: dotsIn 0.6s ease-out 0.55s forwards;
}

@keyframes finderIn {
  from {
    opacity: 0;
    transform: scale(0.6);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dotsIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {

  .hero-card .qr-finder,
  .hero-card .qr-dots {
    animation: none;
    opacity: 1;
  }
}

.hero-scan-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 700;
  max-width: 14ch;
}

.hero-copy p {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.btn-quiet {
  color: var(--ink);
  border-color: var(--line);
}

.btn-quiet:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- section shell ---------- */

section {
  padding: var(--section-gap) var(--edge);
}

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.section-head {
  max-width: 46ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-head p {
  margin-top: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- feature bento ---------- */

.bento-card.wide {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .bento-card.wide {
    grid-template-columns: 1fr;
  }
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .bento {
    grid-template-columns: 1fr;
  }
}

.bento-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bento-card.wide img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.bento-card h3 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bento-card h3 .mark {
  color: var(--accent);
}

.bento-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- privacy band ---------- */

.privacy {
  background: var(--contrast-bg);
  color: var(--contrast-fg);
}

.privacy .section-head p {
  color: var(--contrast-fg-soft);
}

.privacy .section-head h2 {
  color: var(--contrast-fg);
}

.privacy-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 760px) {
  .privacy-cols {
    grid-template-columns: 1fr;
  }
}

.privacy-col h3 {
  font-size: 1.05rem;
  color: var(--contrast-accent);
  margin-bottom: 0.6rem;
}

.privacy-col p {
  color: var(--contrast-fg-soft);
  font-size: 0.95rem;
}

/* ---------- showcase ---------- */

.showcase-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .showcase-row {
    grid-template-columns: 1fr;
  }
}

.showcase-item img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  background: var(--paper-deep);
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 1rem;
}

.showcase-item figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- get it ---------- */

.get-it {
  background: var(--paper-deep);
  border-radius: 24px;
  margin: 0 var(--edge);
  padding: clamp(2rem, 6vw, 3.5rem);
}

.get-it-inner {
  max-width: 42rem;
}

.code-block {
  margin-top: 1.5rem;
  background: var(--contrast-bg);
  color: var(--contrast-fg);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-block .comment {
  color: var(--contrast-fg-soft);
}

.get-it-note code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.get-it-note {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.get-it-actions {
  margin-top: 1.75rem;
}

/* ---------- footer ---------- */

footer {
  padding: 3rem var(--edge) 4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

footer a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

footer a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---------- privacy policy page ---------- */

.policy {
  max-width: calc(var(--measure) + 2 * var(--edge));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--edge) var(--section-gap);
}

.policy-head {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.policy-head h1 {
  font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
}

.policy-meta {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.policy-summary {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Override the landing page's full-bleed band padding on generic sections. */
.policy section {
  padding: 0;
}

.policy section + section {
  margin-top: 2.25rem;
}

.policy h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.policy p + p {
  margin-top: 0.75rem;
}

.policy ul {
  margin: 0;
  padding-left: 1.25rem;
  max-width: var(--measure);
}

.policy li + li {
  margin-top: 0.5rem;
}

.policy code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--accent-deep);
}

.policy a {
  color: var(--accent);
}
