/* OnlyTTY — marketing site. Dependency-free, dark-first, mobile-first.
   A real design system: layered surfaces lit from above (elevation by light, not
   shadow), low-opacity-white hairlines, one cyan signal + a pink spark, a fluid
   type scale, and calm depth (aurora + a faint engineering grid + a little grain).
   Playful brand, precise craft. Every motion means a real state change, and all of
   it stands down under prefers-reduced-motion. */

:root {
  /* surfaces — deep → raised; on dark, a *lighter* fill reads as "higher" */
  --bg: #07080c;
  --bg-alt: #090b11;
  --surface: #0e1119;
  --surface-2: #141823;
  --surface-3: #1b2030;

  /* hairlines — low-opacity white is more premium than a flat gray rule */
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .11);
  --line-3: rgba(255, 255, 255, .17);

  /* text — dimmed white, never pure #fff (full contrast on black "buzzes") */
  --fg: #f0f3f9;
  --fg-2: #a8b3c5;
  --dim: #6c7689;

  /* brand — cyan signal, pink spark */
  --accent: #22d3ee;
  --accent-2: #7de9f7;
  --accent-soft: rgba(34, 211, 238, .12);
  --accent-line: rgba(34, 211, 238, .34);
  --accent-glow: rgba(34, 211, 238, .55);
  --ink: #04141b;
  --pink: #fd8284;
  --pink-soft: rgba(253, 130, 132, .13);
  --ok: #34d399;

  /* radii */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* depth — lit from above + soft cast; glows are brand-tinted */
  --ring: inset 0 1px 0 rgba(255, 255, 255, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --shadow-lg: 0 40px 90px -20px rgba(0, 0, 0, .7);

  /* motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --wrap: 1140px;
  --narrow: 760px;
}

* { box-sizing: border-box; }
::selection { background: rgba(34, 211, 238, .26); color: #fff; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
html { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #29314a; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-2);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Calm depth behind everything: two brand auroras + a masked engineering grid +
   a whisper of grain (kills gradient banding, reads as "crafted"). All fixed. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(820px 520px at 18% -6%, rgba(34, 211, 238, .10), transparent 60%),
    radial-gradient(720px 480px at 92% 2%, rgba(253, 130, 132, .06), transparent 58%),
    radial-gradient(1100px 700px at 50% 112%, rgba(34, 211, 238, .05), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 38px 38px;
  background-position: -1px -1px;
  /* fade the grid out everywhere but a soft band near the top, so it never shouts */
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000, transparent 70%);
  mask-image: radial-gradient(circle at 50% 18%, #000, transparent 70%);
  mix-blend-mode: overlay;
}

a { color: var(--accent-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: #b7f2fb; }

code, pre, .mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

/* ── type scale ── */
h1, h2, h3 { color: var(--fg); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.7rem); font-weight: 780; line-height: 1.08; letter-spacing: -.025em; }
h3 { font-size: 1.075rem; font-weight: 660; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }

/* monospace eyebrow — a terminal prompt label; the brand's signature detail */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .74rem; font-weight: 600; letter-spacing: .04em;
  text-transform: lowercase; color: var(--accent-2);
}
.eyebrow::before { content: "›"; color: var(--accent); font-weight: 700; opacity: .85; }
.eyebrow.center { display: flex; justify-content: center; }

.lede { font-size: clamp(1.06rem, 1.5vw, 1.28rem); color: var(--fg-2); line-height: 1.6; max-width: 46ch; }
.center .lede, .lede.center { margin-left: auto; margin-right: auto; }
.muted { color: var(--dim); font-size: .92rem; }
.hl {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* status / live badge */
.badge {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.4rem;
  padding: .42rem .8rem .42rem .62rem; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line-2);
  font-size: .8rem; font-weight: 550; color: var(--fg-2);
}
.badge .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); animation: pulse 2.4s var(--ease-out) infinite; }

/* skip link */
.skip { position: absolute; left: .75rem; top: .5rem; transform: translateY(-250%);
  background: var(--accent); color: var(--ink); padding: .5rem .85rem; border-radius: var(--r-sm);
  z-index: 100; font-weight: 600; }
.skip:focus { transform: translateY(0); }

