/* ==========================================================================
   FlyInk.Vario landing page
   --------------------------------------------------------------------------
     1. Fonts
     2. Tokens
     3. Reset
     4. Primitives
     5. Sections, top to bottom
     6. Footer
     7. Wider viewports

   Mobile-first. Two breakpoints: 40em (640px) splits the card grids, and
   54em (864px) is the design's own switch to the full desktop composition.
   ========================================================================== */

/* 1. Fonts ================================================================= */

/* Variable weights: one file per family covers every weight in the design. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

/* 2. Tokens ================================================================ */

:root {
  /* Palette. --accent is reassigned at runtime by the order colour picker. */
  --ink: #0b0d0a;
  --paper: #f4f1eb;
  --accent: #e2fa4f;
  --surface-raised: #0f1110;
  --surface-card: #131513;
  --eink: #e8e6de;

  /* Derived, so opacity steps stay consistent instead of ad hoc per rule */
  --text-muted: rgb(244 241 235 / 0.7);
  --text-dim: rgb(244 241 235 / 0.55);
  --text-faint: rgb(244 241 235 / 0.4);
  --line: rgb(244 241 235 / 0.18);
  --line-soft: rgb(244 241 235 / 0.08);
  --fill-soft: rgb(244 241 235 / 0.04);
  --ink-muted: rgb(11 13 10 / 0.7);

  /* Type families */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;

  /* Fluid type scale, 375px → 864px viewport (the design's desktop switch) */
  --text-mono-xs: 0.625rem;
  --text-mono-sm: 0.6875rem;
  --text-mono-md: 0.75rem;
  --text-mono-lg: 0.875rem;
  --text-lede: clamp(1rem, 0.95rem + 0.19vw, 1.125rem);
  --text-h3: clamp(1.5rem, 1.324rem + 0.751vw, 2rem);
  --text-h2: clamp(2.125rem, 1.42rem + 3.005vw, 4rem);
  /* For headings in a narrow intro column beside a wide panel, where the full
     display size would break the author's intended line endings. */
  --text-h2-compact: clamp(1.875rem, 1.35rem + 2.25vw, 3.25rem);
  /* 36px on phones → the design's 60px once the desktop hero kicks in. */
  --text-h1: clamp(2.25rem, 1.1rem + 4.908vw, 3.75rem);
  --text-stat: clamp(2.25rem, 1.898rem + 1.502vw, 3.25rem);
  --text-quote: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 0.05rem + 4vw, 3.5rem);
  --measure: 1200px;
  --section-y: clamp(4rem, 1.6rem + 7vw, 7.5rem);
  --stack-md: 1.375rem;
  --stack-lg: 2rem;

  /* Motion — zeroed under prefers-reduced-motion, so no rule needs !important */
  --motion: 160ms;
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);

  --tracking-mono: 0.12em;
  --focus-ring: 2px solid var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion: 0ms;
  }
}

/* 3. Reset ================================================================= */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
fieldset,
legend {
  margin: 0;
}

fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* Anchored sections should not hide under the header when jumped to. */
:target {
  scroll-margin-top: 5rem;
}

/* The skip link's target carries tabindex="-1" so the jump reliably moves focus
   in older Safari and some screen readers. It is never reachable by Tab, so
   suppressing its ring hides nothing from a keyboard user — it only avoids
   outlining the entire page after the skip. */
#main:focus {
  outline: none;
}

/* 4. Primitives ============================================================ */

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

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

.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h2);
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h2--compact {
  font-size: var(--text-h2-compact);
  line-height: 1.04;
}

.lede {
  margin-top: var(--stack-md);
  max-width: 34ch;
  color: var(--text-muted);
  font-size: var(--text-lede);
  line-height: 1.5;
}

.lede a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.section-head {
  margin-bottom: clamp(3rem, 1rem + 5vw, 4rem);
}

.section-head .h2 {
  margin-top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Anchored to the top of the document, not the viewport: `fixed` kept it pinned
   on screen for as long as it held focus, so it hovered over the page while the
   visitor scrolled on with the mouse. `absolute` scrolls it away with the rest
   of the document, and it is only ever needed at the start of the page anyway. */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 100;
  translate: -50% -110%;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: 0.08em;
  transition: translate var(--motion) var(--ease);
}

