/* =========================================================
   Mailwren - AI Mail App — website
   Design source: design/ai-mail-new-ui.pen (frame TpD3Q)
   ========================================================= */

:root {
  /* one cool neutral family — no warm/cool mixing */
  --ink: #0c0c10;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --ink-4: #a1a1aa;

  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f4f4f5;

  --line: rgba(12, 12, 16, 0.09);
  --line-soft: rgba(12, 12, 16, 0.055);

  /* single accent, used sparingly */
  --accent: #4f46e5;
  --accent-ink: #3730a3;
  --accent-tint: #eef0ff;

  /* dark finale */
  --dark: #0c0c10;
  --dark-2: #16161c;
  --dark-line: rgba(255, 255, 255, 0.09);
  --dark-ink: #fafafa;
  --dark-ink-2: #a1a1aa;
  --dark-ink-3: #71717a;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  --gutter: clamp(20px, 5vw, 56px);
  --shell: 1240px;
  --section-y: clamp(72px, 9vw, 128px);

  --shadow-diffuse: 0 24px 48px -28px rgba(12, 12, 16, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* fixed grain — never inside a scrolling container */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
}

.skip-link:focus {
  left: 0;
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--hairline {
  border-top: 1px solid var(--line);
}

.section--surface {
  background: var(--surface);
}

/* ---------- typography ---------- */

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px, 4.6vw, 58px);
}

h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.028em;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.018em;
  font-weight: 600;
}

p {
  margin: 0;
  color: var(--ink-2);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

.eyebrow {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--accent);
}

.lead {
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 62ch;
}

.fine {
  font-size: 14px;
  color: var(--ink-3);
}

.mono {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--r-pill);
  padding: 14px 24px;
  font-size: 15.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.985);
}

.btn--solid {
  background: var(--ink);
  color: #fff;
}

.btn--solid:hover {
  background: #26262e;
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--outline:hover {
  border-color: rgba(12, 12, 16, 0.25);
  background: rgba(12, 12, 16, 0.02);
}

.btn--invert {
  background: #fff;
  color: var(--ink);
}

.btn--invert:hover {
  background: #e4e4e7;
}

.btn--sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

/* ---------- icons ---------- */

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  flex: none;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}

.site-header[data-scrolled="true"] {
  border-bottom-color: var(--line);
}

.site-header .shell {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 13px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
}

.site-nav a {
  position: relative;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(44px, 5.5vw, 88px) clamp(56px, 7vw, 104px);
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 60%, #ffffff 100%);
}

.hero .shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  max-width: 33rem;
}

.app-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-lockup img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.app-lockup .app-name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.app-lockup .app-kind {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.app-lockup .app-store {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--ink-3);
}

.hero .tagline {
  margin-top: -12px;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 550;
  color: var(--ink);
}

.hero .tagline .dim,
.hero h1 .dim {
  color: var(--ink-3);
}

.hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  border-top: 1px solid var(--line);
}

.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--ink-2);
}

.hero-points .icon {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  color: var(--accent);
  stroke-width: 2;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-3);
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-4);
}

/* hero visual */

