/* ARNscope site. One dark graphite theme, mirrored from the app's index.css tokens. */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* App tokens (index.css) */
  --shell-canvas: #0b0c0e;
  --bg-primary: #0f1012;
  --bg-secondary: #141518;
  --bg-tertiary: #1d1f24;
  --bg-quaternary: #25282e;
  --bg-overlay: #17191d;
  --border-primary: #24262b;
  --border-secondary: #33363d;
  --text-primary: #e6e8eb;
  --text-secondary: #a4aab4;
  --text-tertiary: #868d98;
  --icon-color: #8a919c;
  --status-success: #3fbf86;
  --syntax-string: #9fd3a4;

  /* Brand */
  --brand-vermilion: #f2301d;
  --brand-fill: #d22815;          /* vermilion deepened so white button text clears 4.5:1 */
  --brand-fill-hover: #bd2312;
  --brand-text: #ff7a66;          /* vermilion for text on graphite */
  --brand-wash: rgba(242, 48, 29, 0.10);

  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --section-content-gap: 56px;    /* a section head to the content under it */
  --max: 1240px;
  --radius: 8px;
  --radius-lg: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-float: 0 24px 48px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  background: var(--shell-canvas);
}

body {
  margin: 0;
  background: var(--shell-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection { background: rgba(242, 48, 29, 0.35); color: #fff; }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 600; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbars belong to the palette too */
html { scrollbar-color: var(--bg-quaternary) var(--shell-canvas); }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: 6px;
  background: var(--bg-overlay); border: 1px solid var(--border-secondary);
  font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* ---------- Title bar (site header, modeled on the app's 38px bar) ---------- */

.titlebar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 14, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-primary);
}
.titlebar .wrap {
  display: flex; align-items: center; gap: 24px;
  height: 56px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  text-decoration: none; color: var(--text-primary);
}
.brand .mark { width: 22px; height: 22px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 6px 10px; border-radius: 6px;
  font-size: 14px; color: var(--text-secondary); text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.nav a:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.titlebar .btn { margin-left: auto; }
.header-link {
  margin-left: auto; padding: 6px 10px; border-radius: 6px;
  font-size: 14px; color: var(--text-secondary); text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.header-link:hover, .header-link[aria-current="page"] { color: var(--text-primary); background: var(--bg-tertiary); }
.titlebar .header-link + .btn { margin-left: -16px; }

/* Docs sits in the home nav after a hairline; below 860px the section anchors go and Docs stays. */
.nav .nav-docs { position: relative; margin-left: 9px; }
.nav .nav-docs::before { content: ""; position: absolute; left: -7px; top: 8px; bottom: 8px; width: 1px; background: var(--border-secondary); }

@media (max-width: 860px) {
  .nav { margin-left: auto; }
  .nav a:not(.nav-docs) { display: none; }
  .nav .nav-docs { margin-left: 0; }
  .nav .nav-docs::before { display: none; }
  .titlebar .nav + .btn { margin-left: -16px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 8px; border: 1px solid transparent;
  font: 600 15px/1 var(--font-sans);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 10px; }
.btn-primary {
  background: var(--brand-fill); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: var(--brand-fill-hover); }
.btn-secondary { background: var(--bg-tertiary); border-color: var(--border-secondary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-quaternary); }
.btn[aria-disabled="true"], .btn:disabled {
  background: var(--bg-secondary); border-color: var(--border-primary);
  color: var(--text-tertiary); cursor: not-allowed; box-shadow: none; transform: none;
}

/* ---------- Hero ---------- */

.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 0; isolation: isolate; overflow-x: clip; }

.radar {
  position: absolute; z-index: -1;
  top: -340px; right: -260px;
  width: 980px; height: 980px;
  pointer-events: none;
  opacity: 0.9;
}
.radar circle { fill: none; stroke: var(--border-primary); stroke-width: 1; }
.radar .sweep {
  transform-origin: 490px 490px;
  animation: sweep 2.8s var(--ease-out) 0.2s both;
}
@keyframes sweep {
  from { transform: rotate(-200deg); opacity: 0; }
  20% { opacity: 1; }
  to { transform: rotate(0deg); opacity: 1; }
}

.hero h1 {
  max-width: 16ch;
  font-size: clamp(42px, 6.6vw, 84px);
  line-height: 1;
  letter-spacing: -0.028em;
  font-weight: 600;
  font-stretch: 88%;
}
.hero h1 .quiet { color: var(--text-tertiary); }
.hero .lede {
  max-width: 60ch;
  margin-top: 28px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--text-secondary);
}
.hero .lede strong { color: var(--text-primary); font-weight: 500; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.cta-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 16px;
  font-size: 14px; color: var(--text-tertiary);
}
.cta-meta li { display: inline-flex; align-items: center; gap: 7px; }
.cta-meta .icon { width: 14px; height: 14px; color: var(--icon-color); }
[data-release-note] { user-select: text; }

.hero-shot { margin-top: clamp(48px, 7vw, 88px); position: relative; }

/* ---------- Video frames ---------- */

.shot { position: relative; }
.shot-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-secondary);
  background: var(--bg-primary);
  box-shadow: var(--shadow-float);
}
.shot-frame video, .shot-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.shot figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 12px;
  font-size: 13.5px; color: var(--text-tertiary);
}
.shot figcaption span:last-child { text-align: right; flex: none; }
@media (max-width: 600px) {
  .shot figcaption { flex-direction: column; gap: 2px; }
  .shot figcaption span:last-child { text-align: left; }
  .cta-row .btn-lg { flex: 1 1 auto; }
}

