/* ==========================================================================
   Reset, page frame, typography primitives, shared utilities
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- type primitives ----------------------------------------------------- */

.display {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.label {
  font-family: var(--f-mono);
  font-size: var(--t-3xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-3);
}

.price {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* --- layout utilities ---------------------------------------------------- */

.page {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(var(--s-7), 8vw, var(--s-9)); }
.section--tight { padding-block: clamp(var(--s-6), 5vw, var(--s-7)); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  margin-bottom: var(--s-6);
}
.section-head__text { max-width: 54ch; }
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 4.5vw, var(--t-2xl));
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin-top: var(--s-2);
}
.section-head p {
  color: var(--ink-2);
  font-size: var(--t-sm);
  margin-top: var(--s-3);
  max-width: 52ch;
}

.text-link {
  font-family: var(--f-mono);
  font-size: var(--t-2xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color var(--fast), border-color var(--fast);
  white-space: nowrap;
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: var(--t-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--radius);
  transition: background var(--fast), color var(--fast),
              border-color var(--fast), transform var(--fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-deep); color: #fff; }

.btn--ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.04); }

.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* --- reveal on scroll ---------------------------------------------------- */

/* Hidden until scrolled to - but ONLY once the observer that reveals them is
   confirmed running. Card.js stamps `js-reveal` on <html> when it starts; if
   the script fails, is blocked, or IntersectionObserver is unavailable, that
   class never lands and every card simply shows.

   This is not belt and braces. A card at opacity 0 still occupies its space and
   still answers taps, so a missed reveal does not leave a gap - it leaves an
   invisible product that the customer taps by accident and one they cannot see
   at all. Failing to "visible" is the only safe direction. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1; transform: none; }
}

/* --- states -------------------------------------------------------------- */

.state {
  padding: var(--s-7) 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  text-align: center;
}
.state--error { color: var(--danger); }