.skip-link:focus-visible {
  translate: -50% 0;
  outline-offset: -4px;
}

/* The sprite host: present in the DOM, absent from layout. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-accent {
  fill: var(--accent);
}

.icon-accent-stroke {
  fill: none;
  stroke: var(--accent);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  padding: 1.0625rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--motion) var(--ease),
    color var(--motion) var(--ease), border-color var(--motion) var(--ease);
}

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

.btn--accent:hover {
  background: color-mix(in srgb, var(--accent) 82%, var(--paper));
}

/* Frosted panel over the hero photo. */
.btn--glass {
  color: var(--paper);
  font-weight: 400;
  background: rgb(244 241 235 / 0.08);
  border-color: rgb(244 241 235 / 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn--glass:hover {
  background: rgb(244 241 235 / 0.16);
  border-color: var(--paper);
}

/* Same shape as --glass but for a flat dark background, with no blur to buy. */
.btn--outline {
  color: var(--paper);
  font-weight: 400;
  border-color: rgb(244 241 235 / 0.28);
}

.btn--outline:hover {
  background: rgb(244 241 235 / 0.08);
  border-color: var(--paper);
}

.btn--sm {
  padding: 0.6875rem 1rem;
  font-size: var(--text-mono-md);
  gap: 0.625rem;
}

.btn--block {
  width: 100%;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-size: var(--text-mono-lg);
  letter-spacing: 0.08em;
}

.btn__icon {
  flex: none;
  opacity: 0.7;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stars {
  display: inline-flex;
  gap: 0.25rem;
}

.stars--accent {
  color: var(--accent);
}

.kbd {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 400;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 2.25rem;
}

.tag {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(244 241 235 / 0.22);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

/* 5. Sections ============================================================== */

/* Header ---------------------------------------------------------------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

/* Pages without a hero photo behind the header need it in flow, on solid ink. */
.site-header--solid {
  position: static;
  background: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Icon-only: on a 390px header the wordmark and the Buy CTA need the room. */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem;
  background: rgb(11 13 10 / 0.55);
  border: 1px solid rgb(244 241 235 / 0.2);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Three bars from one element: the box plus its two pseudo-elements. */
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.nav {
  display: none;
}

/* Open state is driven by the button's own aria-expanded — one source of truth. */
.nav-toggle[aria-expanded='true'] + .nav {
  display: block;
  position: absolute;
  inset: 100% var(--gutter) auto;
  padding: 0.5rem 1.25rem 1.25rem;
  background: var(--ink);
  border: 1px solid var(--line);
}

.nav__link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.nav__link:hover {
  color: var(--paper);
}

.site-header__cta {
  order: 3;
}

/* Plain header link — deliberately not .nav__link, whose rule belongs to the
   stacked mobile menu. */
.site-header__back {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-header__back:hover {
  color: var(--paper);
}

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

.hero {
  position: relative;
  isolation: isolate;
  /* Fills a phone screen without the "100vh is taller than the viewport" bug,
     then settles at the design's 640px band. */
  min-height: min(100svh, 40rem);
  display: grid;
  /* minmax(0, 1fr) rather than an implicit auto track: the ticker is a nowrap
     row whose max-content would otherwise drag the hero wider than the screen. */
  grid-template-columns: minmax(0, 1fr);
  background: #0d2233; /* Average of the hero photo: no flash before decode. */
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

/* Dark at the top for the header, dark at the bottom for the copy. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgb(11 13 10 / 0.45) 0%,
    rgb(11 13 10 / 0) 22%,
    rgb(11 13 10 / 0) 50%,
    rgb(11 13 10 / 0.92) 100%
  );
}

/* The ticker overlays the hero foot rather than sitting in flow, so this
   bottom padding is measured from the hero's own bottom edge — the same
   reference the design uses (104px on phones, 190px on desktop). */
.hero__body {
  display: flex;
  align-items: flex-end;
  padding-block: 7rem 6.5rem;
}

.hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero__copy {
  max-width: 620px;
}

.hero__title {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h1);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero__title span {
  display: block;
}

.hero__title em {
  color: var(--accent);
  font-style: normal;
}

.hero__lede {
  margin-top: var(--stack-md);
  max-width: 560px;
  color: rgb(244 241 235 / 0.78);
  font-size: var(--text-lede);
  line-height: 1.45;
}

/* Stacked and equal width on phones, side by side once there is room. */
.hero__actions {
  display: grid;
  gap: 0.875rem;
  margin-top: var(--stack-lg);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: var(--stack-lg);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Hidden until the desktop composition, as in the design. The stats strip
   directly below carries the same headline figures on small screens. */
.hero__product {
  display: none;
}

/* Ticker ---------------------------------------------------------------- */

/* Overlays the foot of the hero photo, as in the design. */
.ticker {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  border-top: 1px solid rgb(244 241 235 / 0.14);
}

.ticker__list {
  display: flex;
  gap: 2.5rem;
  padding-block: 0.75rem;
  overflow-x: auto;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  scrollbar-width: none;
}

.ticker__list::-webkit-scrollbar {
  display: none;
}

.ticker__item {
  white-space: nowrap;
}

.ticker__item--live {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent);
}

.ticker__item--live::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
}

/* Stats ----------------------------------------------------------------- */

.stats {
  border-bottom: 1px solid var(--line-soft);
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  padding-block: 2.5rem;
}

/* Value reads above its label while the DOM keeps <dt> before <dd>. */
.stats__item {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.625rem;
}

.stats__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-stat);
  line-height: 1;
  letter-spacing: -0.035em;
}

.stats__label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

/* Features -------------------------------------------------------------- */

.features__title {
  max-width: 22ch;
}

.features__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 1rem + 5vw, 4.75rem) 5.5rem;
}

.feature {
  padding-top: 1.75rem;
  border-top: 1px solid rgb(244 241 235 / 0.2);
}

.feature__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.375rem;
  color: var(--paper);
}

.feature__id {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.14em;
}

.feature__icon {
  flex: none;
}

.feature__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h3);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.feature__text {
  margin-top: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Screens --------------------------------------------------------------- */

.screens {
  border-top: 1px solid rgb(244 241 235 / 0.06);
}

.screens__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--stack-lg);
  margin: 1rem 0 clamp(3rem, 1rem + 5vw, 4.5rem);
}

