/* ==========================================================================
   TNL — workshop landing page
   Design system: dark navy ground, gold accent, serif display, mono labels.
   Geometry is deliberately sharp (2px radius) — that squareness is the look.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */
:root {
  /* ground */
  --ink-950: #060a13;   /* page background */
  --ink-900: #0a0f1c;   /* section alt */
  --ink-850: #0c1322;   /* raised panel */
  --ink-800: #111a2c;   /* panel hover */

  /* type on dark */
  --fg:      #e7ecf6;
  --fg-hi:   #f2f5fb;
  --fg-2:    #b7c2da;
  --fg-mut:  #8d9bba;
  --fg-dim:  #7482a6;

  /* light section */
  --paper:      #f6f7fa;
  --paper-2:    #ffffff;
  --paper-ink:  #0b1220;
  --paper-mut:  #5a6580;
  --paper-line: #e2e6f0;

  /* accent — the whole page keys off this one hue.
     TNL's in-app accent is #7b6cff; swap --gold to it to re-brand. */
  --gold:      #d6b266;
  --gold-hi:   #f2d89b;
  --gold-lo:   #a67c1e;
  --gold-soft: rgba(214, 178, 102, 0.09);
  --gold-line: rgba(214, 178, 102, 0.22);

  /* semantic */
  --up:      #2fb59c;
  --up-hi:   #7fd9c8;
  --down:    #db5148;
  --down-hi: #ff9c95;

  /* structure */
  --hair:      rgba(255, 255, 255, 0.09);
  --hair-soft: rgba(255, 255, 255, 0.05);
  --radius:    2px;
  --wrap:      1170px;
  --pad-y:     clamp(56px, 8vw, 96px);

  /* type stacks */
  --serif: "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans:  "Noto Sans SC", Inter, system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

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

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* --- layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.sec {
  position: relative;
  padding-block: var(--pad-y);
  /* anchor jumps must clear the fixed header, or they land on a cropped heading */
  scroll-margin-top: 72px;
}

.sec--paper {
  background: var(--paper);
  color: var(--paper-ink);
}

.sec--alt { background: var(--ink-900); }

/* hairline that reads as a seam between sections */
.sec + .sec:not(.sec--paper) { border-top: 1px solid var(--hair-soft); }

.narrow { max-width: 760px; }
.center  { text-align: center; margin-inline: auto; }

/* --- typography --------------------------------------------------------- */

/* mono eyebrow — the page's signature label. Wide tracking, small, gold. */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.75;
}
.sec--paper .eyebrow { color: var(--gold-lo); }
.eyebrow--up   { color: var(--up);   letter-spacing: 0.24em; }
.eyebrow--down { color: var(--down); letter-spacing: 0.24em; }

.h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(34px, 6.4vw, 60px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--fg-hi);
}

.h2 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--fg-hi);
}
.sec--paper .h2 { color: var(--paper-ink); }

.h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.45;
  color: var(--fg-hi);
}

.h4 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg-hi);
}

.lede {
  font-size: clamp(15px, 1.6vw, 16.5px);
  line-height: 1.85;
  color: var(--fg-mut);
}
.sec--paper .lede { color: var(--paper-mut); }

.small { font-size: 14px; line-height: 1.8; color: var(--fg-mut); }

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--fg-mut);
}

.gold  { color: var(--gold); }
.tabnum { font-variant-numeric: tabular-nums; }

/* section head block — eyebrow / h2 / lede, used by every section */
.head { max-width: 720px; }
.head .eyebrow { margin-bottom: 18px; }
.head .h2 + .lede { margin-top: 18px; }
.head--center { margin-inline: auto; text-align: center; }

/* fine print / legal */
.fineprint {
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 34px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease,
              border-color .18s ease, box-shadow .18s ease;
  will-change: transform;
}

.btn--primary {
  background: linear-gradient(90deg, var(--gold-hi), var(--gold));
  color: #1a1204;
  font-weight: 500;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(214, 178, 102, .55),
              0 1px 0 rgba(255, 255, 255, .25) inset;
}

.btn--ghost {
  border-color: var(--gold-line);
  color: var(--fg-2);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--fg-hi);
  background: var(--gold-soft);
}

.btn--block { width: 100%; }

.btn:active { transform: translateY(0); }

/* --- panels & cards ----------------------------------------------------- */
.panel {
  position: relative;
  background: linear-gradient(var(--ink-850), var(--ink-950));
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.card {
  position: relative;
  padding: 26px;
  background: var(--ink-850);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow: hidden;
}
/* the tint wash every card in the reference carries */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--gold-soft), transparent 65%);
  pointer-events: none;
}
.card > * { position: relative; }

.card--down::before { background: linear-gradient(180deg, rgba(219, 81, 72, .07), transparent 60%); }
.card--up::before   { background: linear-gradient(180deg, rgba(47, 181, 156, .07), transparent 60%); }

/* small mono chip used for feature keywords */
.chip {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  background: rgba(255, 255, 255, .02);
}

/* thin gold rule used under section heads */
.rule {
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  border: 0;
  margin: 0;
}

/* --- decorative layers -------------------------------------------------- */
.grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .043) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
}

.glow {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(circle, rgba(214, 178, 102, .19), transparent 64%);
}

/* --- grids -------------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* --- scroll reveal ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1),
              transform .7s cubic-bezier(.22, .61, .36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

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

/* --- utility ------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.stack-8  > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.stack-32 > * + * { margin-top: 32px; }
