/* Nocturne — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #d78c29; /* AMBER — owner ruling 2026-08-02 (supersedes the
     Nocturne-native blurple #9184d9 this site launched with). oklch(0.70
     0.14 68): the amber recipe from the design handoff's _applyAccent,
     step 500 of the shared lightness scale. The blurple ramp survives
     verbatim in design_handoff_mentato_homepage/_ds/.../styles.css if a
     revert is ever wanted. */
  --color-accent-2: #d09e67; /* same hue at L 0.734, chroma at the 2:3
     proportion accent-2 holds relative to the accent (0.0933) */
  /* Kept as the public name (.hr, .table and every page reference it), but it
     is now an alias of --edge rather than a second, near-identical edge value
     — 16% of #e9e9ed vs 14% of #f3f5fe was two tokens doing one job. */
  --color-divider: var(--edge);

  /* ── Text + edge alpha ladder (2026-08-23) ───────────────────────────
     Fixed steps. Every secondary text colour and every resting edge pulls
     from these six values and nothing else. Before this the site carried
     11 distinct text alphas (52/55/56/60/64/72/74/76/78/84/88) and 5
     distinct edge alphas (10/12/14/16/26); the 74/76/78 cluster alone ran
     86 times and no eye separates those three. Ad-hoc percentages are the
     single loudest "almost" signal in a dark UI, so they are banned here:
     add a step, do not add a percentage.
     Fills are a different role and keep their own 3/6/9% ramp. */
  --text-1: var(--color-text);                                      /* primary */
  --text-2: color-mix(in srgb, var(--color-text) 88%, transparent); /* lead paragraph */
  --text-3: color-mix(in srgb, var(--color-text) 76%, transparent); /* body secondary */
  --text-4: color-mix(in srgb, var(--color-text) 56%, transparent); /* muted / meta */
  --edge:     color-mix(in srgb, var(--color-neutral-100) 14%, transparent); /* resting edge */
  --edge-lit: color-mix(in srgb, var(--color-neutral-100) 26%, transparent); /* lit top edge */

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f3f5fe;
  --color-neutral-200: #e4e7f5;
  --color-neutral-300: #cfd3e5;
  --color-neutral-400: #b2b6ca;
  --color-neutral-500: #9397ab;
  --color-neutral-600: #75798c;
  --color-neutral-700: #595d6c;
  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  /* ────────────────────────────────────────────────────────────────────
     Accent swap procedure (owner requirement: swap the accent color
     after launch with a ~10-line change, right here). Swapping means
     replacing three things, all in this file: --color-accent (above),
     --color-accent-2 (above), and the --color-accent-100…900 ramp below.
     Nothing else in the codebase hard-codes an accent hex — site/index.html
     reads --color-accent from getComputedStyle at runtime for the canvas
     constellation, and every other accent use is a var() reference.

     To generate a new ramp: OKLCH with one shared lightness scale across
     steps 100–900 — L = [0.93, 0.86, 0.79, 0.74, 0.70, 0.60, 0.50, 0.40,
     0.31] — and a per-theme hue + chroma curve. Candidate themes from the
     design file (Mentato Home.dc.html, _applyAccent):
       amber:    hue 68,  chroma [.05, .08, .11, .13, .14, .13, .11, .09, .07]
       teal:     hue 200, chroma [.04, .06, .08, .10, .11, .10, .09, .07, .06]
       green:    hue 152, chroma [.05, .07, .09, .11, .12, .11, .10, .08, .06]
       burgundy: hue 18,  chroma [.04, .06, .09, .11, .12, .12, .11, .09, .07]
     Each ramp step is oklch(L[i] chroma[i] hue). --color-accent itself is
     step 500's color: L 0.70 with the step-500 chroma (the 5th entry in
     the chroma array above).
     --color-accent-2 follows the same hue at L 0.734, chroma at the same
     2:3 proportion it holds relative to the accent.
     Current ramp: AMBER (hue 68), computed 2026-08-02 from the recipe
     above. Note the --color-accent-2-100…900 ramp below is still the
     original blurple family — nothing on the site uses it (tag-accent-2
     is unused); regenerate it before ever using those classes.
     ──────────────────────────────────────────────────────────────────── */
  --color-accent-100: #ffe2c5;
  --color-accent-200: #f5c898;
  --color-accent-300: #e9ad6a;
  --color-accent-400: #e09a46;
  --color-accent-500: #d78c29;
  --color-accent-600: #b26f06;
  --color-accent-700: #8b5500;
  --color-accent-800: #673d00;
  --color-accent-900: #472800;

  --color-accent-2-100: #f5f4ff;
  --color-accent-2-200: #e7e5fe;
  --color-accent-2-300: #d2cefd;
  --color-accent-2-400: #b5afe8;
  --color-accent-2-500: #9690c9;
  --color-accent-2-600: #7972a9;
  --color-accent-2-700: #5c5783;
  --color-accent-2-800: #423e5d;
  --color-accent-2-900: #2b293a;

  /* Deck section-divider ground — review round 3: saturation as presence.
     Dividers take a saturated deep indigo (hue 277, the neutral ramp's own
     family; C 0.094 — written when the accent held C 0.030, before the
     round-7 blurple raised it past the ground's) with a lighter bloom and
     a ghost tint of the same hue, while the slide grounds stay
     desaturated. Deck-scale fills only — not interface colors. */
  --color-section: #262a60;
  --color-section-glow: #353b80;
  --color-section-ghost: #4c5397;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0,0,0,0.65);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.lighten{mix-blend-mode:lighten;background-color:transparent}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  margin: 0 0 var(--space-2);
}
/* Optical tracking scale (2026-08-23). Tracking tightens and leading closes as
   size grows — one flat -0.015em/1.12 across a 13px-to-42px range leaves the
   large end looking loose and set-by-default. Values are per element because
   several pages set font-size inline on a bare h1/h2/h3. */
