/* ==========================================================================
   bonu7 game — main.css
   Reset · ambient background · layout · header · footer · buttons · cards ·
   motion primitives. Loaded on every page.

   Light theme. Depth comes from soft neutral shadow and hairlines, not glow;
   saturated crimson is reserved for actions and the dark brand bands.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  overflow-x: clip;
}

body {
  min-height: 100vh;
  background: var(--ink-1000);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.72;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;              /* nothing may push the document sideways */
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.028em;
  color: var(--text-hi);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); letter-spacing: -0.018em; }

p { text-wrap: pretty; }

a { color: var(--em-700); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--em-800); }
/* :not(.btn) matters. `.inverse a` is (0,1,1) and would otherwise out-specify
   `.btn--primary` (0,1,0), repainting white button labels pale green on the
   crimson gradient inside every dark band. */
.inverse a:not(.btn) { color: var(--em-300); }
.inverse a:not(.btn):hover { color: var(--em-200); }

ul, ol { padding-inline-start: 1.15em; }
li { margin-block: 0.35em; }

strong, b { color: var(--text-hi); font-weight: 700; }

hr {
  border: 0;
  height: 1px;
  background: var(--stroke);
  margin-block: var(--sp-6);
}

::selection { background: rgba(229,52,44,.22); color: var(--text-hi); }

:focus-visible {
  outline: 2px solid var(--em-600);
  outline-offset: 3px;
  border-radius: 2px;
}
.inverse :focus-visible { outline-color: var(--em-300); }

/* Custom scrollbar */
* { scrollbar-color: var(--ink-600) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 99px; border: 2px solid var(--ink-950); }
::-webkit-scrollbar-thumb:hover { background: var(--em-500); }

.skip-link {
  position: absolute;
  left: var(--sp-4); top: -100px;
  z-index: var(--z-top);
  padding: 0.75rem 1.25rem;
  background: var(--em-700);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  clip-path: var(--cut-one);
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

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

/* --------------------------------------------------------------------------
   2. Ambient background — the living paper
   Fixed behind everything. Transform/opacity only, zero layout cost.
   On light ground these read as washes of coloured light rather than haze,
   so the opacities are deliberately far lower than a dark build would use.
   -------------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

/* 2a. Aurora — three blurred washes drifting on long, offset cycles. */
.ambient__aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  opacity: 0.85;
}
.ambient__aurora--a {
  width: 62vw; height: 62vw;
  max-width: 920px; max-height: 920px;
  top: -20vw; left: -14vw;
  background: radial-gradient(circle at 50% 50%, rgba(229,52,44,.30) 0%, rgba(255,106,85,.12) 45%, transparent 70%);
  animation: drift-a 46s var(--ease-io) infinite;
}
.ambient__aurora--b {
  width: 54vw; height: 54vw;
  max-width: 800px; max-height: 800px;
  top: 26vh; right: -18vw;
  background: radial-gradient(circle at 50% 50%, rgba(255,106,85,.24) 0%, rgba(229,52,44,.09) 48%, transparent 72%);
  animation: drift-b 61s var(--ease-io) infinite;
}
.ambient__aurora--c {
  width: 46vw; height: 46vw;
  max-width: 660px; max-height: 660px;
  bottom: -16vw; left: 22vw;
  background: radial-gradient(circle at 50% 50%, rgba(201,162,75,.20) 0%, rgba(236,208,138,.08) 50%, transparent 72%);
  animation: drift-c 74s var(--ease-io) infinite;
}
@keyframes drift-a {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  33%     { transform: translate3d(9vw, 7vh, 0) scale(1.14); }
  66%     { transform: translate3d(-4vw, 13vh, 0) scale(0.92); }
}
@keyframes drift-b {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  40%     { transform: translate3d(-11vw, -9vh, 0) scale(1.18); }
  70%     { transform: translate3d(-3vw, 8vh, 0) scale(0.9); }
}
@keyframes drift-c {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50%     { transform: translate3d(12vw, -11vh, 0) scale(1.22); }
}

