/* Büchertisch — landing page. Loaded after styles.css (tokens, fonts, base). */

:root {
  /* Deep ink (the dark scheme's primarySubtle) — closes the accent gradient */
  --primary-deep: #1f2d5c;
  /* Tinte as text on the white CTA inside the gradient card — scheme independent */
  --primary-on-white: #3a5bc7;
  --section-gap: clamp(5rem, 11vw, 9.5rem);
}

/* ---------------------------------------------------------------- layout */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.section {
  padding-block: var(--section-gap);
}
.section-alt {
  background: var(--band);
}
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 {
  font-size: clamp(2.25rem, 1.2rem + 3.4vw, 4rem);
  line-height: 1;
  margin-bottom: 1rem;
}
.section-head .lead {
  margin-bottom: 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-text);
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 36rem;
}
.accent {
  font-style: italic;
  color: var(--primary-text);
}

/* -------------------------------------------------------------- buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.125rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--t-fast),
    border-color var(--t-fast),
    color var(--t-fast),
    translate var(--t-fast);
}
.button svg {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  transition: translate var(--t-base) var(--ease-out);
}
.button:hover svg {
  translate: 3px 0;
}
.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.button-primary:hover {
  background: var(--primary-pressed);
}
.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.button-secondary:hover {
  background: var(--el);
  border-color: var(--sel);
}
.button-inverse {
  background: var(--on-primary);
  color: var(--primary-on-white);
}
.button-inverse:hover {
  background: #edf2fe; /* primarySubtle (light) — stays legible on the gradient */
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--t-slow),
    border-color var(--t-slow),
    backdrop-filter var(--t-slow);
}
.site-header.is-scrolled {
  background: var(--bg);
  border-color: var(--border);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
  }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}
.site-header .brand {
  position: relative;
  z-index: 61;
}
.brand-mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: var(--on-primary);
}
.brand-mark svg {
  width: 1.2rem;
  height: 1.2rem;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-full);
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    color var(--t-fast),
    background-color var(--t-fast);
}
.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
  background: var(--el);
}
.site-nav .nav-cta {
  margin-left: 0.5rem;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}
.site-nav .nav-cta:hover {
  background: var(--primary-pressed);
  color: var(--on-primary);
}
.menu-toggle {
  display: none;
  position: relative;
  z-index: 61;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.1rem;
  height: 1.5px;
  background: var(--text);
  translate: -50% -50%;
  transition:
    translate var(--t-base) var(--ease-out),
    rotate var(--t-base) var(--ease-out);
}
.menu-toggle span:first-child {
  translate: -50% calc(-50% - 3px);
}
.menu-toggle span:last-child {
  translate: -50% calc(-50% + 3px);
}
.menu-open .menu-toggle span:first-child {
  translate: -50% -50%;
  rotate: 45deg;
}
.menu-open .menu-toggle span:last-child {
  translate: -50% -50%;
  rotate: -45deg;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem);
  overflow: clip;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(60rem, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--primary-subtle) 0%, transparent 62%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}
.hero-head h1 {
  font-size: clamp(2.75rem, 1.2rem + 7vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: wrap;
  max-width: 20ch;
}
.hero-head h1 em {
  font-style: italic;
  color: var(--primary-text);
}
.rotate {
  display: inline-block;
  transition:
    opacity 0.38s var(--ease-out),
    translate 0.38s var(--ease-out);
}
.rotate.is-out {
  opacity: 0;
  translate: 0 0.25em;
}
.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.hero-copy .lead {
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0;
  margin: 2rem 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}
.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.trust-row svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary-text);
}

