/* ==========================================================================
   COMPONENTS — nav, buttons, cards, forms, footer, primitives
   ========================================================================== */

/* --------------------------------------------------------------------------
   BOOT LOADER
   -------------------------------------------------------------------------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 620ms var(--ease-out), visibility 620ms;
}

.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  width: min(300px, 70vw);
}

.boot__mark {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
}

.boot__bar {
  width: 100%;
  height: 2px;
  background: var(--line);
  overflow: hidden;
  border-radius: var(--r-pill);
}

.boot__fill {
  height: 100%;
  width: 0%;
  background: var(--text);
  transition: width 240ms var(--ease-out);
}

.boot__pct {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   SCROLL PROGRESS
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--text);
  z-index: calc(var(--z-header) + 1);
  will-change: transform;
}

/* --------------------------------------------------------------------------
   CUSTOM CURSOR (pointer devices only)
   -------------------------------------------------------------------------- */
.cursor,
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor {
  width: 30px; height: 30px;
  border: 1px solid var(--brand-white);
  transition: width 260ms var(--ease-out), height 260ms var(--ease-out),
              opacity 260ms linear, background-color 260ms var(--ease-out);
}

.cursor-dot {
  width: 4px; height: 4px;
  background: var(--brand-white);
}

.cursor.is-active { opacity: 1; }
.cursor-dot.is-active { opacity: 1; }

.cursor.is-hover {
  width: 58px; height: 58px;
  background: rgba(255, 255, 255, 0.14);
}

@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* --------------------------------------------------------------------------
   HEADER / NAV
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  transition: transform 460ms var(--ease-out), background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), backdrop-filter var(--dur);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom-color: var(--line);
}

.header.is-hidden { transform: translateY(-102%); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  height: 72px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Wordmark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.brand__glyph {
  width: 26px; height: 26px;
  flex-shrink: 0;
  color: var(--text);
}

.brand__glyph path,
.brand__glyph rect { transition: transform 500ms var(--ease-spring); transform-origin: center; }
.brand:hover .brand__glyph .g-a { transform: translateX(-1.6px); }
.brand:hover .brand__glyph .g-c { transform: translateX(1.6px); }
/* The Sarouvet shield is a single mark rather than separable bars, so it lifts
   instead of splitting - same 500ms spring, same intent. */
.brand:hover .brand__glyph .g-mark { transform: translateY(-1.5px) scale(1.05); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.06;
}

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

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Desktop nav */
.nav {
  display: none;
  align-items: center;
  gap: var(--sp-1);
}

.nav__link {
  position: relative;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 450;
  color: var(--text-2);
  border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.nav__link:hover,
.nav__link:focus-visible { color: var(--text); background: var(--surface-hover); }

.nav__link.is-current { color: var(--text); }

.nav__link.is-current::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(-50%);
}

/* Dropdown */
.nav__item { position: relative; }

.nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav__chev {
  width: 10px; height: 10px;
  transition: transform var(--dur) var(--ease-out);
}

.nav__item:hover .nav__chev,
.nav__item:focus-within .nav__chev { transform: rotate(180deg); }

.nav__panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  translate: -50% 0;
  width: min(660px, 78vw);
  padding: var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
}

.nav__item:hover .nav__panel,
.nav__item:focus-within .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Single-column panel — used for the product menu */
.nav__panel--one { grid-template-columns: 1fr; width: min(378px, 80vw); }

.nav-product {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.nav-product:hover { background: var(--surface-hover); }

.nav-product__glyph {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}

.nav-product__glyph svg { width: 18px; height: 18px; }

.nav-product__name {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.nav-product__desc { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.45; }

.nav__foot {
  grid-column: 1 / -1;
  margin-top: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-inline: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.badge--sm {
  padding: 0.24em 0.6em;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

.nav__panel::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0; right: 0;
  height: 14px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.nav-card:hover { background: var(--surface-hover); }

.nav-card__title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--text);
}

.nav-card__idx {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.nav-card__desc {
  font-size: var(--fs-xs);
  color: var(--text-3);
  line-height: 1.45;
  padding-left: 30px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Theme toggle */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}

.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-hover); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }
}