h1 { font-size: 42px; line-height: 1.06; letter-spacing: -0.030em; }
h2 { font-size: 32px; line-height: 1.10; letter-spacing: -0.022em; }
h3 { font-size: 25px; line-height: 1.14; letter-spacing: -0.018em; }
h4 { font-size: 20px; line-height: 1.18; letter-spacing: -0.014em; }
h5 { font-size: 16px; line-height: 1.22; letter-spacing: -0.008em; }
h6 { font-size: 13px; line-height: 1.25; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: var(--text-4);
}
.text-muted { color: var(--text-4); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: var(--color-accent); color: var(--color-bg); }

/* — rules — */
/* Rules fade to transparent at both ends instead of stopping cleanly — a
   Nocturne signature. The ramp is 48px an end (one deck baseline unit),
   painted from the same divider token. Freestanding rules fade; box
   outlines, in-control separators, and short accent marks stay solid. */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* Solid conversion CTA (2026-08-23, Casper teardown adoption). The outline
   .btn-primary stays the default; .btn-solid is reserved for the page's ONE
   main conversion point (hero card, closer, end-of-page CTA) so the fill
   keeps its pull. Filled amber on the dark ground, near-black text. */
.btn-solid {
  color: var(--color-bg);
  background: linear-gradient(180deg, var(--color-accent-400) 0%, var(--color-accent-500) 100%);
  /* Casper-scale conversion button (owner 2026-08-24): ~46px tall, 10px
     radius, a translucent 3px rim that reads as glass over the fill, and an
     ambient glow. Their purple recipe, this palette's amber. */
  padding: 12px 22px;
  border: 3px solid color-mix(in srgb, var(--color-neutral-100) 22%, transparent);
  border-radius: 10px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--color-accent-100) 18%, transparent) inset,
              0 0 8px color-mix(in srgb, var(--color-accent-500) 8%, transparent);
}
.btn-solid:hover {
  background: linear-gradient(180deg, var(--color-accent-300) 0%, var(--color-accent-400) 100%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--color-accent-100) 20%, transparent) inset,
              0 0 12px color-mix(in srgb, var(--color-accent-400) 12%, transparent);
}
.btn-solid:active { background: var(--color-accent-600); }
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: var(--text-3);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: var(--text-4);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — glow card — */
/* The Casper CTA-card effect (their version is a WebGL fragment shader;
   this is two blurred ambers drifting on a compositor-cheap transform loop).
   Requires .glass on the same element: its backdrop-filter creates the
   stacking context that lets the z-index:-1 layer sit above the card ground
   but under every child. */