/* The narrated tour: native controls, captions drawn by captions.js (.caption-frame wraps the video). */
.tour-shot { margin-top: var(--section-content-gap); }
/* A highlight under its section head (the Investigate still on the landing page). */
.highlight-shot { margin-top: var(--section-content-gap); }
.highlight-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-text); text-decoration: none; }
.highlight-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.shot-frame > .caption-frame { position: absolute; inset: 0; }

/* A YouTube video behind a click: our poster and play button until pressed, then the player (site.js). */
.yt-facade { position: absolute; inset: 0; display: block; color: var(--text-primary); }
.yt-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px 14px 22px;
  border-radius: 999px;
  background: var(--brand-fill);
  color: #fff; font-size: 17px; font-weight: 600;
  box-shadow: var(--shadow-float);
  transition: background-color 0.15s, transform 0.15s;
}
.yt-play .icon { width: 18px; height: 18px; fill: currentColor; }
.yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play { background: var(--brand-fill-hover); transform: translate(-50%, -50%) scale(1.04); }
.yt-facade:focus-visible { outline: 2px solid var(--brand-text); outline-offset: -2px; border-radius: var(--radius-lg); }
.shot-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.play-toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-secondary);
  background: rgba(23, 25, 29, 0.82);
  color: var(--text-primary);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s, background-color 0.15s;
}
.play-toggle:hover, .play-toggle:focus-visible { opacity: 1; background: var(--bg-overlay); }
.play-toggle .icon { width: 15px; height: 15px; }
.play-toggle .i-play { display: none; }
.play-toggle[aria-pressed="false"] .i-play { display: block; }
.play-toggle[aria-pressed="false"] .i-pause { display: none; }
.no-js .play-toggle { display: none; }

/* ---------- Sections ---------- */

.section { padding: clamp(80px, 11vw, 140px) 0 0; }
.section-head { display: grid; gap: 20px; max-width: 760px; }
.section-head h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-stretch: 90%;
}
.section-head p { font-size: 18px; color: var(--text-secondary); max-width: 62ch; }

/* ---------- Services: the rail, unfolded ---------- */

.rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: var(--section-content-gap);
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
}
.rail-group { padding: 20px 20px 28px; border-left: 1px solid var(--border-primary); }
.rail-group:first-child { border-left: 0; padding-left: 0; }
.rail-group h3 {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 18px;
}
.rail-group li + li { margin-top: 20px; }
.svc { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.svc-icon {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--bg-secondary); border: 1px solid var(--border-primary);
  color: var(--icon-color);
}
.svc-icon .icon { width: 15px; height: 15px; }
.svc strong { display: block; font-size: 15.5px; font-weight: 600; line-height: 30px; }
.svc p { grid-column: 2; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
/* Labs: a full-width row under the groups, its pages side by side. */
.rail-group.rail-labs { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--border-primary); }
.rail-labs h3 { display: flex; align-items: center; gap: 10px; }
.rail-labs h3 .chip { height: 18px; font-size: 10.5px; text-transform: none; letter-spacing: 0.02em; }
.rail-labs ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rail-labs li + li { margin-top: 0; }

@media (max-width: 1100px) {
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail-group:nth-child(4) { border-left: 0; padding-left: 0; }
  .rail-group:nth-child(n + 4) { border-top: 1px solid var(--border-primary); }
}
@media (max-width: 720px) {
  .rail { grid-template-columns: minmax(0, 1fr); }
  .rail-group { border-left: 0; padding: 22px 0 26px; }
  .rail-group + .rail-group { border-top: 1px solid var(--border-primary); }
  .rail-labs ul { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Feature deep dives ---------- */

.features { display: grid; gap: clamp(88px, 11vw, 150px); margin-top: var(--section-content-gap); }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 4.2fr) minmax(0, 7.8fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
}
.feature-copy { position: sticky; top: 104px; padding-top: 8px; }
.feature-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.feature-tag .icon { width: 15px; height: 15px; color: var(--brand-text); }
.feature h3 {
  margin-top: 14px;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-stretch: 92%;
}
.feature-copy > p { margin-top: 16px; color: var(--text-secondary); font-size: 16.5px; }
.points { margin-top: 24px; border-top: 1px solid var(--border-primary); }
.points li {
  display: grid; grid-template-columns: 16px 1fr; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-primary);
  font-size: 15px; line-height: 1.45; color: var(--text-primary);
}
.points .icon { width: 14px; height: 14px; margin-top: 3px; color: var(--status-success); }

@media (max-width: 960px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-copy { position: static; max-width: 640px; }
}

/* ---------- Privacy ---------- */

.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  margin-top: var(--section-content-gap);
}

.flow {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  padding: clamp(20px, 3vw, 32px);
}
.flow-mac {
  border: 1px solid var(--border-secondary);
  border-radius: 10px;
  background: var(--bg-secondary);
  padding: 16px;
}
.flow-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
}
.flow-title .icon { width: 14px; height: 14px; }
.flow-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.flow-items li {
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border-primary);
  background: var(--bg-primary);
  font-size: 14px; line-height: 1.35;
}
.flow-items li span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-tertiary); }
.flow-items li.app { border-color: rgba(242, 48, 29, 0.45); background: var(--brand-wash); }
.flow-items li.app strong { display: inline-flex; align-items: center; gap: 7px; }
.flow-items .mark { width: 15px; height: 15px; }

.flow-links { display: grid; gap: 10px; margin-top: 10px; }
.flow-link {
  display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px;
}
.wire { position: relative; height: 44px; }
.wire::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  border-left: 1px solid var(--text-tertiary);
}
.wire.dashed::before { border-left-style: dashed; border-color: var(--border-secondary); }
.wire.cut::before { border-color: var(--border-primary); }
.wire.cut::after {
  content: ""; position: absolute; left: calc(50% - 7px); top: calc(50% - 1px);
  width: 14px; height: 2px; background: var(--brand-vermilion);
  transform: rotate(-35deg);
}
.flow-end {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-secondary);
  background: var(--bg-secondary);
  font-size: 14px;
}
.flow-end span { display: block; font-size: 12.5px; color: var(--text-tertiary); }
.flow-end.none { border-style: dashed; border-color: var(--border-primary); background: transparent; color: var(--text-tertiary); }
.flow-end.none s { text-decoration-color: var(--brand-vermilion); text-decoration-thickness: 1.5px; }