.screens__aside {
  max-width: 46ch;
  color: var(--text-muted);
  font-size: var(--text-lede);
  line-height: 1.5;
}

.screens__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.screen__figure {
  height: 100%;
  padding: 1.5rem;
  background: var(--fill-soft);
  border: 1px solid rgb(244 241 235 / 0.1);
}

/* The screenshots are photos of a real panel; the frame supplies its bezel. */
.screen__frame {
  background: var(--eink);
  border: 1px solid #1a1a1a;
  box-shadow: inset 0 0 0 1px #d7d2c4;
}

.screen__caption {
  margin-top: 1.125rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* In the box ------------------------------------------------------------ */

.box {
  background: rgb(244 241 235 / 0.025);
  border-block: 1px solid rgb(244 241 235 / 0.06);
}

.box__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 1rem + 5vw, 5rem);
  align-items: start;
}

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

.box__item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1.375rem;
  border-bottom: 1px solid var(--line);
}

.box__index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: var(--tracking-mono);
}

.box__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.box__sub {
  display: block;
  margin-top: 0.125rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
}

.box__icon {
  flex: none;
  color: rgb(244 241 235 / 0.85);
}

/* Specs ----------------------------------------------------------------- */

.specs__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.specs__table {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  text-align: left;
}

.specs__table tr {
  border-top: 1px solid rgb(244 241 235 / 0.14);
}

.specs__table tr:last-child {
  border-bottom: 1px solid rgb(244 241 235 / 0.14);
}

.specs__table th {
  width: 46%;
  padding: 1.125rem 1rem 1.125rem 0;
  color: var(--text-dim);
  font-weight: 400;
}

.specs__table td {
  padding: 1.125rem 0;
}

.specs__num {
  color: var(--text-faint);
}

.specs__num::after {
  content: ' ·';
}

/* Reviews --------------------------------------------------------------- */

.reviews {
  background: var(--surface-raised);
  border-top: 1px solid rgb(244 241 235 / 0.06);
}

.reviews__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.review {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  background: color-mix(in srgb, var(--surface-card) 60%, transparent);
  border: 1px solid rgb(244 241 235 / 0.1);
}

.review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.375rem;
}