/* ── nav ── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(7, 8, 12, .72);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line); }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent); opacity: .5; }
.nav-inner { display: flex; align-items: center; gap: 1.25rem; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--fg);
  font-weight: 800; font-size: 1.16rem; letter-spacing: -.02em; }
.brand:hover { color: var(--fg); }
.brand b { background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { width: 26px; height: 32px; flex: 0 0 auto; object-fit: contain; transform: translateY(-7px); }
.nav-links { display: flex; gap: 1.7rem; margin-left: auto; }
.nav-links a { position: relative; color: var(--fg-2); font-size: .92rem; font-weight: 500; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1.5px;
  background: var(--accent); border-radius: 2px; transition: right .22s var(--ease); }
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { right: 0; }
.nav-cta { display: inline-flex; align-items: center; gap: .35rem; }

/* ── buttons ── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .98rem; padding: .82rem 1.4rem; border-radius: var(--r-full);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; overflow: hidden;
  transition: transform .12s var(--ease), box-shadow .25s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { padding: .52rem 1.1rem; font-size: .9rem; }
/* Touch devices: the small nav CTAs and the copy buttons must meet the 44px
   tap-target floor (the snippet/nav are the primary mobile conversion path). */
@media (pointer: coarse) {
  .btn-sm,
  .copy {
    min-height: 44px;
  }
}
.btn-primary { color: var(--ink); background: linear-gradient(180deg, #46e0f5, #15bdd8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 22px rgba(34, 211, 238, .28); }
/* keep the dark ink text on hover: these buttons are <a>, and the global a:hover
   color (0,1,1) would otherwise beat .btn-primary (0,1,0) → light text on the light
   cyan fill, unreadable. .btn-primary:hover (0,2,0) wins it back. */
.btn-primary:hover { color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 12px 38px rgba(34, 211, 238, .45); }
/* a soft sheen that wipes across on hover */
.btn-primary::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35), transparent 70%);
  transform: translateX(-120%); transition: transform .6s var(--ease); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: rgba(255, 255, 255, .035); color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: var(--accent-line); color: var(--fg); }

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.85rem 0; }
.cta-row.center { justify-content: center; }

/* ── sections ── */
.section { padding: clamp(3.75rem, 8vw, 7rem) 0; }
.section.alt { background: linear-gradient(180deg, var(--bg-alt), transparent 60%); border-top: 1px solid var(--line); }
.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; }
.section-head .lede { margin-top: .7rem; }
.section > .wrap > .eyebrow.center + h2 { margin-bottom: .5rem; }
.section .lede.center { margin-top: .35rem; }

/* shared card surface — flat: a lighter fill + a hairline. On dark, elevation reads
   from a lighter fill + border, not shadows (which look cheap here); hover brightens. */
.feature, .step, .card, .chip, .start-card, .bento .b {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .16s var(--ease), border-color .2s ease, background .2s ease;
}
.feature:hover, .card:hover, .chip:hover, .bento .b:hover {
  transform: translateY(-2px); border-color: var(--line-3); background: var(--surface-2);
}

/* ── hero ── */
.hero { position: relative; overflow-x: clip; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }

/* Editorial split: copy left, the real onlytty terminal (product proof) right.
   On phones it collapses to one column (see the responsive block), terminal below. */
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(1.5rem, 4vw, 3.25rem); align-items: center; }
/* Both columns must shrink below their content's intrinsic width, or a long line
   (the install snippet) floors the 1fr track and the hero overflows on mobile. */
.hero-copy, .hero-demo { min-width: 0; }
/* The hero headline is calmer than the global display h1 — at full size it crowds the
   split column and reads as overloaded. */
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.5rem); letter-spacing: -.03em; }
.hero-copy h1 { margin-bottom: .65rem; }
.hero-copy .lede { max-width: 42ch; }
.hero-demo { display: block; }
.hero-snippet { max-width: 27rem; }