.claims li { padding: 18px 0; border-bottom: 1px solid var(--border-primary); }
.claims li:first-child { padding-top: 0; }
.claims h3 { font-size: 17px; letter-spacing: -0.01em; }
.claims p { margin-top: 6px; font-size: 15.5px; color: var(--text-secondary); }
.why-list { max-width: 760px; margin-top: var(--section-content-gap); }

@media (max-width: 960px) {
  .privacy-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .flow-items { grid-template-columns: minmax(0, 1fr); }
  .flow-link { grid-template-columns: 36px 1fr; }
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--section-content-gap);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  overflow: hidden;
}
.plan { display: flex; flex-direction: column; padding: 28px; }
.plan + .plan { border-left: 1px solid var(--border-primary); }
.plan.featured { background: var(--bg-secondary); box-shadow: inset 0 2px 0 var(--brand-vermilion); }
.plan h3 { font-size: 17px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; border: 1px solid var(--border-secondary);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-secondary);
}
.chip.brand { border-color: rgba(242, 48, 29, 0.5); color: var(--brand-text); }
.price { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.price strong {
  font-size: 52px; font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums; font-stretch: 90%;
}
.price span { color: var(--text-tertiary); font-size: 15px; }
.price s { color: var(--text-tertiary); font-size: 22px; text-decoration-thickness: 2px; }
.plan > p { margin-top: 12px; font-size: 15px; color: var(--text-secondary); min-height: 3em; }
.plan ul { margin: 22px 0 28px; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; font-size: 14.5px; }
.plan li .icon { width: 14px; height: 14px; margin-top: 4px; color: var(--status-success); }
.plan .btn { margin-top: auto; width: 100%; }
.pricing-note { margin-top: 18px; font-size: 14px; color: var(--text-tertiary); }
.pricing-note a { color: var(--text-secondary); }

@media (max-width: 900px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--border-primary); }
  .plan > p { min-height: 0; }
}

/* ---------- FAQ ---------- */

.faq { margin-top: 48px; max-width: 860px; border-top: 1px solid var(--border-primary); }
.faq details { border-bottom: 1px solid var(--border-primary); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0;
  font-size: 17.5px; font-weight: 500;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 16px; height: 16px; color: var(--icon-color); transition: transform 0.25s var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq summary:hover { color: #fff; }
.faq .answer { padding: 0 0 22px; max-width: 68ch; color: var(--text-secondary); font-size: 16px; user-select: text; }
.faq .answer p + p { margin-top: 10px; }
/* Wide screens: heading on the left (sticky), questions fill the right instead of leaving it empty. */
@media (min-width: 900px) {
  .faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; align-items: start; }
  .faq-layout .section-head { position: sticky; top: 96px; }
  .faq-layout .faq { margin-top: 0; max-width: none; }
}
.faq code { color: var(--syntax-string); }

/* ---------- Closing call and footer ---------- */

.closing {
  margin-top: clamp(96px, 12vw, 160px);
  padding: clamp(48px, 7vw, 88px) 0;
  border-top: 1px solid var(--border-primary);
  position: relative; overflow: hidden; isolation: isolate;
}
.closing h2 {
  font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -0.035em; font-stretch: 88%;
  max-width: 14ch;
}
.closing .cta-row { margin-top: 32px; }

.footer { border-top: 1px solid var(--border-primary); padding: 28px 0 40px; font-size: 14px; color: var(--text-tertiary); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer .brand { font-size: 15px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--text-primary); text-decoration: underline; }
.footer .legal { margin-left: auto; }
.footer .fine { flex-basis: 100%; font-size: 13px; }
@media (max-width: 720px) { .footer .legal { margin-left: 0; } }

/* ---------- 404 ---------- */

.lost { min-height: calc(100vh - 160px); display: grid; align-content: center; padding: 80px 0; position: relative; isolation: isolate; overflow: hidden; }
.lost h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1; letter-spacing: -0.035em; font-stretch: 88%; max-width: 14ch; }
.lost p { margin-top: 20px; color: var(--text-secondary); font-size: 18px; max-width: 52ch; }
.lost .mono { color: var(--text-tertiary); user-select: text; }
.lost .radar { top: 50%; right: -320px; margin-top: -490px; }
/* A grid item sizes to its longest line unless allowed to shrink. */
.lost > .wrap { min-width: 0; }