.review__badge {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

.review__quote {
  font-family: var(--font-display);
  font-size: var(--text-quote);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

/* Round thumbnail the quote wraps around. shape-outside makes the text follow
   the circle rather than its bounding box; browsers without it just wrap on the
   square, which is a graceful difference rather than a break. */
.review__quote picture {
  float: left;
  width: 4.5rem;
  margin: 0.125rem 1rem 0.375rem 0;
  shape-outside: circle(50%);
}

.review__thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.review__by {
  clear: both; /* the quote's floated thumbnail must not spill into the caption */
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.faq {
  border-top: 1px solid rgb(244 241 235 / 0.06);
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 4vw, 5rem);
  align-items: start;
}

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

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

.qa__summary {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.875rem;
  padding-block: 1.5rem;
  cursor: pointer;
  list-style: none;
}

.qa__summary::-webkit-details-marker {
  display: none;
}

.qa__num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: 0.1em;
}

.qa__q {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.375rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

/* Plus that loses its vertical bar when the panel opens. */
.qa__marker {
  position: relative;
  justify-self: end;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(244 241 235 / 0.35);
}

.qa__marker::before,
.qa__marker::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.75rem;
  height: 1px;
  translate: -50% -50%;
  background: var(--paper);
  transition: rotate var(--motion) var(--ease), opacity var(--motion) var(--ease);
}

.qa__marker::after {
  rotate: 90deg;
}

.qa[open] .qa__marker::after {
  rotate: 0deg;
  opacity: 0;
}

/* Indent to the question's text column: the number track plus the grid gap. */
.qa__a {
  padding: 0 0 1.75rem 2.875rem;
  max-width: 62ch;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Order ----------------------------------------------------------------- */

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

.order__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.lede--ink {
  color: var(--ink-muted);
  max-width: 42ch;
}

.checklist {
  display: grid;
  gap: 0.875rem;
  margin-top: var(--stack-lg);
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
}

.checklist__item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.seal {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.seal__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.seal__text {
  max-width: 32ch;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: var(--tracking-mono);
  line-height: 1.5;
  text-transform: uppercase;
}

.order-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1.5rem, 0.5rem + 3vw, 2.25rem);
  background: var(--ink);
  color: var(--paper);
}

.order-form__product {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Neutral well, so the device keeps its own colour when the picker changes it. */
.order-form__thumb {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 5rem;
  padding: 0.5rem;
  background: rgb(244 241 235 / 0.06);
  border: 1px solid rgb(244 241 235 / 0.12);
}

.order-form__thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.order-form__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.order-form__sku {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
}

.order-form__unit {
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
}

.order-form__fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 0.875rem;
}

.field {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.field__label {
  padding: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field__control {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgb(244 241 235 / 0.28);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: var(--text-mono-lg);
  transition: border-color var(--motion) var(--ease);
}

.field__control:hover,
.field__control:focus {
  border-bottom-color: var(--accent);
}

.field__control--area {
  resize: vertical;
  min-height: 4.25rem;
  font-family: var(--font-body);
}

/* Native select styling differs per engine; normalise the arrow and padding.
   min-width: 0 matters — a select's intrinsic minimum is its longest option, so
   without it the shipping optgroup labels widen the whole form on narrow
   phones. */
select.field__control {
  appearance: none;
  min-width: 0;
  padding-right: 1.25rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 0.4rem center, right 0.05rem center;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}

select.field__control option,
select.field__control optgroup {
  background: var(--ink);
  color: var(--paper);
}

/* Colour picker ---------------------------------------------------------- */

/* auto-fit rather than three fixed columns: "Orange" is unbreakable, so on a
   320px screen the row drops to two columns instead of overflowing. */
.colours__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 0.625rem;
  margin: 0;
}

.colour {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgb(244 241 235 / 0.25);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color var(--motion) var(--ease);
}

/* The radio stays in the accessibility tree; the label is the visible control. */
.colour input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.colour:hover {
  border-color: rgb(244 241 235 / 0.5);
}

.colour:has(input:checked) {
  border-color: var(--paper);
}

.colour:has(input:focus-visible) {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* Swatch colours live here rather than in a style attribute, so the deployed
   Content-Security-Policy can keep style-src at 'self' with no unsafe-inline. */
.colour__swatch {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--swatch);
}

.colour__swatch--green {
  --swatch: #c3d93f;
}

.colour__swatch--orange {
  --swatch: #ed9532;
}

.colour__swatch--blue {
  --swatch: #56b0c5;
}

.colour:has(input:checked) .colour__swatch {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--paper);
}

/* Summary ---------------------------------------------------------------- */

.order-form__summary {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(244 241 235 / 0.15);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.order-form__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.order-form__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(244 241 235 / 0.15);
}

.order-form__total-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.order-form__total-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.375rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.order-form__pay,
.order-form__pay-total {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.order-form__note {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

/* 6. Footer =============================================================== */

.site-footer {
  padding-block: 4rem 2.125rem;
  background: var(--ink);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
  padding-bottom: 3.25rem;
  border-bottom: 1px solid rgb(244 241 235 / 0.12);
}

.site-footer__about {
  max-width: 380px;
}

.site-footer__brand {
  margin-bottom: 1.25rem;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-footer__text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  letter-spacing: 0;
  color: rgb(244 241 235 / 0.6);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 2rem;
}

.site-footer__heading {
  margin-bottom: 1rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer__links {
  display: grid;
  gap: 0.6875rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.site-footer__links a {
  color: rgb(244 241 235 / 0.72);
  transition: color var(--motion) var(--ease);
}

.site-footer__links a:hover {
  color: var(--accent);
}

.site-footer__copy {
  margin-top: 1.875rem;
  color: var(--text-faint);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   6b. Order confirmation (/thanks/)
   --------------------------------------------------------------------------
   PayPal's `return` is a plain GET with no order data attached, so this page is
   deliberately generic — it never states an order number, total or item.
   ========================================================================== */

.thanks {
  padding-block: clamp(3.5rem, 1.5rem + 6vw, 6.5rem);
}

.thanks__inner {
  max-width: 40rem;
}

.thanks__badge {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
}

.thanks__lede {
  max-width: 46ch;
}

.thanks__subhead {
  margin-top: clamp(2.5rem, 1rem + 4vw, 3.5rem);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-mono-md);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.thanks__steps {
  margin-top: 1.25rem;
}

.thanks__note {
  margin-top: 2.25rem;
  max-width: 52ch;
  color: var(--text-muted);
  line-height: 1.6;
}

.thanks__note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.5rem;
}

/* ==========================================================================
   7. Wider viewports
   ========================================================================== */

@media (min-width: 40em) { /* 640px */
  .stats__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Hairline rules between stats, matching the design's divided strip. */
  .stats__item + .stats__item {
    padding-left: 2rem;
    border-left: 1px solid rgb(244 241 235 / 0.1);
  }

  .hero__actions {
    display: flex;
    flex-wrap: wrap;
  }

  .features__list,
  .screens__list,
  .reviews__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 54em) { /* 864px — the design's desktop composition */
  .site-header__inner {
    padding-block: 1.5rem;
  }

  .nav-toggle {
    display: none;
  }

  /* The toggle is hidden here, so the nav shows unconditionally. */
  .nav,
  .nav-toggle[aria-expanded='true'] + .nav {
    position: static;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    inset: auto;
  }

  .nav__list {
    display: flex;
    gap: 2rem;
  }

  .nav__link {
    padding: 0;
    border-bottom: 0;
    font-size: 0.875rem;
  }

  .hero {
    min-height: 55rem;
  }

  .hero__body {
    padding-block: 9rem 11.875rem; /* copy block bottom sits 190px up */
  }

  /* The design sets both headline lines on one line each at this size. */
  .hero__title span {
    white-space: nowrap;
  }

  .hero__product {
    display: block;
    flex: none;
    width: 300px;
    /* The design drops the device 18px below the copy's baseline (172px vs
       190px up) and insets it 37px from the container edge rather than 56px. */
    margin-block-end: -1.125rem;
    margin-inline-end: -1.1875rem;
  }

  .features {
    padding-top: calc(var(--section-y) * 1.3);
  }

  .screens__head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.75rem;
    align-items: start;
  }

  .screens__list,
  .reviews__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .box__grid,
  .order__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .faq__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  }

  .specs__grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  }

  .box__item {
    grid-template-columns: 3.75rem minmax(0, 1fr) auto;
    gap: 1.5rem;
  }

  .specs__table th,
  .specs__table td {
    padding-block: 1.25rem;
  }

  .site-footer {
    padding-block: 5rem 2.125rem;
  }

  .site-footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }

  .site-footer__cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