/* breadcrumbs (tool/legal pages) */
.crumbs { font-size: .82rem; color: var(--dim); margin-bottom: 1.1rem; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--fg-2); }
.tool-hero { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

/* ── snippet ── */
.snippet { display: flex; align-items: center; gap: .5rem; background: #090c14;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: .3rem .3rem .3rem .9rem;
  max-width: 100%; overflow: hidden; margin: 1.2rem 0; }
.snippet code { font-size: .9rem; color: var(--fg); overflow-x: auto; white-space: nowrap;
  flex: 1 1 auto; min-width: 0; padding: .45rem 0; scrollbar-width: none; }
.snippet code::-webkit-scrollbar { display: none; }
.snippet .prompt { color: var(--accent); user-select: none; margin-right: .4rem; }
.copy { flex: 0 0 auto; background: rgba(255, 255, 255, .04); color: var(--fg-2);
  border: 1px solid var(--line-2); border-radius: 8px; padding: .42rem .8rem; font-size: .8rem;
  font-weight: 500; cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.copy:hover { border-color: var(--accent-line); color: var(--fg); background: var(--accent-soft); }

/* ── hero stage: terminal window + live phone ── */
.stage { position: relative; }
.term { position: relative; z-index: 1; width: 100%; background: #0a0d15; border: 1px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg), var(--ring); }
.term-bar { display: flex; align-items: center; gap: .45rem; padding: .72rem .95rem;
  background: linear-gradient(180deg, #161b29, #0d1018); border-bottom: 1px solid var(--line); }
.tdot { width: .72rem; height: .72rem; border-radius: 50%; }
.tdot.r { background: #ff5f56; } .tdot.y { background: #ffbd2e; } .tdot.g { background: #27c93f; }
.term-title { margin-left: .6rem; font-size: .76rem; color: var(--dim); font-family: ui-monospace, monospace; }
.term-live { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .66rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.term-live i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent);
  animation: pulse 2s var(--ease-out) infinite; }
.term-body { margin: 0; padding: 1.2rem 1.3rem 1.4rem; font-size: .76rem; line-height: 1.65;
  color: var(--fg-2); white-space: pre-wrap; word-break: break-word; }
.term-body .ln { opacity: 1; animation: ln-in .5s ease var(--d, 0ms) backwards; }
.c-p { color: var(--accent); } .c-dim { color: var(--dim); } .c-ok { color: var(--ok); }
.c-b { color: var(--fg); font-weight: 700; }
.c-link { color: var(--accent-2); } .c-frag { color: var(--pink); }
.qr-art { display: inline-block; white-space: pre; line-height: 1; font-size: 7px;
  letter-spacing: 0; color: var(--fg); margin: .4rem 0; }
.cursor { display: inline-block; width: .55em; background: var(--accent); color: transparent; animation: blink 1.1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes ln-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.phone { position: absolute; right: -6px; bottom: -26px; z-index: 2; width: 172px;
  aspect-ratio: 9 / 19.5; display: flex;
  padding: 7px; border-radius: 30px; background: linear-gradient(160deg, #262b38, #0b0d13);
  border: 1px solid var(--line-2); box-shadow: 0 30px 60px rgba(0, 0, 0, .62), var(--ring);
  animation: phone-in .6s var(--ease) .55s backwards; }
.phone-scr { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 23px;
  overflow: hidden; background: #0a0d15; border: 1px solid var(--line); }
.phone-bar { display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .65rem; background: #11151f; border-bottom: 1px solid var(--line); }
.phone-stat { display: inline-flex; align-items: center; gap: .35rem; font-size: .54rem;
  font-weight: 600; color: var(--dim); line-height: 1; }
.phone-stat i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--ok);
  animation: pulse 2s var(--ease-out) infinite; flex: 0 0 auto; }
.phone-term { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: .65rem .6rem .7rem; }
.phone-term pre { margin: 0; font-size: .58rem; line-height: 1.7; font-family: ui-monospace, monospace;
  color: var(--fg-2); white-space: pre-wrap; }
.phone-keys { display: flex; gap: .25rem; padding: .4rem .45rem .5rem;
  background: #11151f; border-top: 1px solid var(--line); }
.phone-keys span { flex: 1 1 0; text-align: center; font-size: .5rem; padding: .3rem 0;
  border-radius: 5px; background: rgba(255, 255, 255, .05); color: var(--fg-2);
  font-family: ui-monospace, monospace; border: 1px solid var(--line); }

/* ── trust strip ── */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .012); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .55rem 1.5rem;
  padding: 1.15rem 1.5rem; }
.trust-inner span { display: inline-flex; align-items: center; gap: .45rem; font-size: .83rem; color: var(--fg-2);
  font-weight: 550; letter-spacing: .01em; }
.trust-inner span svg { width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }

/* ── marquee: "works with any terminal" ── */
.marquee { position: relative; overflow: hidden; padding: 1.5rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 2.25rem; align-items: center; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: .55rem; flex: 0 0 auto;
  color: var(--fg-2); font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.marquee-item::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .55; }
.marquee-lead { color: var(--dim); font-family: ui-monospace, monospace; font-size: .8rem; }

/* ── steps (connected) ── */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 2.75rem; }
/* the connecting beam behind the row, desktop only */
.steps::before { content: ""; position: absolute; top: 2.7rem; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), var(--accent-line), transparent); z-index: 0; }
.step { position: relative; z-index: 1; padding: 1.7rem; }
.step .num { display: inline-flex; align-items: center; justify-content: center;
  width: 2.3rem; height: 2.3rem; border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--accent-soft), transparent), var(--surface-2);
  color: var(--accent-2); font-family: ui-monospace, monospace; font-weight: 800; font-size: .95rem;
  margin-bottom: 1.1rem; border: 1px solid var(--accent-line); }
.step h3 { margin-bottom: .4rem; }
.step p { margin: 0; color: var(--fg-2); font-size: .95rem; }
.step code, .step em { color: var(--accent-2); font-style: normal; }
.step code { background: var(--accent-soft); padding: .08em .4em; border-radius: 5px; font-size: .9em; }

/* ── features as a bento grid ── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(0, auto); gap: 1.1rem; margin-top: 2.75rem; }
.bento .b { display: flex; flex-direction: column; padding: 1.7rem; overflow: hidden; }
.bento .b-md { grid-column: span 3; }
.bento .b-sm { grid-column: span 2; }
.bento .b h3 { margin-bottom: .4rem; }
.bento .b p { margin: 0; color: var(--fg-2); font-size: .95rem; }
.feature-icon { display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: var(--r-sm); margin-bottom: 1.1rem;
  background: linear-gradient(180deg, var(--accent-soft), transparent), var(--surface-2);
  border: 1px solid var(--accent-line); color: var(--accent); flex: 0 0 auto; }
.feature-icon svg { width: 22px; height: 22px; }

.feature { padding: 1.7rem; }
.feature h3 { margin-bottom: .4rem; }
.feature p { margin: 0; color: var(--fg-2); font-size: .95rem; }

/* ── use cases (2-col cards) ── */
.uses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; margin-top: 2.75rem; }
.uses .feature p { font-size: .96rem; }