/* ---------- Motion preferences ---------- */

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

/* `hidden` must win over component display rules (.btn is inline-flex). */
[hidden] { display: none !important; }

/* ---------- Download ---------- */

/* A primary button with a small second line under its label. */
.btn-stack { height: auto; min-height: 56px; padding: 10px 22px; }
.btn-stack span { display: flex; white-space: normal; flex-direction: column; align-items: flex-start; gap: 3px; }
.btn-stack small { font-size: 12px; font-weight: 500; opacity: 0.8; }
.download .steps { margin-top: 36px; padding-left: 1.3em; color: var(--text-secondary); font-size: 16px; line-height: 1.7; max-width: 56ch; }
.download .note { display: flex; gap: 10px; align-items: baseline; margin-top: 28px; font-size: 15px; }
.download .note .icon { position: relative; top: 2px; color: var(--text-tertiary); }
.download .note a, .download .steps a { color: var(--text-primary); }
/* The beta caveat: a quiet line under the intro, here and in the hero. */
.beta-note, .lost .beta-note { margin-top: 10px; font-size: 14px; color: var(--text-tertiary); }

/* ---------- Legal and contact pages (terms, privacy, refund, contact) ---------- */

.legal-page { padding: 72px 0 96px; user-select: text; }
.legal-page .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.legal-page h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.03em; }
.legal-page .updated { margin-top: 12px; color: var(--text-tertiary); font-size: 14px; }
.legal-page h2 { margin-top: 44px; font-size: 22px; letter-spacing: -0.01em; }
.legal-page h3 { margin-top: 24px; font-size: 17px; }
.legal-page p, .legal-page li { color: var(--text-secondary); font-size: 16px; line-height: 1.7; }
.legal-page p { margin-top: 14px; }
.legal-page ul, .legal-page ol { margin-top: 12px; padding-left: 1.3em; }
.legal-page li + li { margin-top: 6px; }
.legal-page a { color: var(--text-primary); }
.legal-page strong { color: var(--text-primary); font-weight: 600; }
.legal-page address { margin-top: 14px; font-style: normal; color: var(--text-primary); line-height: 1.7; user-select: text; }
.legal-page .contact-grid { display: grid; gap: 16px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.legal-page .contact-grid > div { border: 1px solid var(--border-primary); border-radius: 10px; padding: 20px; }
.legal-page .contact-grid h2 { margin-top: 0; font-size: 15px; color: var(--text-tertiary); font-weight: 500; }
.legal-page .contact-grid p { margin-top: 8px; color: var(--text-primary); user-select: text; }

/* ---------- Docs pages (reuse .legal-page for layout) ---------- */

.doc-page code { color: var(--syntax-string); }
/* Long inline identifiers (ARNs, IAM actions) wrap instead of widening a phone screen. */
.doc-page :not(pre) > code { overflow-wrap: anywhere; }
.doc-page pre { margin-top: 16px; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--border-secondary); border-radius: var(--radius-lg); background: var(--bg-primary); }
.doc-page pre code { color: var(--text-primary); font-size: 13px; line-height: 1.6; }
.doc-page table { margin-top: 16px; border-collapse: collapse; font-size: 15px; }
/* docs.js wraps each table in .table-scroll; without JavaScript the table scrolls by itself. */
.doc-page :not(.table-scroll) > table { display: block; overflow-x: auto; }
.doc-page .table-scroll { margin-top: 16px; max-width: 100%; overflow-x: auto; }
.doc-page .table-scroll > table { margin-top: 0; }
.doc-page th, .doc-page td { padding: 10px 12px; border-bottom: 1px solid var(--border-primary); text-align: left; vertical-align: top; color: var(--text-secondary); line-height: 1.55; }
.doc-page th { color: var(--text-primary); font-weight: 600; }
.doc-page .doc-list { list-style: none; padding-left: 0; }
.doc-page .doc-list li { border: 1px solid var(--border-primary); border-radius: 10px; padding: 18px 20px; }
.doc-page figure { margin: 24px 0 0; }
.doc-page figure video, .doc-page figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--border-secondary); border-radius: var(--radius-lg); background: var(--bg-primary); }
.caption-frame { position: relative; container-type: inline-size; }
.caption-line { position: absolute; left: 50%; bottom: max(17%, 68px); transform: translateX(-50%); max-width: 86%; width: max-content; padding: 0.2em 0.55em; border-radius: calc(var(--radius) / 2); background: color-mix(in srgb, var(--shell-canvas) 72%, transparent); color: var(--text-primary); font-size: clamp(11px, 1.75cqw, 20px); line-height: 1.35; text-align: center; pointer-events: none; }
.caption-line[hidden] { display: none; }
.doc-page figcaption { margin-top: 8px; color: var(--text-tertiary); font-size: 14px; line-height: 1.5; }
.doc-page figcaption strong { color: var(--text-secondary); font-weight: 600; }
.doc-page .doc-list a { font-weight: 600; text-decoration: none; }
.doc-page .doc-list p { margin-top: 6px; }