.hero-art {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, #ffffff 0%, var(--surface-2) 55%, var(--accent-tint) 135%);
  box-shadow: var(--shadow-diffuse);
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 36px) 0;
  min-height: clamp(360px, 33vw, 460px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.shot {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(12, 12, 16, 0.1);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(12, 12, 16, 0.5);
  flex: none;
  width: 46%;
}

.shot picture,
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot--back {
  margin-bottom: -34px;
  transform: rotate(-2.5deg);
}

.shot--front {
  width: 58%;
  margin-left: -10%;
  margin-bottom: -58px;
  transform: rotate(2deg);
  z-index: 1;
}

.float-chip {
  position: absolute;
  top: clamp(20px, 3vw, 34px);
  left: clamp(20px, 3vw, 34px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px 9px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 24px -16px rgba(12, 12, 16, 0.45);
  backdrop-filter: blur(14px) saturate(180%);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.float-chip .live {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.float-chip .live::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2.4s var(--ease) infinite;
}

.float-chip .mono {
  color: var(--ink-3);
  font-size: 12px;
}

@keyframes ping {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ---------- split sections ---------- */

.split {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}

.split-head {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.split-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.spec {
  margin: 6px 0 0;
  width: 100%;
  border-top: 1px solid var(--line);
}

.spec > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.spec dt {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding-top: 2px;
}

.spec dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
}

.prose {
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 62ch;
}

.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.ledger li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 4px 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.ledger .num {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 4px;
}

.ledger h3 {
  grid-column: 2;
}

.ledger p {
  grid-column: 2;
  margin-top: 6px;
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---------- bento features ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(36px, 4vw, 56px);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(12, 12, 16, 0.16);
  box-shadow: var(--shadow-diffuse);
}

.tile p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 46ch;
}

.tile--lead {
  grid-column: span 4;
  min-height: 320px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
}

.tile--tall {
  grid-column: span 2;
  min-height: 320px;
}

.tile--half {
  grid-column: span 3;
}

.tile--third {
  grid-column: span 2;
}

.tile--wide {
  grid-column: span 4;
  flex-direction: row;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
}

.tile-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* mock: AI writer */

.mock {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 12px 28px -22px rgba(12, 12, 16, 0.5);
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
}

.mock-caret {
  display: inline-block;
  width: 1.5px;
  height: 14px;
  background: var(--accent);
  animation: caret 1.1s steps(2, start) infinite;
  vertical-align: -2px;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.mock-bar {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}

.mock-bar span {
  display: block;
  height: 100%;
  width: 45%;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0.85;
  animation: fill 5s var(--ease) infinite;
}

.mock-bar--short span {
  animation-delay: 0.45s;
}

@keyframes fill {
  0% {
    width: 12%;
  }
  55%,
  100% {
    width: 92%;
  }
}


/* mock: translate chips */

.chips {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.chip--on {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-tint);
  animation: chipCycle 6s var(--ease) infinite;
}

@keyframes chipCycle {
  0%,
  22% {
    transform: translateX(0);
  }
  33%,
  55% {
    transform: translateX(calc(100% + 8px));
  }
  66%,
  88% {
    transform: translateX(calc(200% + 16px));
  }
  100% {
    transform: translateX(0);
  }
}

/* mock: search */

.find {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.find-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
}

.find-bar .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-4);
}

.find-term {
  overflow: hidden;
  white-space: nowrap;
  animation: typeIn 6s steps(7, end) infinite;
}

@keyframes typeIn {
  0% {
    max-width: 0;
  }
  35%,
  100% {
    max-width: 7ch;
  }
}

.find-row {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-3);
  opacity: 0;
  animation: rise 6s var(--ease) infinite;
  animation-delay: 0.8s;
}

.find-row:last-child {
  animation-delay: 1.15s;
}

.find-row mark {
  background: rgba(79, 70, 229, 0.12);
  color: var(--accent-ink);
  border-radius: 3px;
  padding: 0 2px;
}

/* mock: accounts */

.accounts {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-2);
}

.acct em {
  font-style: normal;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: var(--r-pill);
  background: var(--accent-tint);
  color: var(--accent-ink);
  animation: pulseDot 3.2s var(--ease) infinite;
}

.acct:nth-child(2) em {
  animation-delay: 0.8s;
}

@keyframes pulseDot {
  0%,
  70%,
  100% {
    opacity: 1;
  }
  35% {
    opacity: 0.45;
  }
}

/* mock: summaries */

.stack {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
  opacity: 0;
  animation: rise 6s var(--ease) infinite;
}

.stack-line:nth-child(2) {
  animation-delay: 0.5s;
}

.stack-line:nth-child(3) {
  animation-delay: 1s;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  12%,
  72% {
    opacity: 1;
    transform: none;
  }
  88%,
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.tick {
  width: 15px;
  height: 15px;
  color: var(--accent);
  stroke-width: 2.2;
  flex: none;
}

/* theme strip */

.theme-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1 1 320px;
  min-width: 0;
}

.theme-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-card--dark {
  background: var(--dark-2);
  border-color: var(--dark-line);
}

.theme-card .bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.theme-card .bar--short {
  width: 58%;
}

.theme-card--dark .bar {
  background: rgba(255, 255, 255, 0.14);
}

.theme-card .label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ---------- permissions ledger ---------- */

.scopes {
  margin-top: clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.scope {
  padding: clamp(30px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.scope--wide {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}

.scope--split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.scope-meta {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.scope--split .scope-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.scope-body {
  display: grid;
  gap: 14px;
  max-width: 64ch;
}

.scope-body p {
  font-size: 15.5px;
  line-height: 1.62;
}

.scope-copy {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 62ch;
}

.scope-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.scope-head .num {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
}

.scope-head h3 {
  font-size: 21px;
}

.scope-code {
  display: inline-block;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-ink);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.badge {
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-3);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--restricted {
  border-color: rgba(154, 91, 18, 0.3);
  background: rgba(154, 91, 18, 0.06);
  color: #9a5b12;
}

.scope-copy p {
  font-size: 15.5px;
  line-height: 1.62;
}

.scope-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.scope-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--ink-4);
}

.scope-note {
  padding-left: 16px;
  border-left: 1px solid var(--accent);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* full app screenshots, shown at their native 9:16 ratio */

.scope--gallery .scope-copy {
  max-width: 76ch;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(28px, 3vw, 40px);
}

.device {
  margin: 0;
}

.device picture {
  display: block;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-diffuse);
}

.device img {
  display: block;
  width: 100%;
  height: auto;
}

.device figcaption {
  padding: 10px 4px 2px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* closing pair: never / revoke */

.closing {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(32px, 3.4vw, 48px);
  align-items: start;
}

.revoke h3 {
  font-size: 17px;
  margin-bottom: 12px;
}

.never {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.never p {
  font-size: 15.5px;
  line-height: 1.62;
  max-width: 76ch;
}

/* ---------- dark finale ---------- */

.dark {
  background: var(--dark);
  color: var(--dark-ink);
}

.dark h2,
.dark h3 {
  color: var(--dark-ink);
}

.dark p {
  color: var(--dark-ink-2);
}

.dark .eyebrow {
  color: var(--dark-ink-3);
}

.dark .eyebrow::before {
  background: #8b83f0;
}

.dark .lead {
  color: var(--dark-ink-2);
}

.dark .ledger,
.dark .ledger li {
  border-color: var(--dark-line);
}

.dark .ledger .num {
  color: var(--dark-ink-3);
}

.dark .glyph {
  background: transparent;
  border-color: var(--dark-line);
  color: var(--dark-ink);
}

.dark p a,
.dark .prose a {
  color: #b9b3f5;
}

.policy-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--dark-line);
  color: var(--dark-ink);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.4s var(--ease), gap 0.4s var(--ease);
}

.policy-link:hover {
  border-bottom-color: var(--dark-ink);
  gap: 14px;
}

.cta {
  border-top: 1px solid var(--dark-line);
  padding-block: clamp(64px, 8vw, 104px);
}

.cta .shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}

.cta h2 {
  max-width: 16ch;
}

.cta-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

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

.site-footer {
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
  padding-block: 36px;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-footer .brand {
  color: var(--dark-ink);
  margin-right: 0;
}

.site-footer .brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border-color: var(--dark-line);
}

.site-footer .brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.site-footer .brand-text b {
  font-size: 14.5px;
  font-weight: 600;
}

.site-footer .brand-text small {
  color: var(--dark-ink-3);
  font-size: 12.5px;
  font-weight: 400;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.4vw, 28px);
}