/* 2b. Facet mesh — the gem motif made ambient. Markup supplies the SVG. */
.ambient__mesh {
  position: absolute;
  top: 50%; left: 50%;
  width: 160vmax; height: 160vmax;
  transform: translate(-50%, -50%);
  opacity: 0.16;
  will-change: transform;
  animation: mesh-spin 90s linear infinite;
}
.ambient__mesh svg { width: 100%; height: 100%; }
@keyframes mesh-spin {
  from { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  50%  { transform: translate(-50%, -50%) rotate(180deg) scale(1.08); }
  to   { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

/* 2c. Light shafts — slow sweep, adds depth without noise. */
.ambient__shafts {
  position: absolute;
  inset: -20% -10%;
  background:
    linear-gradient(102deg, transparent 12%, rgba(229,52,44,.055) 20%, transparent 27%),
    linear-gradient(96deg, transparent 52%, rgba(255,106,85,.045) 61%, transparent 69%),
    linear-gradient(108deg, transparent 76%, rgba(201,162,75,.05) 84%, transparent 91%);
  will-change: transform;
  animation: shaft-slide 38s ease-in-out infinite alternate;
}
@keyframes shaft-slide {
  from { transform: translate3d(-4%, 0, 0); }
  to   { transform: translate3d(4%, 0, 0); }
}

/* 2d. Grain — multiply on light so it reads as paper tooth, not TV static. */
.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* 2e. Vignette — a soft white halo that keeps the centre column clean and
   stops the aurora crowding the edges of the type. */
.ambient__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 58% at 50% 42%, rgba(255,255,255,.72) 0%, rgba(255,255,255,.30) 55%, transparent 78%),
    linear-gradient(180deg, rgba(251,253,252,.85) 0%, transparent 22%, transparent 80%, rgba(251,253,252,.9) 100%);
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--wide { max-width: var(--shell-wide); }
.shell--prose { max-width: 760px; }

.band { padding-block: var(--band); position: relative; }
.band--tight { padding-block: calc(var(--band) * 0.62); }
.band--sunk {
  background: linear-gradient(180deg, transparent, var(--ink-950) 12%, var(--ink-950) 88%, transparent);
}

main { position: relative; z-index: var(--z-content); }

.stack > * + * { margin-block-start: var(--flow, 1.15em); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
/* 300px rather than 265px: at 1240 the smaller floor packed four columns in
   and the category subtitles wrapped three ways. Three columns reads better. */
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* --------------------------------------------------------------------------
   4. The facet — signature shape language
   A single element gets a cut silhouette AND a 1px hairline with no extra
   markup: the ::before pseudo is clipped by the parent and inset by 1px, so
   the parent's background colour reads as the stroke on every edge including
   the diagonals. Glow uses filter:drop-shadow so it traces the cut silhouette
   rather than a phantom rectangle (box-shadow would be clipped away).
   -------------------------------------------------------------------------- */
.gem {
  position: relative;
  clip-path: var(--cut-gem);
  background: var(--stroke);           /* becomes the hairline */
  isolation: isolate;
  filter: drop-shadow(0 2px 6px rgba(5,39,28,.05)) drop-shadow(0 10px 22px rgba(5,39,28,.055));
}
.gem::before {
  content: '';
  position: absolute;
  inset: 1px;
  clip-path: var(--cut-gem);
  /* Two layers in ONE shorthand. Declaring background-image separately would
     overwrite --gem-fill whenever a section overrides it with a gradient. */
  background: var(--grad-glass), var(--gem-fill, var(--surface));
  z-index: -1;
}
.gem--alt { clip-path: var(--cut-alt); }
.gem--alt::before { clip-path: var(--cut-alt); }
.gem--one { clip-path: var(--cut-one); }
.gem--one::before { clip-path: var(--cut-one); }
.gem--panel { clip-path: var(--cut-panel); }
.gem--panel::before { clip-path: var(--cut-panel); }
.gem--hot { background: var(--stroke-hot); }
.gem--flat { filter: none; }
.gem--flat::before { background: var(--gem-fill, var(--surface)); }
/* Inside a dark band the paper shadow is invisible and just costs paint. */
.inverse .gem { filter: none; }

/* Angular divider — a chevron-kinked stroke, never a flat <hr>. */
.rule {
  width: 100%;
  height: 14px;
  overflow: hidden;
  opacity: .8;
}
.rule svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.92em 1.7em;
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: -0.011em;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  border: 0;
  position: relative;
  clip-path: var(--cut-one);
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease),
              color var(--t) var(--ease);
  will-change: transform;
}
.btn:focus-visible { outline-offset: 4px; }
.btn .ico { width: 1.15em; height: 1.15em; flex: none; }

/* Primary — the money button. The gradient stays in the deep half of the
   red ramp so white label text clears AA at every stop (7.5:1+). */
.btn--primary {
  background: var(--grad-em);
  background-size: 200% 100%;
  color: #fff;
  box-shadow: var(--glow-em);
  overflow: hidden;
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: -60%; bottom: -60%;
  left: -30%;
  width: 22%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent);
  transform: skewX(-18deg) translateX(-260%);
  animation: sheen 5.5s var(--ease) infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 62% { transform: skewX(-18deg) translateX(-260%); }
  86%,100% { transform: skewX(-18deg) translateX(760%); }
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: var(--glow-em-lg);
  color: #fff;
}
.btn--primary:active { transform: translateY(0); }