.doc-page .doc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.doc-page .doc-back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-tertiary); font-size: 14px; text-decoration: none; }
.doc-page .doc-back:hover { color: var(--text-primary); }
.doc-page .doc-toolbar .btn { color: var(--text-primary); text-decoration: none; }

/* ---------- Hero pill (links to a highlight section) ---------- */
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin-bottom: 28px; padding: 6px 14px 6px 6px;
  border: 1px solid var(--border-secondary); border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 14px; line-height: 1.35; text-decoration: none;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.hero-pill .chip { flex: none; }
.hero-pill .icon { flex: none; width: 14px; height: 14px; color: var(--brand-text); transition: transform 0.2s var(--ease-out); }
.hero-pill:hover { border-color: var(--brand-text); color: var(--text-primary); }
.hero-pill:hover .icon { transform: translateX(2px); }

/* ---------- FAQ page ---------- */
.faq-page .faq { margin-top: 20px; max-width: none; }
.faq-page h2 + .faq { margin-top: 16px; }
.faq .answer > :first-child { margin-top: 0; }
@media (max-width: 600px) {
  .hero-pill { border-radius: var(--radius-lg); }
}
@media (min-width: 901px) {
  .plans.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Pricing: rows line up across cards (title, price, blurb, list, button) */
@supports (grid-template-rows: subgrid) {
  .plan { display: grid; grid-row: span 5; grid-template-rows: subgrid; align-content: start; }
  .plan .btn { align-self: end; }
}

/* Docs: a tighter crop at phone widths, and the "On this page" outline */
.doc-page figure picture { display: block; }
@media (max-width: 600px) {
  .doc-page figure.has-mobile img { aspect-ratio: 4 / 3; }
}
.doc-page .doc-toc { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--border-primary); border-radius: 10px; }
.doc-page .doc-toc h2 { margin-top: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-tertiary); }
.doc-page .doc-toc ol { margin-top: 10px; padding-left: 0; list-style: none; columns: 2 220px; column-gap: 32px; }
.doc-page .doc-toc li { margin-top: 0; padding: 3px 0; break-inside: avoid; font-size: 15px; line-height: 1.5; }
.doc-page .doc-toc a { color: var(--text-secondary); text-decoration: none; }
.doc-page .doc-toc a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Use-case landing pages (layouts/Landing.astro, components/landing/*) ---------- */

.landing-hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 0; isolation: isolate; overflow-x: clip; }
.landing-eyebrow { font-size: 16px; font-weight: 600; letter-spacing: 0.01em; color: var(--brand-text); max-width: 62ch; }
.landing-hero h1 {
  margin-top: 12px;
  max-width: 26ch;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-stretch: 90%;
}
.landing-lede { display: grid; gap: 14px; max-width: 64ch; margin-top: 24px; }
.landing-lede p { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--text-secondary); }
.landing-lede strong { color: var(--text-primary); font-weight: 500; }
.landing-hero .cta-row { margin-top: 32px; }
.landing-hero-shot { margin-top: clamp(40px, 5vw, 64px); }