.footer-links a {
  color: var(--dark-ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.footer-links a:hover {
  color: var(--dark-ink);
}

/* ---------- scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .stack-line {
    opacity: 1;
  }
  .mock-bar span {
    width: 88%;
  }
}

/* =========================================================
   Document pages (policy, terms, deletion)
   ========================================================= */

.doc-header {
  border-bottom: 1px solid var(--line);
}

.doc {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(48px, 7vw, 84px) var(--gutter) clamp(72px, 9vw, 104px);
}

.doc .eyebrow {
  margin-bottom: 14px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 46px);
  margin-bottom: 16px;
}

.doc h2 {
  font-size: 21px;
  font-weight: 600;
  margin: 48px 0 12px;
}

.doc h3 {
  font-size: 17px;
  margin: 26px 0 8px;
}

.doc p,
.doc li {
  color: var(--ink-2);
  font-size: 16.5px;
}

.doc p {
  margin: 12px 0;
}

.doc .updated {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink-4);
}

.doc .intro {
  font-size: 18px;
  margin-top: 22px;
}

.doc ul,
.doc ol {
  margin: 12px 0;
  padding-left: 22px;
}

.doc li {
  margin: 7px 0;
}

.doc code {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent-ink);
  padding: 2px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.callout {
  margin: 26px 0;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-md);
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.email-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-weight: 550;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}

.email-btn:hover {
  transform: translateY(-1px);
  background: #26262e;
}

.email-btn:active {
  transform: scale(0.985);
}

.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: top;
}

.doc th {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.doc tr:last-child td {
  border-bottom: none;
}

.back-link {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover {
  color: var(--ink);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .tile--lead,
  .tile--tall,
  .tile--wide {
    grid-column: span 3;
  }

  .tile--wide {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 940px) {
  .shot-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope--split,
  .closing {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .shot-strip {
    gap: 14px;
  }

  .site-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -30px rgba(12, 12, 16, 0.6);
    padding: 4px var(--gutter) 14px;
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 15px 0;
    font-size: 16px;
    border-top: 1px solid var(--line-soft);
  }

  .site-nav a::after {
    display: none;
  }

  .site-header .shell {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-actions .btn {
    display: none;
  }

  .hero .shell,
  .split,
  .cta .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .split-head {
    position: static;
  }

  .hero-copy {
    max-width: 40rem;
  }

  .tile--lead,
  .tile--tall,
  .tile--third,
  .tile--half,
  .tile--wide {
    grid-column: span 6;
    min-height: 0;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .shot-row {
    grid-template-columns: minmax(0, 1fr);
    max-width: 320px;
  }

  .hero-art {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 20px 20px 0;
  }

  .float-chip {
    position: static;
    align-self: flex-start;
  }

  .shot--back {
    display: none;
  }

  .shot--front {
    width: min(78%, 280px);
    margin: 0 auto -40px;
    transform: none;
    align-self: center;
  }

  .scope {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .scope .num,
  .scope-title,
  .scope-body,
  .badge {
    grid-column: 1;
  }

  .badge {
    grid-row: auto;
    justify-self: start;
  }

  .ledger li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .ledger h3,
  .ledger p {
    grid-column: 1;
  }

  .never {
    flex-direction: column;
    gap: 14px;
  }

  .btn-row {
    width: 100%;
  }

  .btn-row .btn {
    flex: 1 1 100%;
    white-space: nowrap;
  }
}