/* Ghost — paper card with a hairline, fills with crimson tint on hover. */
.btn--ghost {
  background: var(--surface);
  color: var(--text-hi);
  box-shadow: inset 0 0 0 1px var(--stroke), var(--shade-sm);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(229,52,44,.09);
  box-shadow: inset 0 0 0 1px var(--stroke-hot), var(--glow-sm);
  color: var(--em-800);
  transform: translateY(-2px);
}
.inverse .btn--ghost { background: rgba(255,255,255,.06); color: var(--text-hi); }
.inverse .btn--ghost:hover { background: rgba(255,106,85,.14); color: var(--em-200); }

/* Telegram support — deliberately NOT the brand palette, so 1:1 help is
   never confused with the community channel. See .btn--community. */
/* Stops held dark enough for white labels: the lightest (#1a7cb0) is 4.6:1. */
.btn--support {
  background: linear-gradient(135deg, #115b85 0%, #1a7cb0 55%, #14699b 100%);
  color: #fff;
  box-shadow: var(--glow-tg);
}
.btn--support:hover, .btn--support:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -12px rgba(28,134,192,.55);
  color: #fff;
}

/* Community channel — brand red, outlined. Reads as "ours", not "help". */
.btn--community {
  background: rgba(229,52,44,.11);
  color: var(--em-800);
  box-shadow: inset 0 0 0 1px var(--stroke-hot);
}
.btn--community:hover, .btn--community:focus-visible {
  background: rgba(229,52,44,.20);
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px var(--stroke-hot), var(--glow-sm);
  color: var(--em-800);
}
.inverse .btn--community { background: rgba(163,34,31,.34); color: var(--em-200); }
.inverse .btn--community:hover { background: rgba(163,34,31,.5); color: var(--em-200); }