/* Hero entrance (CSS only) */
.js .hero-head > *,
.js .hero-copy > * {
  animation: rise 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 1rem;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* The Büchertisch: a shelf of CSS books + two cards from the app */
.hero-visual {
  position: relative;
  min-height: 26rem;
  --shelf-h: clamp(13rem, 20vw, 17rem);
}
.shelf {
  position: absolute;
  left: 56%;
  bottom: 2.5rem;
  translate: -50% 0;
  width: min(100%, 28rem);
}
.books {
  list-style: none;
  padding: 0 1.25rem;
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: var(--shelf-h);
}
.book {
  position: relative;
  flex: none;
  width: var(--w);
  height: calc(var(--shelf-h) * var(--h));
  background: var(--c);
  color: var(--ink, #fff);
  border-radius: 3px 5px 5px 3px;
  box-shadow:
    inset 3px 0 0 rgba(255, 255, 255, 0.16),
    inset -2px 0 0 rgba(0, 0, 0, 0.16),
    0 10px 20px -12px rgba(0, 0, 0, 0.45);
  transform-origin: bottom left;
  transition: translate var(--t-base) var(--ease-out);
}
.book:hover {
  translate: 0 -0.5rem;
}
.book.lean:hover {
  translate: 0.9rem -0.5rem;
}
.book.pulled:hover {
  translate: 0 -1.25rem;
}
.book .spine {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  writing-mode: vertical-rl;
  rotate: 180deg;
  white-space: nowrap;
  overflow: hidden;
}
.book .t {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.book .a {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}
.book.lean {
  rotate: -7deg;
  translate: 0.9rem 0;
  z-index: 1;
}
.book.pulled {
  translate: 0 -0.8rem;
  box-shadow:
    inset 3px 0 0 rgba(255, 255, 255, 0.16),
    inset -2px 0 0 rgba(0, 0, 0, 0.16),
    0 18px 28px -14px rgba(0, 0, 0, 0.5);
}
.book-tag {
  position: absolute;
  bottom: calc(100% + 0.9rem);
  left: 50%;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-full);
  background: var(--warning-subtle);
  color: var(--warning-text);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}
.book-tag::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 0.6rem;
  background: var(--border);
}
.shelf-board {
  height: 0.7rem;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--sel), var(--border));
  box-shadow: 0 18px 28px -14px rgba(33, 32, 28, 0.45);
}
.shelf-board::after {
  content: '';
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: -0.35rem;
  height: 0.35rem;
  border-radius: 0 0 4px 4px;
  background: var(--border);
  filter: brightness(0.94);
}
.js .book {
  animation: book-in 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 250ms);
}
@keyframes book-in {
  from {
    opacity: 0;
    translate: 0 1.25rem;
  }
}
/* the leaning/pulled books keep their resting translate at the end of the entrance */
.js .book.lean {
  animation-name: book-in-lean;
}
.js .book.pulled {
  animation-name: book-in-pulled;
}
@keyframes book-in-lean {
  from {
    opacity: 0;
    translate: 0.9rem 1.25rem;
  }
}
@keyframes book-in-pulled {
  from {
    opacity: 0;
    translate: 0 1rem;
  }
}

.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: max-content;
  max-width: 16.5rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text);
  translate: calc(var(--px, 0) * var(--depth, 8px)) calc(var(--py, 0) * var(--depth, 8px));
}
.float-card strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.float-card p {
  color: var(--text-2);
}
.float-card .card-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--r-full);
}
.float-card .card-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}
.card-icon.ok {
  background: var(--success-subtle);
  color: var(--success-text);
}
.card-icon.avatar {
  background: var(--primary-subtle);
  color: var(--primary-text);
  font-size: 0.7rem;
  font-weight: 700;
}
.card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.card-actions span {
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--el);
  color: var(--text);
}
.card-actions span:first-child {
  background: var(--primary);
  color: var(--on-primary);
}
.card-1 {
  top: 8%;
  left: 0;
  --depth: 12px;
}
.card-2 {
  right: 0;
  bottom: -2.5rem;
  --depth: -9px;
}
.js .float-card {
  animation:
    rise 0.9s var(--ease-out) both,
    float 7s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * 120ms + 700ms), calc(var(--i, 0) * -2s);
}
@keyframes float {
  to {
    transform: translateY(-6px);
  }
}

/* ----------------------------------------------------------------- verse */
.verse {
  border-block: 1px solid var(--border);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  text-align: center;
}
.verse blockquote {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
}
.verse blockquote::before {
  content: '„';
  position: absolute;
  left: 50%;
  top: -0.45em;
  translate: -50% 0;
  font-family: var(--serif);
  font-size: clamp(6rem, 12vw, 11rem);
  line-height: 1;
  color: var(--primary-subtle);
  z-index: -1;
  pointer-events: none;
}
.verse p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.verse cite {
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* ---------------------------------------------------------- feature bento */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  transition:
    translate var(--t-base) var(--ease-out),
    border-color var(--t-base);
}
.tile:hover {
  translate: 0 -3px;
  border-color: var(--sel);
}
.tile-7 {
  grid-column: span 7;
}
.tile-5 {
  grid-column: span 5;
}
.tile-4 {
  grid-column: span 4;
}
.tile-12 {
  grid-column: span 12;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}
