/* Panegrip v3 — UI kit. The single source of colour, type, space and components.
   Rule: page styles use these tokens only — no hand-written colours, sizes or radii. */

:root {
  /* colour · surfaces */
  --bg: #070708;
  --surface: #111113;
  --surface-2: #18181c;
  --line: #26262c;          /* dividers (decorative) */
  --line-strong: #6a6a72;   /* control borders, ≥3:1 on every surface */
  /* colour · text */
  --ink: #f4f4f2;           /* 18.3:1 on bg */
  --soft: #a6a6ad;          /* 8.3:1 */
  --muted: #8b8b93;         /* 6.0:1 — the lowest text colour allowed */
  /* colour · brand */
  --signal: #ff5a24;        /* logo orange, 6.5:1 on bg */
  --signal-hover: #ff7444;
  --on-signal: #140600;     /* 6.4:1 on signal */
  --glow: rgba(255, 90, 36, .5);
  --signal-deep: #b83a0c;   /* bottom of the orange gradient: white text 5.8:1 */
  --glass: rgba(24, 24, 28, .74);
  --glass-line: rgba(255, 255, 255, .12);
  /* colour · Apple button */
  --apple: #ffffff;
  --apple-hover: #e9e9ec;
  --on-apple: #000000;      /* 21:1 */
  /* colour · the TestFlight badge, Apple's white badge: white, black type */
  --badge: #ffffff;
  --badge-hover: #e9e9ec;
  --badge-line: #ffffff;
  --badge-line-hover: #e9e9ec;
  --on-badge: #000000;      /* 21:1 */
  /* colour · states */
  --ok: #3ddc84;
  --on-ok: #03200f;
  --ok-surface: #15251e;   /* a "clean" result card: ok at 10% on surface */
  --ok-line: #236240;      /* its border: ok at 40% on surface */
  --warn: #ffb020;
  --error: #ff6b5c;         /* 7.2:1 on bg */
  --focus: var(--signal);
  /* colour · data (agents' own brand dots, not part of the palette) */
  --c-claude: #d97757;
  --c-codex: #10a37f;
  --scrim: rgba(7, 7, 8, .8);
  /* light · motion layer */
  --spot: rgba(255, 255, 255, .07);       /* cursor spotlight on cards */
  --apple-glow: rgba(255, 255, 255, .28); /* halo under the TestFlight button on hover */
  --black: #000000;

  /* type · families */
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;   /* used at font-stretch: 125% (Expanded) */
  --f-text: "Geist", -apple-system, "Helvetica Neue", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-apple: -apple-system, "SF Pro Text", "Geist", "Helvetica Neue", sans-serif;
  --f-dot: "Doto", var(--f-mono);   /* dot-matrix digits only (idea 3) */
  /* type · scale */
  --fs-mega: clamp(96px, 24vw, 360px);     /* one decorative word per page (04 · ALLOW) */
  --fs-display: clamp(36px, 5.4vw, 80px);     /* the hero headline, one per page */
  --fs-giant: clamp(30px, 7.6vw, 112px);   /* footer call: JOIN THE BETA, fills the row */
  --fs-stat: clamp(32px, 3.6vw, 52px);     /* counters and big statements */
  --fs-clock: 76px;                        /* lock-screen clock in the phone mock */
  --fs-h1: clamp(32px, 4.4vw, 64px);
  --fs-h2: clamp(24px, 2.6vw, 36px);
  --fs-h3: 20px;
  --fs-lead: 19px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-label: 12px;
  --fs-apple: 26px;         /* the "TestFlight" word on the badge */
  --fs-apple-sub: 12px;     /* "Join the beta on" above it */
  --fs-apple-s: 17px;       /* the same two lines on the 40px badge in the nav */
  --fs-apple-sub-s: 9px;

  /* space · 4-based scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 160px;
  /* radius */
  --r-xs: 4px; --r-s: 8px; --r-m: 12px; --r-l: 20px; --r-pill: 999px; --r-round: 50%;
  --r-hair: 2px; --r-device: 48px; --r-screen: 40px;   /* logo squares · phone body · phone screen */
  /* control heights */
  --h-l: 60px; --h-m: 48px; --h-s: 40px;
  /* layout */
  --wrap: 1280px;
  --gutter: var(--s-6);
  --gap: var(--s-3);
  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);        /* expo-out: reveals, the phone rising */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1); /* small overshoot: taps, notifications */
  --t-fast: .15s;
  --t: .3s;
  --t-slow: .8s;
  --t-reveal: 1.2s;
  --stagger: 70ms;
}
@media (max-width: 600px) { :root { --gutter: var(--s-4); --fs-lead: 17px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 var(--fs-body)/1.55 var(--f-text); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-xs); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.t-display { font: 900 var(--fs-display)/.94 var(--f-display); font-stretch: 125%; text-transform: uppercase; letter-spacing: -.02em; word-spacing: .12em; }
.t-h1 { font: 800 var(--fs-h1)/.98 var(--f-display); font-stretch: 125%; text-transform: uppercase; letter-spacing: -.015em; word-spacing: .12em; }
.t-h2 { font: 700 var(--fs-h2)/1.08 var(--f-display); font-stretch: 125%; letter-spacing: -.01em; }
.t-h3 { font: 600 var(--fs-h3)/1.25 var(--f-text); letter-spacing: -.01em; }
.t-lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--soft); }
.t-body { font-size: var(--fs-body); line-height: 1.55; }
.t-small { font-size: var(--fs-small); line-height: 1.5; color: var(--soft); }
.t-label { font: 500 var(--fs-label)/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.t-code { font: 400 var(--fs-small)/1.6 var(--f-mono); }
.t-dim { color: var(--muted); }
.t-soft { color: var(--soft); }
.t-dot { font-family: var(--f-dot); font-weight: 900; letter-spacing: .02em; color: var(--signal); text-shadow: 0 0 24px var(--glow); }
.t-signal { color: var(--signal); }

/* ---------- 1 · primary: Join the beta on TestFlight (Apple badge) ---------- */
/* Proportions follow Apple's App Store badge: logo about half the height, two tight lines, radius about a fifth. */
.btn-apple {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: var(--h-l); padding: 0 var(--s-5) 0 var(--s-4);
  border: 1px solid var(--badge-line); border-radius: var(--r-m); background: var(--badge); color: var(--on-badge);
  font-family: var(--f-apple); white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-apple svg { width: 30px; height: 30px; flex: none; margin-top: -3px; }
.btn-apple .txt { display: grid; gap: 2px; line-height: 1; text-align: left; }
.btn-apple small { font-size: var(--fs-apple-sub); font-weight: 500; letter-spacing: .02em; }
.btn-apple strong { font-size: var(--fs-apple); font-weight: 600; letter-spacing: -.025em; }
.btn-apple:hover, .btn-apple.is-hover { background: var(--badge-hover); border-color: var(--badge-line-hover); }
.btn-apple:active, .btn-apple.is-active { transform: translateY(1px); }
.btn-apple.is-focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.btn-apple.s { height: var(--h-s); padding: 0 var(--s-3) 0 var(--s-2); gap: 6px; border-radius: var(--r-s); }
.btn-apple.s svg { width: 22px; height: 22px; margin-top: -2px; }
.btn-apple.s .txt { gap: 1px; }
.btn-apple.s small { font-size: var(--fs-apple-sub-s); letter-spacing: .03em; }
.btn-apple.s strong { font-size: var(--fs-apple-s); letter-spacing: -.02em; }

/* ---------- 2 · secondary: the install command ---------- */
.curl {
  display: inline-flex; align-items: center; gap: var(--s-3); max-width: 100%;
  height: var(--h-l); padding: 0 var(--s-2) 0 var(--s-5);
  border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface);
  font: 400 var(--fs-body)/1 var(--f-mono); color: var(--ink);
}
.curl .cmd { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curl .cmd b { color: var(--signal); font-weight: 400; margin-right: var(--s-2); }
.copy-btn {
  flex: none; display: inline-flex; align-items: center; gap: var(--s-2);
  height: var(--h-s); padding: 0 var(--s-4); border-radius: var(--r-s);
  background: var(--surface-2); color: var(--ink);
  font: 500 var(--fs-label)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  transition: background var(--t-fast), color var(--t-fast);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover, .copy-btn.is-hover { background: var(--line); }
.copy-btn.done { background: var(--ok); color: var(--on-ok); }
/* big variant: a terminal window */
.term { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: var(--s-3); height: var(--h-m); padding: 0 var(--s-2) 0 var(--s-4); border-bottom: 1px solid var(--line); }
.term-bar .dots { display: flex; gap: 6px; }
.term-bar .dots i { width: 10px; height: 10px; border-radius: var(--r-round); background: var(--line); }
.term-bar .copy-btn { margin-left: auto; height: 32px; }
.term pre { padding: var(--s-5); font: 400 var(--fs-small)/1.7 var(--f-mono); color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.term .p { color: var(--signal); }
.term .g { color: var(--ok); }
.term .d { color: var(--muted); }

/* ---------- 3 · tertiary: text link with arrow ---------- */
.link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color var(--t-fast), border-color var(--t-fast); }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover, .link-arrow.is-hover { color: var(--signal); border-color: var(--signal); }
.link-arrow:hover svg, .link-arrow.is-hover svg { transform: translateX(3px); }

/* ---------- 4 · form field ---------- */
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--fs-small); font-weight: 500; color: var(--ink); }
.field input { height: var(--h-m); padding: 0 var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: 400 var(--fs-body) var(--f-text); }
.field input::placeholder { color: var(--muted); }
.field input:focus, .field.is-focus input { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--glow); }
.field .help { font-size: var(--fs-small); color: var(--muted); }
.field.err input { border-color: var(--error); }
.field.err .help { color: var(--error); display: flex; gap: var(--s-2); align-items: center; }