/* ── ciphertext proof: same stream, readable on both ends, opaque in the middle ── */
.cipher-sec { background: rgba(255, 255, 255, .012); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cipher-flow { display: flex; align-items: stretch; gap: .85rem; margin-top: clamp(2rem, 4vw, 2.75rem); }
.cipher-panel { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .7rem;
  margin: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 1.1rem 1.2rem; }
.cipher-panel figcaption { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem;
  color: var(--fg-2); font-weight: 600; }
.cp-dot { width: .5rem; height: .5rem; border-radius: 50%; flex: 0 0 auto; background: var(--dim); }
.cp-dot.ok { background: var(--ok); } .cp-dot.warn { background: var(--accent); }
.cp-body { margin: 0; flex: 1 1 auto; font-family: ui-monospace, monospace; font-size: .72rem;
  line-height: 1.7; color: var(--fg-2); white-space: pre-wrap; word-break: break-word; }
.cp-body .cipher { color: var(--accent); opacity: .42; word-break: break-all; }
.cp-note { margin: 0; font-size: .72rem; color: var(--dim); font-weight: 500; }
.cipher-arrow { flex: 0 0 auto; align-self: center; color: var(--accent); font-size: 1.4rem; opacity: .65; }
@media (max-width: 760px) {
  .cipher-flow { flex-direction: column; }
  .cipher-arrow { transform: rotate(90deg); }
}

/* ── chips (home tool grid / related) ── */
.chips { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: flex-start; margin-top: 2.75rem; }
.chip { display: inline-flex; flex-direction: column; gap: .2rem; padding: .78rem 1.05rem; min-width: 0; }
.chip b { color: var(--fg); font-size: .92rem; font-weight: 620; }
.chip code { color: var(--dim); font-size: .76rem; font-family: ui-monospace, monospace; }
.chip:hover code { color: var(--accent-2); }
.more { margin-top: 2.4rem; }

/* ── cards (tools index) ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.35rem; }
.card-name { color: var(--fg); font-weight: 660; }
.card-what { color: var(--dim); font-size: .89rem; flex: 1 1 auto; line-height: 1.5; }
.card-cmd { color: var(--accent-2); font-size: .78rem; background: var(--accent-soft); font-family: ui-monospace, monospace;
  padding: .35rem .55rem; border-radius: 7px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.card-cmd::-webkit-scrollbar { display: none; }
.tools-index h2 { scroll-margin-top: 84px; }

/* ── tool page: trust points ── */
.tool-points { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-direction: column; gap: .85rem; }
.tool-points li { display: flex; gap: .65rem; align-items: flex-start; color: var(--fg-2); }
.tool-points li svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; margin-top: .2rem; }