.tile h3 {
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.9rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.tile p {
  color: var(--text-2);
  font-size: 0.975rem;
}
.tile-text {
  max-width: 34rem;
}
.tile-icon {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--primary-subtle);
  color: var(--primary-text);
  margin-bottom: 1rem;
}
.tile-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.viz {
  order: -1;
  border-radius: var(--r-md);
  background: var(--el);
  padding: 1.25rem;
  overflow: hidden;
}
.tile-12 .viz {
  order: 0;
  flex: none;
  min-width: 16rem;
}

/* scanner */
.viz-scan {
  position: relative;
  display: grid;
  gap: 0.9rem;
}
.scan-frame {
  position: relative;
  height: 6.5rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  overflow: hidden;
}
.scan-frame::before {
  /* barcode */
  content: '';
  position: absolute;
  inset: 1.4rem 2.25rem;
  background: repeating-linear-gradient(
    90deg,
    var(--text) 0 2px,
    transparent 2px 5px,
    var(--text) 5px 6px,
    transparent 6px 8px,
    var(--text) 8px 11px,
    transparent 11px 13px,
    var(--text) 13px 14px,
    transparent 14px 18px
  );
  opacity: 0.85;
}
.scan-frame .corner {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--primary);
}
.scan-frame .corner:nth-child(1) {
  top: 0.6rem;
  left: 0.6rem;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}
.scan-frame .corner:nth-child(2) {
  top: 0.6rem;
  right: 0.6rem;
  border-width: 2px 2px 0 0;
  border-radius: 0 4px 0 0;
}
.scan-frame .corner:nth-child(3) {
  bottom: 0.6rem;
  left: 0.6rem;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 4px;
}
.scan-frame .corner:nth-child(4) {
  bottom: 0.6rem;
  right: 0.6rem;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}
.scan-frame .laser {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 1rem;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  animation: laser 2.4s ease-in-out infinite alternate;
}
@keyframes laser {
  to {
    top: calc(100% - 1rem);
  }
}
.scan-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
}
.scan-result code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-2);
  white-space: nowrap;
}
.scan-result strong {
  font-weight: 600;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip svg {
  width: 0.8rem;
  height: 0.8rem;
}
.chip-ok {
  background: var(--success-subtle);
  color: var(--success-text);
}
.chip-warn {
  background: var(--warning-subtle);
  color: var(--warning-text);
}
.chip-ink {
  background: var(--primary-subtle);
  color: var(--primary-text);
}
.chip-neutral {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* loan */
.viz-loan {
  display: grid;
  gap: 0.9rem;
}
.loan-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.cover {
  flex: none;
  width: 2rem;
  height: 2.8rem;
  border-radius: 3px 5px 5px 3px;
  background: var(--c);
  box-shadow:
    inset 2px 0 0 rgba(255, 255, 255, 0.18),
    0 4px 10px -6px rgba(0, 0, 0, 0.45);
}
.loan-row .meta {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.3;
}
.loan-row .meta strong {
  display: block;
  font-weight: 600;
}
.loan-row .meta span {
  color: var(--text-2);
  font-size: 0.72rem;
}
.stepper {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
}
.stepper li {
  height: 4px;
  border-radius: 2px;
  background: var(--sel);
}
.stepper li.done {
  background: var(--primary);
}
.stepper-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

/* groups */
.viz-group {
  display: grid;
  gap: 0.9rem;
}
.avatars {
  display: flex;
}
.avatars span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--r-full);
  border: 2px solid var(--el);
  background: var(--primary-subtle);
  color: var(--primary-text);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: -0.5rem;
}
.avatars span:first-child {
  margin-left: 0;
}
.avatars span.more {
  background: var(--surface);
  color: var(--text-2);
}
.invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px dashed var(--border);
  font-size: 0.75rem;
  color: var(--text-2);
}
.invite code {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* discover */
.viz-review {
  display: grid;
  gap: 0.6rem;
}
.stars {
  display: flex;
  gap: 0.15rem;
  color: var(--rating);
}
.stars svg {
  width: 1.1rem;
  height: 1.1rem;
}
.review-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.3;
}
.review-by {
  font-size: 0.75rem;
  color: var(--text-2);
}