.landing-section { padding: clamp(64px, 8vw, 104px) 0 0; }
/* Prose-only sections sit closer together. */
.landing-section:not(:has(.landing-body)) { padding-top: clamp(48px, 6vw, 80px); }
.landing-section .section-head h2 { font-size: clamp(28px, 3.4vw, 42px); }
.landing-section .section-head p { font-size: 17px; }
.landing-section .section-head a, .landing-body a, .landing-lede a { color: var(--text-primary); }
.landing-section .section-head code, .landing-body code, .landing-lede code { color: var(--syntax-string); overflow-wrap: anywhere; }
.landing-body { display: grid; gap: var(--section-content-gap); margin-top: var(--section-content-gap); }

/* Two clips side by side; one column on narrow screens. */
.landing-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; align-items: start; }
@media (max-width: 860px) { .landing-shots { grid-template-columns: minmax(0, 1fr); } }

/* The way people do it today, as commands. */
.landing-code {
  margin: 0; max-width: 960px; padding: 18px 20px; overflow-x: auto;
  border: 1px solid var(--border-secondary); border-radius: var(--radius-lg); background: var(--bg-primary);
  user-select: text;
}
.landing-code:focus-visible { outline-offset: 2px; }
.landing-code code { color: var(--text-primary); font-size: 13.5px; line-height: 1.7; }
.landing-code .c { color: var(--text-tertiary); }

.landing-steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--border-primary); }
.landing-steps li { counter-increment: step; padding: 20px 24px 24px 0; border-bottom: 1px solid var(--border-primary); }
.landing-steps h3 { display: flex; align-items: baseline; gap: 10px; font-size: 17px; letter-spacing: -0.01em; }
.landing-steps h3::before { content: counter(step); font: 600 15px/1 var(--font-mono); color: var(--brand-text); }
.landing-steps p { margin-top: 8px; font-size: 15.5px; color: var(--text-secondary); }
.landing-steps code { color: var(--syntax-string); }

.landing-points { max-width: 960px; }

.landing-limits { max-width: 960px; border-top: 1px solid var(--border-primary); }
.landing-limits li {
  display: grid; grid-template-columns: 16px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border-primary);
  font-size: 15.5px; line-height: 1.5; color: var(--text-secondary); user-select: text;
}
.landing-limits .icon { width: 14px; height: 14px; margin-top: 4px; color: var(--text-tertiary); }
.landing-limits strong { color: var(--text-primary); font-weight: 600; }

/* Comparison tables scroll sideways on a phone instead of widening the page. */
.landing-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--border-primary); border-radius: var(--radius-lg); background: var(--bg-primary); }
.landing-table:focus-visible { outline-offset: 2px; }
.landing-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; user-select: text; }
.landing-table th, .landing-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-primary); text-align: left; vertical-align: top; line-height: 1.5; color: var(--text-secondary); }
.landing-table table.wide { min-width: 720px; }
.landing-table tr:last-child > * { border-bottom: 0; }
.landing-table thead th { color: var(--text-primary); font-weight: 600; font-size: 14px; background: var(--bg-secondary); }
.landing-table tbody th { color: var(--text-primary); font-weight: 500; width: 18%; }
.landing-table .is-us { background: var(--bg-tertiary); color: var(--text-primary); }
.landing-table thead .is-us { box-shadow: inset 0 2px 0 var(--brand-vermilion); }
.landing-table code { color: var(--syntax-string); }
.landing-compare figcaption { margin-top: 12px; font-size: 13.5px; color: var(--text-tertiary); max-width: 860px; }
.landing-compare figcaption a { color: var(--text-secondary); }