.btn--gold {
  background: var(--grad-gold);
  color: #fff;
  box-shadow: var(--glow-gold);
}
.btn--gold:hover, .btn--gold:focus-visible { transform: translateY(-2px); color: #fff; }

.btn--sm { padding: 0.68em 1.15em; font-size: var(--step--1); }
.btn--lg { padding: 1.08em 2.2em; font-size: var(--step-1); }
.btn--block { width: 100%; }

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

/* --------------------------------------------------------------------------
   6. Chips, badges, eyebrows
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--em-700);
}
.eyebrow::before {
  content: '';
  width: 26px; height: 1px;
  background: var(--grad-edge);
  flex: none;
}
.inverse .eyebrow { color: var(--em-300); }
.eyebrow--gold { color: var(--gold-lo); }
.eyebrow--gold::before { background: linear-gradient(90deg, transparent, var(--gold-lo)); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.42em 0.9em;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-mid);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--stroke);
  clip-path: var(--cut-one);
  white-space: nowrap;
}
.chip .ico { width: 1em; height: 1em; flex: none; }
.chip--em { color: var(--em-800); background: rgba(229,52,44,.10); box-shadow: inset 0 0 0 1px var(--stroke-hot); }
.chip--gold { color: var(--gold-lo); background: rgba(201,162,75,.12); box-shadow: inset 0 0 0 1px rgba(201,162,75,.36); }
.inverse .chip { background: rgba(255,255,255,.05); color: var(--text-mid); }
.inverse .chip--em { color: var(--em-200); background: rgba(163,34,31,.34); }
.inverse .chip--gold { color: var(--gold-hi); background: rgba(143,111,44,.30); }

.badge-feature {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 3;
  padding: 0.28em 0.66em;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #24190a;
  background: linear-gradient(135deg, #e0bd70, #f2dda6 50%, #d4ad57);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  box-shadow: 0 2px 8px rgba(5,39,28,.22);
}

/* --------------------------------------------------------------------------
   7. Section headers
   -------------------------------------------------------------------------- */
.sec-head { max-width: 760px; margin-block-end: var(--sp-7); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .eyebrow { justify-content: center; }
.sec-head h2 { margin-block: 0.4em 0.5em; }
.sec-head p { font-size: var(--step-1); color: var(--text-low); line-height: 1.62; }

.sec-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  max-width: none;
}
.sec-head--split > div { max-width: 640px; }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  padding: clamp(1.35rem, 1rem + 1.4vw, 2.1rem);
  transition: transform var(--t-slow) var(--ease), filter var(--t-slow) var(--ease);
  height: 100%;
}
.card h3 { margin-block-end: 0.55em; }
.card p { color: var(--text-low); font-size: var(--step-0); }
.card:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 4px 10px rgba(5,39,28,.07)) drop-shadow(0 18px 34px rgba(6,62,44,.14));
}
.inverse .card:hover { filter: drop-shadow(0 18px 36px rgba(0,0,0,.5)); }

.card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  margin-block-end: var(--sp-4);
  background: linear-gradient(150deg, rgba(229,52,44,.16), rgba(255,106,85,.07));
  box-shadow: inset 0 0 0 1px var(--stroke-hot);
  clip-path: var(--cut-one);
  color: var(--em-700);
}
.card__icon .ico { width: 22px; height: 22px; }
.inverse .card__icon { color: var(--em-300); background: linear-gradient(150deg, rgba(255,106,85,.20), rgba(163,34,31,.10)); }

/* --------------------------------------------------------------------------
   9. Announcement ribbon — a deep crimson bar above the header. One of the
   few dark surfaces on the page, and the reason the header reads as "chrome".
   -------------------------------------------------------------------------- */