/* reading goal */
.viz-goal {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ring {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
}
.ring circle {
  fill: none;
  stroke-width: 6;
}
.ring .track {
  stroke: var(--sel);
}
.ring .value {
  stroke: var(--primary);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.goal-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
}
.goal-text span {
  font-size: 0.75rem;
  color: var(--text-2);
}

/* data */
.viz-data {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ------------------------------------------------------------- lifecycle */
.lifecycle {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.lifecycle-visual {
  position: sticky;
  top: 6.5rem;
  display: flex;
  justify-content: center;
}
.phone {
  width: min(100%, 19rem);
  padding: 0.6rem;
  border-radius: 2.6rem;
  background: var(--text);
  box-shadow: var(--shadow-overlay);
}
.phone-screen {
  position: relative;
  min-height: 36rem;
  padding: 2.4rem 1.1rem 1.25rem;
  border-radius: 2.1rem;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.phone-screen::before {
  /* dynamic island */
  content: '';
  position: absolute;
  top: 0.65rem;
  left: 50%;
  translate: -50% 0;
  width: 5.5rem;
  height: 1.35rem;
  border-radius: var(--r-full);
  background: var(--text);
}
.screen-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.screen-title svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary-text);
}
.screen-book {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
.screen-book .cover {
  width: 3rem;
  height: 4.4rem;
}
.screen-book h4 {
  font-size: 1.35rem;
  line-height: 1.05;
}
.screen-book span {
  font-size: 0.75rem;
  color: var(--text-2);
}
.parties {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
}
.parties .avatars span {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  border-color: var(--bg);
  font-size: 0.65rem;
}
.parties svg {
  width: 1rem;
  height: 1rem;
  color: var(--text-2);
}
.status-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
.status-card .chip {
  justify-self: start;
}
.status-line {
  font-size: 0.8rem;
  color: var(--text-2);
}
.status-line strong {
  color: var(--text);
  font-weight: 600;
}
.phone [data-for] {
  display: none;
}
.history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: var(--text-2);
}
.history-title {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 0.15rem;
}
.history li {
  align-items: center;
  gap: 0.55rem;
}
.history .dot {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
}
.history .dot.ok {
  background: var(--success);
}
.phone .notice {
  display: none;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--r-md);
  background: var(--primary-subtle);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}
.phone .notice svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--primary-text);
  margin-top: 0.1rem;
}
.phone .notice.ok {
  background: var(--success-subtle);
}
.phone .notice.ok svg {
  color: var(--success-text);
}
.phone-cta {
  display: none;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.85rem;
  font-weight: 600;
}
.phone-cta.secondary {
  background: var(--el);
  color: var(--text);
}
/* step-driven visibility (flex items keep their display value via [data-for]) */
.phone[data-step='1'] [data-for~='1'],
.phone[data-step='2'] [data-for~='2'],
.phone[data-step='3'] [data-for~='3'],
.phone[data-step='4'] [data-for~='4'],
.phone[data-step='5'] [data-for~='5'] {
  display: flex;
}
.phone[data-step='1'] .chip[data-for~='1'],
.phone[data-step='2'] .chip[data-for~='2'],
.phone[data-step='3'] .chip[data-for~='3'],
.phone[data-step='4'] .chip[data-for~='4'],
.phone[data-step='5'] .chip[data-for~='5'] {
  display: inline-flex;
}
.phone[data-step='1'] .status-line[data-for~='1'],
.phone[data-step='2'] .status-line[data-for~='2'],
.phone[data-step='3'] .status-line[data-for~='3'],
.phone[data-step='4'] .status-line[data-for~='4'],
.phone[data-step='5'] .status-line[data-for~='5'] {
  display: block;
}
.phone[data-step='1'] .stepper li:nth-child(-n + 1),
.phone[data-step='2'] .stepper li:nth-child(-n + 2),
.phone[data-step='3'] .stepper li:nth-child(-n + 3),
.phone[data-step='4'] .stepper li:nth-child(-n + 4),
.phone[data-step='5'] .stepper li:nth-child(-n + 5) {
  background: var(--primary);
}
.phone .stepper li {
  transition: background-color var(--t-slow);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
  cursor: default;
  transition: opacity var(--t-slow);
}
.step:last-child {
  border-bottom: 1px solid var(--border);
}
.step-num {
  font-family: var(--serif);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--primary-text);
  letter-spacing: -0.02em;
  transition: color var(--t-slow);
}
.step h3 {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}
.step p {
  color: var(--text-2);
  max-width: 30rem;
}
.step .chip {
  margin-top: 0.85rem;
}
@media (min-width: 60rem) {
  .steps {
    /* keeps the sticky phone in view while the last step reaches the centre */
    padding-bottom: clamp(4rem, 14vh, 9rem);
  }
  .step {
    min-height: 15rem;
  }
  .step .chip {
    display: none;
  }
  .steps.is-tracking .step:not(.is-active) {
    opacity: 0.45;
  }
  .steps.is-tracking .step:not(.is-active) .step-num {
    color: var(--text-2);
  }
}
.callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 46rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--band-card);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.callout svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-text);
  margin-top: 0.2rem;
}
.callout strong {
  color: var(--text);
  font-weight: 600;
}