/* A fair-to-them aside: when another tool is the right one. */
.landing-note {
  max-width: 960px; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--brand-text);
  font-size: 15.5px; color: var(--text-secondary);
}
.landing-note strong { color: var(--text-primary); font-weight: 600; }

.landing-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: var(--section-content-gap); }
.landing-docs li { position: relative; padding: 18px 20px; border: 1px solid var(--border-primary); border-radius: 10px; transition: border-color 0.15s; }
.landing-docs li:hover { border-color: var(--border-secondary); }
/* The whole card is the link. */
.landing-docs a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.landing-docs a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--text-primary); }
.landing-docs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.landing-docs .icon { color: var(--brand-text); width: 15px; height: 15px; }
.landing-docs p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); }

.landing .closing-copy { margin-top: 20px; max-width: 58ch; font-size: 18px; color: var(--text-secondary); }
.landing .closing-meta { margin-top: 16px; font-size: 14px; color: var(--text-tertiary); }
.landing #faq .faq-layout .section-head h2 { font-size: clamp(28px, 3.4vw, 42px); }
.landing #faq summary { padding: 16px 0; }
.landing .closing h2 { font-size: clamp(30px, 3.8vw, 48px); max-width: 20ch; }

/* Footer: the use-case pages, one wrapping row. */
.footer .footer-usecases { flex-basis: 100%; gap: 6px 18px; padding-top: 16px; border-top: 1px solid var(--border-primary); font-size: 13.5px; }
.footer .footer-usecases span { color: var(--text-tertiary); font-weight: 600; }

/* Docs: the use-case pages that cite this doc, one line under the title. */
.doc-page .doc-usecase-line { margin-top: 6px; font-size: 14px; color: var(--text-tertiary); }
.doc-page .doc-usecase-line a { color: var(--text-secondary); }
.doc-page .doc-usecase-line a:hover { color: var(--text-primary); }

/* Grid items size to their widest line (a code block, a table) unless allowed to shrink. */
.landing-body > *, .landing-shots > * { min-width: 0; }

/* The shared one-liner about Writes (components/landing/WritesLine.astro). */
.landing-writes { max-width: 860px; font-size: 15.5px; color: var(--text-secondary); }
.landing-writes strong { color: var(--text-primary); font-weight: 600; }
.landing-writes a { color: var(--text-primary); }

/* Comparison tables: the label column stays while a wide table scrolls; a hint says it scrolls. */
.landing-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--bg-primary); }
.landing-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
.landing-table-hint { display: none; margin-bottom: 8px; font-size: 13px; color: var(--text-tertiary); }

/* "Open full size" under a shot, phones only (Shot.astro zoom). */
.shot-zoom { display: none; color: var(--text-secondary); }

@media (max-width: 760px) {
  .landing-table-hint { display: block; }
  .landing-table table.wide { min-width: 600px; }
  .landing-table tbody th { width: auto; min-width: 112px; max-width: 132px; }
  .landing-table th, .landing-table td { padding: 10px 12px; font-size: 14px; }
}

@media (max-width: 600px) {
  /* A 16:9 window shot shrinks to unreadable on a phone: crop it tall around the part that matters. */
  .landing .shot:not(.shot-narrated) .shot-frame { aspect-ratio: 4 / 5; }
  .landing .shot:not(.shot-narrated) .shot-frame :is(img, video) { object-position: 58% 50%; }
  .landing .shot.crop-left .shot-frame :is(img, video) { object-position: 14% 50%; }
  .landing .shot.crop-center .shot-frame :is(img, video) { object-position: 50% 50%; }
  .landing .shot.crop-right .shot-frame :is(img, video) { object-position: 96% 50%; }
  .shot-zoom { display: inline; }
  .footer .footer-usecases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer .footer-usecases span { grid-column: 1 / -1; }
}