.ribbon {
  position: relative;
  z-index: var(--z-header);
  background: linear-gradient(90deg, #200705 0%, #4a0f0d 45%, #200705 100%);
  overflow: hidden;
}
.ribbon::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--grad-edge);
  opacity: .6;
}
.ribbon__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 40px;
  padding-block: 0.4rem;
  text-align: center;
}
.ribbon__track { position: relative; flex: 1; min-height: 1.4em; }
.ribbon__msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: #d7f5e5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  pointer-events: none;
}
.ribbon__msg.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ribbon__msg .ico { width: 1em; height: 1em; flex: none; color: var(--gold-hi); }
.ribbon__msg strong { color: #fff; }
/* The message text is wrapped in a single <span> on purpose: bare text runs
   inside a flex container become separate flex items and break into columns. */
.ribbon__msg > span { display: block; }
.ribbon__pause {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: transparent;
  border: 0;
  color: #ff9585;
  cursor: pointer;
  opacity: .7;
  transition: opacity var(--t) var(--ease);
}
.ribbon__pause:hover { opacity: 1; }
.ribbon__pause .ico { width: 13px; height: 13px; }

/* At phone widths the longest message wraps to three lines and the bar starts
   to dominate the fold. Tighten type and drop the leading icon. */
@media (max-width: 519px) {
  .ribbon__inner { gap: var(--sp-2); }
  .ribbon__msg { font-size: 0.78rem; line-height: 1.4; }
  .ribbon__msg .ico { display: none; }
  .ribbon__track { min-height: 2.6em; }
}

/* --------------------------------------------------------------------------
   10. Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-block-end: 1px solid var(--stroke-soft);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.header.is-stuck {
  background: rgba(255,255,255,.93);
  border-block-end-color: var(--stroke);
  box-shadow: 0 10px 30px -18px rgba(5,39,28,.32);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; flex: none; }
.brand img {
  height: clamp(40px, 4.8vw, 58px);
  width: auto;
  transition: transform var(--t) var(--ease);
}
.brand:hover img { transform: translateY(-1px); }

.nav { margin-inline-start: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 0.1rem + 1.1vw, 1.35rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.35rem;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
}
.nav__link:hover { color: var(--text-hi); }
/* Kinked chevron underline, not a flat bar. */
.nav__link::after {
  content: '';
  position: absolute;
  left: 0.35rem; right: 0.35rem;
  bottom: 0.22rem;
  height: 5px;
  background:
    linear-gradient(135deg, transparent 49%, var(--em-600) 49%, var(--em-600) 62%, transparent 62%) left / 8px 100% no-repeat,
    linear-gradient(90deg, var(--em-600), var(--em-600)) 8px bottom / calc(100% - 8px) 1.5px no-repeat;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { opacity: 1; transform: translateY(0); }
.nav__link[aria-current="page"] { color: var(--em-700); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
}

.burger {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--stroke), var(--shade-sm);
  clip-path: var(--cut-one);
  color: var(--text-hi);
  cursor: pointer;
  border: 0;
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px;
  width: 18px; height: 1.5px;
  background: currentColor;
  transition: transform var(--t) var(--ease), opacity var(--t-fast) var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 20.5px; }
.burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* The drawer lives INSIDE .header, which is a stacking context (sticky +
   z-index). So the drawer's z-index resolves against the header, not the page,
   and a scrim above the header would paint over the drawer too. Keep the scrim
   below the header instead: it dims the page, the header bar stays crisp. */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-header) - 5);
  background: rgba(5,39,28,.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t);
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }

@media (max-width: 1023px) {
  .burger { display: block; }
  /* GOTCHA: the nav leaves flex flow when it goes fixed, so the actions group
     loses whatever was pushing it right. Give it its own auto margin. */
  .header-actions { margin-inline-start: auto; }
  .header__inner { gap: var(--sp-3); }

  .nav {
    position: fixed;
    top: 0; right: 0;
    z-index: var(--z-nav);
    width: min(340px, 86vw);
    height: 100dvh;
    margin-inline-start: 0;
    padding: calc(var(--header-h) + 2rem) var(--sp-5) var(--sp-6);
    background: var(--grad-vault);
    border-inline-start: 1px solid var(--stroke);
    box-shadow: -30px 0 70px -20px rgba(5,39,28,.35);
    transform: translateX(102%);
    transition: transform 380ms var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: 0.95rem 0.25rem;
    font-size: var(--step-1);
    border-block-end: 1px solid var(--stroke-soft);
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--em-700); }
  .nav__cta { margin-block-start: var(--sp-5); display: grid; gap: var(--sp-3); }
}

@media (min-width: 1024px) {
  .nav__cta { display: none; }
}
/* GOTCHA: scope the hide to its container so the later .btn{display:inline-flex}
   cannot win on specificity. */