/* -------------------------------------------------------------- audience */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.audience {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}
.audience-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 0.9;
  color: var(--primary-text);
  margin-bottom: 1.5rem;
}
.audience h3 {
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 1.9rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.audience p {
  color: var(--text-2);
  font-size: 0.975rem;
}
.audience-example {
  margin-top: auto;
  padding-top: 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text);
}
.audience-example::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  margin-bottom: 1rem;
  background: var(--primary-text);
}

/* marquee (categories) */
.marquee-wrap {
  margin-top: clamp(3rem, 6vw, 5rem);
}
.marquee-label {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  animation: marquee 55s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.95rem;
  white-space: nowrap;
}
.cat::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--primary-subtle);
  border: 1px solid var(--primary-text);
}
@keyframes marquee {
  to {
    transform: translateX(calc(-50% - 0.3rem));
  }
}

/* --------------------------------------------------------------- privacy */
.ink {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5.5rem);
  border-radius: var(--r-sheet);
  background: var(--ink-bg);
  color: var(--ink-text);
  border: 1px solid var(--ink-border);
}
.ink::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 99, 221, 0.35), transparent 65%);
  pointer-events: none;
}
.ink::after {
  /* paper grain */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ink > * {
  position: relative;
  z-index: 1;
}
.ink-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
}
.ink .eyebrow {
  color: var(--ink-primary-text);
}
.ink h2 {
  font-size: clamp(2.25rem, 1.2rem + 3.4vw, 4rem);
  line-height: 1;
  margin-bottom: 1rem;
}
.ink .lead {
  color: var(--ink-text-2);
  margin-bottom: 1.75rem;
}
.ink .button-secondary {
  background: transparent;
  color: var(--ink-text);
  border-color: var(--ink-border);
}
.ink .button-secondary:hover {
  background: var(--ink-surface);
  border-color: var(--ink-text-2);
}
.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
}
.principles li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--ink-border);
  color: var(--ink-text-2);
  font-size: 0.95rem;
}
.principles svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink-primary-text);
  margin-top: 0.15rem;
}
.principles strong {
  display: block;
  color: var(--ink-text);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

/* ------------------------------------------------------------------ beta */
.section-beta {
  padding-top: 0;
}
.beta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: var(--r-sheet);
  background: linear-gradient(
    140deg,
    var(--primary) 0%,
    var(--primary-pressed) 45%,
    var(--primary-deep) 100%
  );
  color: var(--on-primary);
  text-align: center;
  box-shadow: var(--shadow-overlay);
}
.beta-card::before,
.beta-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.beta-card::before {
  width: 42rem;
  height: 42rem;
  left: -14rem;
  bottom: -30rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 62%);
}
.beta-card::after {
  width: 30rem;
  height: 30rem;
  right: -10rem;
  top: -16rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 62%);
}
.beta-card > * {
  position: relative;
  z-index: 1;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--on-primary);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.beta-card h2 {
  font-size: clamp(2.5rem, 1.4rem + 4vw, 4.75rem);
  line-height: 0.98;
  margin: 1.5rem auto 1.25rem;
  max-width: 18ch;
}
.beta-card h2 em {
  font-style: italic;
  opacity: 0.9;
}
.beta-card .lead {
  color: rgba(255, 255, 255, 0.82);
  margin: 0 auto 2rem;
  max-width: 40rem;
}
.beta-card .lead a {
  color: inherit;
  font-weight: 600;
}
.beta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.beta-platforms {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}
.beta-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.beta-platforms svg {
  width: 1rem;
  height: 1rem;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer-brand p {
  margin-top: 0.75rem;
  color: var(--text-2);
  max-width: 22rem;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.footer-col a {
  color: var(--text);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--primary-text);
  text-decoration: underline;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem;
}
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-2);
  text-decoration: none;
}
.footer-bottom a:hover {
  color: var(--text);
}
.footer-bottom svg {
  width: 0.9rem;
  height: 0.9rem;
}
.footer-wordmark {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 17.2vw, 15.5rem);
  line-height: 0.78;
  letter-spacing: -0.035em;
  text-align: center;
  color: var(--el);
  white-space: nowrap;
  user-select: none;
  margin-top: 0.5rem;
  margin-bottom: -0.1em;
}
@media (prefers-color-scheme: dark) {
  .footer-wordmark {
    color: var(--surface);
  }
}