/* ---------- 5 · surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-l); padding: var(--s-6); }
.cell { border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-6); }
.tile { background: var(--signal); color: var(--on-signal); border-radius: var(--r-l); padding: var(--s-6); }
.tile .t-label, .tile .t-small { color: var(--on-signal); }

/* ---------- 6 · small parts ---------- */
.chip { display: inline-flex; align-items: center; gap: var(--s-2); height: 34px; padding: 0 var(--s-4); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 500; }
.chip i { width: 7px; height: 7px; border-radius: var(--r-round); background: var(--c, var(--muted)); }
.status { display: inline-flex; align-items: center; gap: var(--s-2); font: 500 var(--fs-label)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.status i { width: 8px; height: 8px; border-radius: var(--r-round); background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status.wait i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.kbd { display: inline-grid; place-items: center; min-width: 32px; height: 28px; padding: 0 var(--s-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-xs); font: 500 var(--fs-label)/1 var(--f-mono); color: var(--soft); }
.stat strong { display: block; font: 900 var(--fs-h1)/.9 var(--f-display); font-stretch: 125%; }
.stat span { display: block; margin-top: var(--s-2); }

/* ---------- 7 · data ---------- */
.rows { width: 100%; border-collapse: collapse; }
.rows th, .rows td { text-align: left; vertical-align: top; padding: var(--s-4) var(--s-3); border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.rows thead th { font: 500 var(--fs-label)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rows tbody th { font-weight: 600; color: var(--ink); }
.rows td { color: var(--soft); }
.rows td.no { padding-left: calc(var(--s-3) + 1.4em); }   /* hanging indent: wrapped lines align with the text, not the ✕ */
.rows td.no::before { content: "✕"; display: inline-block; width: 1.4em; margin-left: -1.4em; color: var(--signal); }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-5); padding: var(--s-5) 0; font-size: var(--fs-h3); font-weight: 500; transition: color var(--t-fast); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: var(--h-s); height: var(--h-s); border-radius: var(--r-round); border: 1px solid var(--line-strong); display: grid; place-items: center; font: 400 var(--fs-body)/1 var(--f-mono); color: var(--soft); }
.faq summary:hover, .faq details[open] summary { color: var(--signal); }
.faq details[open] summary::after { content: "−"; background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.faq details p { padding: 0 var(--s-8) var(--s-5) 0; color: var(--soft); }

/* small screens: the command wraps instead of being cut */
@media (max-width: 600px) {
  .curl { height: auto; min-height: var(--h-l); padding-top: var(--s-2); padding-bottom: var(--s-2); font-size: var(--fs-small); }
  .curl { justify-content: space-between; }
  .curl .cmd { white-space: normal; overflow: visible; line-height: 1.5; text-align: left; }
  .btn-apple:not(.s), .curl { width: 100%; }
  .btn-apple:not(.s) { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