@media (max-width: 767px) {
  .header-actions .header-cta-desktop { display: none; }
}

/* --------------------------------------------------------------------------
   11. Footer — one of the dark islands. Carries .inverse in the markup.
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: var(--z-content);
  margin-block-start: var(--sp-9);
  background: var(--grad-deep);
  color: var(--text-mid);
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--grad-edge);
  opacity: .5;
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: var(--sp-6) var(--sp-5);
  padding-block: var(--sp-8) var(--sp-6);
}
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }

.footer__brand img { height: 46px; width: auto; margin-block-end: var(--sp-4); }
.footer__brand p { font-size: var(--step--1); color: var(--text-low); max-width: 34ch; }
.footer__social { display: flex; gap: var(--sp-2); margin-block-start: var(--sp-4); }
.footer__social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px var(--stroke);
  clip-path: var(--cut-one);
  color: var(--text-mid);
  transition: color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}
.footer__social a:hover { color: var(--em-200); background: rgba(163,34,31,.4); transform: translateY(-2px); }
.footer__social .ico { width: 17px; height: 17px; }

.footer__col h3 {
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-hi);
  margin-block-end: var(--sp-4);
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-block: 0; }
.footer__col a {
  display: block;
  padding-block: 0.42rem;
  font-size: var(--step--1);
  color: var(--text-low);
}
.footer__col a:hover { color: var(--em-300); }

.footer__notices {
  display: grid;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  border-block-start: 1px solid var(--stroke-soft);
}
.footer__notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  font-size: var(--step--1);
  line-height: 1.65;
  color: var(--text-low);
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 0 0 1px var(--stroke-soft);
  clip-path: var(--cut-one);
}
.footer__notice .ico { width: 20px; height: 20px; flex: none; margin-block-start: 2px; color: #e0a83c; }
.footer__notice--age .ico { color: #f4a49c; }
.footer__notice strong { display: block; color: var(--text-hi); margin-block-end: 0.15em; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-5) var(--sp-6);
  border-block-start: 1px solid var(--stroke-soft);
  font-size: var(--step--1);
  color: var(--text-faint);
}
.footer__legal nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer__legal a { color: var(--text-faint); }
.footer__legal a:hover { color: var(--em-300); }

.age-pill {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  color: #f4a49c;
  border: 1.5px solid #f4a49c;
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   12. Cookie consent
   -------------------------------------------------------------------------- */
.cookiebar {
  position: fixed;
  left: var(--gutter); right: var(--gutter);
  bottom: var(--sp-4);
  z-index: var(--z-overlay);
  max-width: 620px;
  margin-inline: auto;
  padding: var(--sp-5);
  filter: drop-shadow(0 18px 44px rgba(5,39,28,.24));
  transform: translateY(140%);
  transition: transform 520ms var(--ease);
}
.cookiebar.is-on { transform: translateY(0); }
.cookiebar h3 { font-size: var(--step-0); margin-block-end: 0.4em; }
.cookiebar p { font-size: var(--step--1); color: var(--text-low); margin-block-end: var(--sp-4); }
.cookiebar .btn-row { justify-content: flex-end; }

/* --------------------------------------------------------------------------
   13. Motion primitives
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }
/* No-JS and reduced-motion must never leave content invisible. */
.no-js .reveal { opacity: 1; transform: none; }

.page-fade { animation: page-in 520ms var(--ease) both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .ambient__aurora, .ambient__mesh, .ambient__shafts { animation: none !important; }
  .ambient { opacity: .6; }
}

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-gold { color: var(--gold-lo); }
.text-em { color: var(--em-700); }
.mono-num { font-variant-numeric: tabular-nums; }
.prose { max-width: var(--measure); }
.prose p + p { margin-block-start: 1.1em; }
.prose h3 { margin-block: 1.8em 0.6em; }
.flow-lg { --flow: 1.6em; }

.numeral {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 144;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico--fill { fill: currentColor; stroke: none; }