/* ---------------------------------------------------------------- reveal */
.js [data-reveal] {
  opacity: 0;
  translate: 0 1.25rem;
  transition:
    opacity 0.8s var(--ease-out),
    translate 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 68rem) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-7,
  .tile-5,
  .tile-4 {
    grid-column: span 1;
  }
  .tile-12 {
    grid-column: span 2;
  }
  .audience-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 60rem) {
  .menu-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
  }
  .menu-open .site-nav {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 60;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    padding: 6rem var(--gutter) 3rem;
    background: var(--bg);
  }
  .menu-open .site-nav a {
    font-family: var(--serif);
    font-size: clamp(2.25rem, 9vw, 3.25rem);
    line-height: 1.1;
    padding: 0.35rem 0;
    border-radius: 0;
    color: var(--text);
    background: none;
  }
  .menu-open .site-nav .nav-cta {
    margin: 1.5rem 0 0;
    padding: 0.75rem 1.5rem;
    font-family: var(--sans);
    font-size: 1.05rem;
    border-radius: var(--r-full);
    background: var(--primary);
    color: var(--on-primary);
  }
  .menu-open {
    overflow: hidden;
  }
  .menu-open .site-header,
  .menu-open .site-header.is-scrolled {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hero-body {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-visual {
    min-height: 24rem;
    --shelf-h: clamp(11rem, 36vw, 15rem);
  }
  .shelf {
    left: 50%;
    bottom: 1.5rem;
  }
  .card-1 {
    top: 0;
    left: 0;
  }
  .card-2 {
    right: 0;
    bottom: 4%;
  }

  .lifecycle {
    grid-template-columns: 1fr;
  }
  .lifecycle-visual {
    position: static;
  }
  .step {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
  .step-num {
    font-size: 2rem;
  }

  .ink-grid {
    grid-template-columns: 1fr;
  }
  .principles {
    grid-template-columns: 1fr;
  }
  .tile-12 {
    flex-direction: column;
    align-items: stretch;
  }
  .tile-12 .viz {
    order: -1;
    min-width: 0;
  }
}

@media (max-width: 40rem) {
  .header-inner {
    min-height: 4rem;
  }
  .brand-name {
    font-size: 1.35rem;
  }
  .hero-head h1 {
    max-width: none;
  }
  .button {
    padding-inline: 1rem;
  }
  .hero-actions .button,
  .ink .button {
    width: 100%;
  }
  .hero-visual {
    min-height: 22rem;
  }
  .float-card {
    max-width: 14.5rem;
    font-size: 0.76rem;
  }
  .card-2 {
    bottom: 12%;
  }
  .book .t {
    font-size: 0.85rem;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .tile-12 {
    grid-column: span 1;
  }
  .phone-screen {
    min-height: 33rem;
  }
  .ink {
    border-radius: var(--r-lg);
  }
  .beta-card {
    border-radius: var(--r-lg);
  }
  .beta-actions .button {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: auto;
  }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    translate: none;
  }
  .float-card {
    translate: none;
  }
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee-track {
    width: auto;
    flex-wrap: wrap;
  }
  .marquee-group[aria-hidden='true'] {
    display: none;
  }
  .scan-frame .laser {
    top: 50%;
  }
  .steps.is-tracking .step:not(.is-active) {
    opacity: 1;
  }
}