/* Burger */
.burger {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.burger__box { width: 16px; height: 11px; position: relative; }

.burger__line {
  position: absolute;
  left: 0;
  width: 100%; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 380ms var(--ease-spring), opacity 200ms linear;
}

.burger__line:nth-child(1) { top: 0; }
.burger__line:nth-child(2) { top: 50%; translate: 0 -50%; }
.burger__line:nth-child(3) { bottom: 0; }

.burger.is-open .burger__line:nth-child(1) { transform: translateY(4.75px) rotate(45deg); }
.burger.is-open .burger__line:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.burger.is-open .burger__line:nth-child(3) { transform: translateY(-4.75px) rotate(-45deg); }

/* The header bar needs about 530px to seat the wordmark, theme toggle, both
   CTAs and the burger. Below that the CTAs run past the right edge, and since
   `body` is `overflow-x: hidden` the excess is clipped rather than scrollable.
   Phones therefore drop the CTAs - the drawer carries both - while tablets
   from 600px up keep them. */
.header__actions .btn { display: none; }

@media (min-width: 600px) {
  .header__actions .btn { display: inline-flex; }
}

/* 1160, not 1080: at 1080 the full nav plus both CTAs overruns the bar and
   clips "Get Access". Keep this in sync with the drawer's resize handler in
   js/ui.js. */
@media (min-width: 1160px) {
  .nav { display: flex; }
  .burger { display: none; }
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 92px var(--gutter) var(--sp-7);
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 620ms var(--ease-out);
  visibility: hidden;
}

.drawer.is-open { clip-path: inset(0 0 0 0); visibility: visible; }

.drawer__list { display: flex; flex-direction: column; }

.drawer__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.25rem);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  opacity: 0;
  transform: translateY(22px);
}

.drawer.is-open .drawer__link {
  animation: drawer-in 560ms var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}

.drawer__idx {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
}

.drawer__foot {
  margin-top: auto;
  padding-top: var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

@keyframes drawer-in {
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 0.72em 1.45em;
  font-size: var(--fs-sm);
  font-weight: 550;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out), transform 220ms var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 460ms var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--bg); border-color: var(--text); }
.btn:active { transform: scale(0.975); }

.btn__ico { width: 15px; height: 15px; flex-shrink: 0; transition: transform 420ms var(--ease-out); }
.btn:hover .btn__ico { transform: translateX(3px); }

/* Primary — inverted fill */
.btn--primary {
  --btn-bg: var(--bg-inverse);
  --btn-fg: var(--text-inverse);
  --btn-bd: var(--bg-inverse);
}
.btn--primary::before { background: var(--bg); }
.btn--primary:hover, .btn--primary:focus-visible { color: var(--text); border-color: var(--text); }

/* Ghost */
.btn--ghost { --btn-bd: transparent; color: var(--text-2); }
.btn--ghost::before { background: var(--surface-hover); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--text); border-color: var(--line-2); }

.btn--lg { padding: 0.92em 1.85em; font-size: var(--fs-body); }
.btn--sm { padding: 0.56em 1.1em; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* Text link with underline sweep */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
  padding-bottom: 2px;
}

.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 420ms var(--ease-out);
}

.link:hover::after,
.link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.link svg { width: 13px; height: 13px; transition: transform 380ms var(--ease-out); }
.link:hover svg { transform: translate(2px, -2px); }

/* --------------------------------------------------------------------------
   BADGES / PILLS / TAGS
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4em 0.85em;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-hover);
  white-space: nowrap;
}

.badge--live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text);
  animation: pulse-dot 2.1s var(--ease-in-out) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

.tag {
  display: inline-block;
  padding: 0.35em 0.72em;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.card:hover .tag { color: var(--text-2); border-color: var(--line-2); }

.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* --------------------------------------------------------------------------
   CARDS
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: clamp(1.35rem, 1rem + 1.1vw, 2rem);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}

/* Cursor-tracking spotlight — set by JS via --mx/--my */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    var(--surface-active),
    transparent 70%
  );
  transition: opacity 420ms var(--ease-out);
}

.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }

.card--flat { background: transparent; }
.card--sunk { background: var(--bg-sunk); }

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
}

.card__idx {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.card__title {
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: 1.25;
}

.card__title--serif {
  font-family: var(--font-display);
  font-weight: 400;
}

.card__body {
  font-size: var(--fs-body);
  color: var(--text-2);
  line-height: var(--lh-body);
}

.card__foot { margin-top: auto; padding-top: var(--sp-2); }

.card__icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text-2);
  flex-shrink: 0;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}