/* ── faq ── */
.faq { max-width: var(--narrow); margin: 2.5rem auto 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; padding: 1.25rem .25rem; font-weight: 600; font-size: 1.02rem;
  color: var(--fg); display: flex; justify-content: space-between; gap: 1rem; align-items: center; transition: color .15s ease; }
.faq-item summary:hover { color: var(--accent-2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400;
  flex: 0 0 auto; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 .25rem 1.35rem; color: var(--fg-2); line-height: 1.6; }
.faq-a code { color: var(--accent-2); background: var(--accent-soft); padding: .08em .4em; border-radius: 5px; font-size: .9em; }

/* ── start band (the standout final CTA) ── */
.start { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.start::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(900px 420px at 50% 120%, rgba(34, 211, 238, .12), transparent 65%); }
.start > .wrap { position: relative; z-index: 1; }
.start-card { max-width: 660px; margin: clamp(2rem, 4vw, 2.75rem) 0 1.5rem; padding: clamp(1.5rem, 3vw, 2.4rem); }
.examples { display: flex; flex-direction: column; gap: 1.1rem; text-align: left; }
.example { min-width: 0; }
.example-label { display: block; font-size: .76rem; font-weight: 600; color: var(--accent-2);
  font-family: ui-monospace, monospace; letter-spacing: .02em; margin-bottom: .4rem; }
.example .snippet { margin: 0; }

/* ── 404 mascot ── */
.brand-mascot { display: block; width: 112px; height: auto; margin: 0 auto 1.4rem;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, .55)); }

/* ── legal ── */
.legal h1 { margin-bottom: 1.1rem; }
.legal h2 { margin: 2rem 0 .6rem; font-size: 1.2rem; }
.legal p, .legal li { color: var(--fg-2); }
.legal ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.legal code { color: var(--accent-2); }

/* ── footer ── */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 3.75rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand { margin-bottom: .9rem; }
.footer-brand p { color: var(--dim); font-size: .9rem; max-width: 32ch; line-height: 1.6; }
.footer nav { display: flex; flex-direction: column; gap: .6rem; }
.footer nav h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim);
  font-weight: 660; margin: 0 0 .4rem; }
.footer nav a { color: var(--fg-2); font-size: .9rem; }
.footer nav a:hover { color: var(--accent-2); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem;
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); color: var(--dim); font-size: .83rem; }

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

/* ── reveal on scroll — pure CSS via scroll-driven animations. Degrades to
   "always visible" where unsupported, on phones, or under reduced-motion: no JS,
   no FOUC, never hides content. ── */
@media (prefers-reduced-motion: no-preference) and (min-width: 641px) {
  @supports (animation-timeline: view()) {
    [data-reveal] { animation: reveal both linear; animation-timeline: view(); animation-range: entry 0% entry 42%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  }
}

/* ── responsive ── */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero-copy .lede, .hero-copy h1, .hero-snippet { max-width: none; }
  .steps, .uses { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .b-md { grid-column: span 2; }
  .bento .b-sm { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body {
    background:
      radial-gradient(680px 360px at 14% -8%, rgba(34, 211, 238, .10), transparent 62%),
      radial-gradient(520px 300px at 92% 0%, rgba(253, 130, 132, .055), transparent 60%),
      var(--bg);
  }
  body::before,
  body::after { display: none; }
  .nav {
    background: rgba(7, 8, 12, .94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hero { overflow-x: hidden; }
  /* On phones, the phone viewer sits OVER the terminal (terminal in background):
     the terminal is in flow and sets the height (it's now the taller element); the
     smaller phone is centered absolutely on top. */
  .hero .term { position: relative; z-index: 1; }
  .hero .phone { position: absolute; right: 0; bottom: -14px; top: auto; left: auto;
    transform: none; z-index: 2; width: min(169px, 48vw); }
  .hero .badge .dot,
  .hero .term-body .ln,
  .hero .term-live i,
  .hero .phone,
  .hero .phone-stat i {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero .btn-primary::after { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento .b-md, .bento .b-sm { grid-column: auto; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .lede { max-width: none; }
  .term-body { font-size: .64rem; }
  .cta-row .btn { flex: 1 1 auto; }
}
@media (max-width: 400px) {
  /* Brand + GitHub + Get started overflow very narrow phones. Make GitHub
     icon-only (the link's aria-label keeps its name) and tighten the gap so they fit. */
  .nav-gh span { display: none; }
  .nav-inner { gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee-track { transform: none; }
}