.glow-card { position: relative; overflow: hidden; }
.glow-card::before {
  content: ""; position: absolute; inset: -45%; z-index: -1;
  background:
    radial-gradient(38% 38% at 30% 32%, color-mix(in srgb, var(--color-accent-600) 30%, transparent), transparent 70%),
    radial-gradient(34% 34% at 72% 68%, color-mix(in srgb, var(--color-accent-800) 55%, transparent), transparent 70%);
  filter: blur(18px);
  animation: glow-drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow-drift {
  from { transform: translate(-6%, -5%) rotate(0deg) scale(1); }
  to   { transform: translate(7%, 6%) rotate(30deg) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) { .glow-card::before { animation: none; } }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-accent-2 { background: var(--color-accent-2-800); color: var(--color-accent-2-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-4);
  padding: var(--space-2); border-bottom: 1px solid transparent; /* keeps layout; the row paints the fading rule */
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid transparent;
}
/* Row rules as row-level strips so the end-fade spans the row, not each cell. */
.table thead tr {
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr {
  background: linear-gradient(to right,
    transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr:hover {
  /* the hover tint layers over the row rule, which keeps painting */
  background:
    linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent),
                    color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%,
    linear-gradient(to right,
      transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
      color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* Shared site nav. Mobile: page links collapse behind a hamburger;
   the dropdown anchors to the nav element (nav.js toggles .nav-open). */
.pg-navlink:hover { color: var(--color-text) !important; }
/* Explicit column pins: when .nav-links is display:none (mobile, menu
   closed) it stops generating a grid item, and auto-placement would slide
   .nav-right into the center column — the burger visibly floats to the
   middle of the bar. Pin all three so the bar never reflows. */
.nav-brand { grid-column: 1; }
.nav-links { display: flex; align-items: center; gap: 28px; justify-self: center; grid-column: 2; }
.nav-right { grid-column: 3; }
.nav-burger { display: none; background: none; border: 0; padding: 6px; margin: 0; cursor: pointer; color: var(--color-text); }
.nav-burger svg { display: block; }
.nav-menu-cta { display: none; } /* lives only inside the mobile menu */
@media (max-width: 760px) {
  .site-nav { padding: 16px 24px !important; position: relative; }
  .site-nav, .pg-nav-inner { gap: 14px !important; }
  .nav-burger { display: inline-flex; position: relative; z-index: 80; }
  .nav-brand { position: relative; z-index: 80; }
  /* The bar CTA moves into the menu on mobile (Casper pattern, 2026-08-24):
     the top bar is logo + burger only; the menu is a full-screen blurred
     overlay with staggered rows and the CTA as a full-width solid button. */
  .nav-right .btn { display: none; }
  .nav-links { display: none; }
  .nav-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; inset: 0; z-index: 70;
    /* abspos grid child: the base rule's justify-self:center would shrink it
       to content width inside the inset rect — force the full viewport. */
    justify-self: stretch; align-self: stretch; width: 100%; height: 100%;
    padding: 104px 24px 28px;
    background: color-mix(in srgb, var(--color-bg) 90%, transparent);
    -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
    animation: nav-overlay .3s ease both;
  }
  .nav-open .nav-links a {
    padding: 18px 2px; font-size: 21px !important;
    border-top: 1px solid var(--edge);
    animation: nav-row .42s cubic-bezier(.22,.61,.36,1) both;
  }
  .nav-open .nav-links a:nth-child(1) { animation-delay: .05s; }
  .nav-open .nav-links a:nth-child(2) { animation-delay: .09s; }
  .nav-open .nav-links a:nth-child(3) { animation-delay: .13s; }
  .nav-open .nav-links a:nth-child(4) { animation-delay: .17s; }
  .nav-open .nav-links a:nth-child(5) { animation-delay: .21s; }
  .nav-open .nav-links a.nav-menu-cta {
    display: inline-flex; justify-content: center;
    margin-top: auto; border-top: 0;
    padding: 13px 18px; font-size: 16px !important;
    animation-delay: .25s;
  }
  .nav-burger .i-x { display: none; }
  .nav-open .nav-burger .i-burger { display: none; }
  .nav-open .nav-burger .i-x { display: block; }
  html.menu-open, html.menu-open body { overflow: hidden; }
}
@keyframes nav-overlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes nav-row { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .nav-open .nav-links, .nav-open .nav-links a { animation: none !important; }
}