.card__icon svg { width: 19px; height: 19px; }
.card:hover .card__icon { color: var(--text); border-color: var(--line-strong); background: var(--surface-hover); }

/* Check list inside cards */
.checks { display: flex; flex-direction: column; gap: var(--sp-3); }

.checks li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}

.checks li::before {
  content: "";
  flex-shrink: 0;
  width: 15px; height: 15px;
  margin-top: 3px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237D7D7D' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 9px;
  background-position: center;
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   STAT
   -------------------------------------------------------------------------- */
.stat { display: flex; flex-direction: column; gap: var(--sp-2); }

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 2.7vw, 3.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.stat__label {
  font-size: var(--fs-xs);
  color: var(--text-3);
  line-height: 1.4;
  max-width: 22ch;
}

.stat--sm .stat__num { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }

/* --------------------------------------------------------------------------
   MARQUEE
   -------------------------------------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-5);
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--sp-8);
  animation: marquee 46s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee--rev .marquee__track { animation-direction: reverse; }

.marquee__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-3);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}

.marquee__item:hover { color: var(--text); }
.marquee__item span { font-size: var(--fs-micro); opacity: 0.55; }

@keyframes marquee {
  to { transform: translateX(calc(-50% - var(--sp-8) / 2)); }
}

/* --------------------------------------------------------------------------
   ACCORDION
   -------------------------------------------------------------------------- */
.acc { border-top: 1px solid var(--line); }

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

.acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  width: 100%;
  padding-block: clamp(1.15rem, 0.9rem + 0.8vw, 1.65rem);
  text-align: left;
  font-size: var(--fs-h4);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--text-2);
  transition: color var(--dur) var(--ease-out);
}

.acc__btn:hover { color: var(--text); }
.acc__item.is-open .acc__btn { color: var(--text); }

.acc__sign {
  position: relative;
  flex-shrink: 0;
  width: 15px; height: 15px;
}

.acc__sign::before,
.acc__sign::after {
  content: "";
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 1.5px;
  background: currentColor;
  translate: 0 -50%;
  transition: transform 420ms var(--ease-spring);
}

.acc__sign::after { transform: rotate(90deg); }
.acc__item.is-open .acc__sign::after { transform: rotate(0deg); }

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 500ms var(--ease-out);
}

.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }

.acc__inner { overflow: hidden; }

.acc__inner > div {
  padding-bottom: var(--sp-6);
  padding-right: clamp(0rem, -2rem + 8vw, 5rem);
  color: var(--text-2);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  max-width: 78ch;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 420ms var(--ease-out) 90ms, transform 420ms var(--ease-out) 90ms;
}

.acc__item.is-open .acc__inner > div { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: var(--sp-7); }

.fieldset { display: flex; flex-direction: column; gap: var(--sp-5); border: 0; }

.fieldset__legend {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
}

.fieldset__legend::before {
  content: counter(fs-counter, decimal-leading-zero);
  color: var(--text);
}

.form { counter-reset: fs-counter; }
.fieldset { counter-increment: fs-counter; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--sp-5);
}

.field { display: flex; flex-direction: column; gap: var(--sp-2); position: relative; }
.field--full { grid-column: 1 / -1; }

.field__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0;
}

.field__req { color: var(--text-3); font-family: var(--font-mono); font-size: var(--fs-micro); }

.field__hint { font-size: var(--fs-micro); color: var(--text-3); line-height: 1.45; }

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  font-size: var(--fs-sm);
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  appearance: none;
}

.input::placeholder,
.textarea::placeholder { color: var(--text-3); opacity: 0.72; }

.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--surface-active);
}

.textarea { resize: vertical; min-height: 132px; line-height: 1.6; }

.select {
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237D7D7D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 15px;
}

.select option { background: var(--bg-elev); color: var(--text); }

.input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.55);
  cursor: pointer;
}

:root[data-theme="light"] .input[type="datetime-local"]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] .input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.35); }

/* Character counter */
.field__count {
  position: absolute;
  right: 0; bottom: -1.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Choice chips (checkbox / radio grid) */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--sp-3);
}

.choice { position: relative; display: block; cursor: pointer; }

.choice input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.choice__box {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 100%;
  padding: 0.72rem 0.9rem;
  font-size: var(--fs-sm);
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease-out);
}

.choice__box::before {
  content: "";
  flex-shrink: 0;
  width: 15px; height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  transition: all var(--dur-fast) var(--ease-out);
}

.choice:hover .choice__box { border-color: var(--line-strong); color: var(--text); }

.choice input:checked + .choice__box {
  color: var(--text);
  border-color: var(--text);
  background: var(--surface-active);
}

.choice input:checked + .choice__box::before {
  background: var(--text);
  border-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

:root[data-theme="light"] .choice input:checked + .choice__box::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.choice input:focus-visible + .choice__box { outline: 2px solid var(--text); outline-offset: 2px; }

/* Radio variant */
.choice--radio .choice__box::before { border-radius: 50%; }
.choice--radio input:checked + .choice__box::before { background-size: 9px; }

/* Consent checkbox — inline paragraph style */
.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--text-3);
}

.consent input { position: absolute; opacity: 0; width: 0; height: 0; }

.consent__mark {
  flex-shrink: 0;
  width: 17px; height: 17px;
  margin-top: 2px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  transition: all var(--dur-fast) var(--ease-out);
}

.consent input:checked + .consent__mark {
  background: var(--text);
  border-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}

:root[data-theme="light"] .consent input:checked + .consent__mark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.consent input:focus-visible + .consent__mark { outline: 2px solid var(--text); outline-offset: 2px; }

/* Validation */
.field.is-invalid .input,
.field.is-invalid .select,
.field.is-invalid .textarea { border-color: var(--brand-fog); box-shadow: 0 0 0 3px var(--surface-active); }

.field__error {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text);
  animation: shake 380ms var(--ease-out);
}

.field.is-invalid .field__error { display: flex; }

.field__error::before { content: "!"; font-weight: 700; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-4px); }
  44% { transform: translateX(4px); }
  68% { transform: translateX(-2px); }
}

.form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.form__note {
  font-size: var(--fs-xs);
  color: var(--text-3);
  max-width: 46ch;
  line-height: 1.55;
}

/* Submit button loading state */
.btn.is-loading { pointer-events: none; color: transparent; }

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px; height: 15px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--text-inverse);
  animation: spin 720ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Success panel */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  text-align: center;
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
}

.form-success.is-visible { display: flex; animation: rise-in 620ms var(--ease-out); }

.form-success__mark {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--text);
}

.form-success__mark svg { width: 24px; height: 24px; }

.form-success__mark svg path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 720ms var(--ease-out) 220ms forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  padding-top: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--sp-8) var(--sp-6);
  padding-bottom: var(--sp-9);
}

.footer__brand { grid-column: 1 / -1; max-width: 420px; }

@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .footer__brand { grid-column: auto; }
}

.footer__desc {
  font-size: var(--fs-sm);
  color: var(--text-3);
  line-height: var(--lh-body);
  margin-top: var(--sp-4);
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-4);
}

.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); }

.footer__link {
  font-size: var(--fs-sm);
  color: var(--text-2);
  width: fit-content;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.footer__link:hover { color: var(--text); transform: translateX(3px); }

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.footer__meta-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.footer__meta-key {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  opacity: 0.7;
  min-width: 76px;
}

.socials { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); }

.social {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-3);
  transition: all var(--dur) var(--ease-out);
}

.social:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
  transform: translateY(-2px);
}

.social svg { width: 16px; height: 16px; }

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.footer__bar-links { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.footer__bar-links a { transition: color var(--dur-fast) var(--ease-out); }
.footer__bar-links a:hover { color: var(--text); }

/* Giant wordmark at the bottom of the footer */
.footer__wordmark {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0.78;
  padding-bottom: var(--sp-2);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
}

.footer__wordmark span {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, -0.5rem + 15.5vw, 15rem);
  letter-spacing: -0.045em;
  color: var(--text);
  opacity: 0.12;
  white-space: nowrap;
  text-align: center;
}

/* Back-to-top */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: calc(var(--z-header) - 1);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--text-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all var(--dur) var(--ease-out);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-3px); }
.to-top svg { width: 16px; height: 16px; }
