/* ═══════════════════════════════════════════════════════════════════
   Trinn · marketing landing page
   Two themes: Atelier (light) · Midnight (dark)
   Monochrome + bronze. Editorial, calm, restrained.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted) ─────────────────────────────────────────── */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/Fraunces-300-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/Fraunces-300-600-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/SairaCondensed-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/SairaCondensed-600-normal.woff2') format('woff2');
}
/* Wordmark face 'Trinn Wordmark': a renamed Liberation Sans Bold subset (SIL OFL 1.1, see assets/fonts/LIBERATION-OFL.txt). */
@font-face {
  font-family: 'Trinn Wordmark';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/TrinnWordmark-700-normal.woff2') format('woff2');
}

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --wordmark: 'Trinn Wordmark', 'Liberation Sans', Arial, Helvetica, sans-serif;

  --pad-x: clamp(1.5rem, 6vw, 5rem);
  --measure: 34rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --theme-fade: 640ms;
}

:root[data-theme='midnight'] {
  color-scheme: dark;
  --bg: #15120d;
  --bg-panel: #1b1710;
  --ink: #ece5d8;
  --muted: #a89d8c;
  --faint: #868073;
  --bronze: #c49a68;
  --bronze-deep: #7a5a2e;
  --hairline: rgba(236, 229, 216, 0.14);
  --hairline-soft: rgba(236, 229, 216, 0.08);
  --glow: rgba(196, 154, 104, 0.16);
  --glow-soft: rgba(196, 154, 104, 0.07);
  --grain-opacity: 0.05;
}

:root[data-theme='atelier'] {
  color-scheme: light;
  --bg: #f1ece2;
  --bg-panel: #eae3d4;
  --ink: #241f18;
  --muted: #625a4d;
  --faint: #6f6656;
  --bronze: #7f5c33;
  --bronze-deep: #6f4f2a;
  --hairline: rgba(36, 31, 24, 0.16);
  --hairline-soft: rgba(36, 31, 24, 0.08);
  --glow: rgba(176, 137, 84, 0.15);
  --glow-soft: rgba(176, 137, 84, 0.07);
  --grain-opacity: 0.035;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-weight: 340;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--theme-fade) ease, color var(--theme-fade) ease;
}

/* Low golden light at the edges — dusk in a quiet room. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(110rem 60rem at 88% -12%, var(--glow), transparent 62%),
    radial-gradient(90rem 55rem at -10% 108%, var(--glow-soft), transparent 60%);
  transition: opacity var(--theme-fade) ease;
}

/* A whisper of grain so the surfaces read as material, not pixels. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: var(--grain-opacity);
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

::selection { background: var(--bronze); color: var(--bg); }

em { font-style: italic; }

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

:focus-visible {
  outline: 1px solid var(--bronze);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ── Shared type ─────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: clamp(1.75rem, 4vh, 3rem);
  transition: color var(--theme-fade) ease;
}

.stop { color: var(--bronze); transition: color var(--theme-fade) ease; }

.section-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  text-align: center;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(1.25rem, 3.5vw, 2.25rem) var(--pad-x);
}

.theme-toggle {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: var(--ink);
  border-radius: 50%;
  transition: color var(--theme-fade) ease;
}
.theme-toggle svg { width: 1.375rem; height: 1.375rem; overflow: visible; }
.theme-toggle .toggle-ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.theme-toggle .toggle-crescent {
  fill: currentColor;
  transform-origin: 12px 12px;
  transition: transform 640ms var(--ease-out);
}
:root[data-theme='atelier'] .toggle-crescent { transform: rotate(180deg); }
.theme-toggle:hover { color: var(--bronze); }
.theme-toggle:hover .toggle-ring { stroke: currentColor; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6rem var(--pad-x) 5rem;
  overflow: hidden;
}

/* Warmer pool of light behind the mark — the interest stays at the edges. */
.hero-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70rem 42rem at 50% 118%, var(--glow-soft), transparent 65%);
}

/* One fine-line whisper at the right margin. Never in the centre. */
.hero-arc {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(38vw, 34rem);
  pointer-events: none;
  opacity: 0.5;
}
.hero-arc path {
  stroke: var(--bronze);
  stroke-width: 0.75;
  opacity: 0.32;
  transition: stroke var(--theme-fade) ease;
}
.hero-arc path + path { opacity: 0.14; }

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 46rem;
}

.wordmark {
  font-family: var(--wordmark);
  font-weight: 700;
  font-size: clamp(4.75rem, 17vw, 11.5rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  margin-right: -0.06em; /* optically re-centre after tracking */
}

.tagline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.375rem, 3.4vw, 2rem);
  line-height: 1.35;
  margin-top: clamp(1.25rem, 3vh, 2rem);
  letter-spacing: 0.01em;
}
.tagline em { color: var(--bronze); transition: color var(--theme-fade) ease; }

.hero-sub {
  max-width: var(--measure);
  margin: clamp(1.25rem, 3vh, 1.75rem) auto 0;
  font-size: 1rem;
  color: var(--muted);
  transition: color var(--theme-fade) ease;
}

.coming-soon {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--bronze);
  margin-top: clamp(2.5rem, 6vh, 4rem);
  transition: color var(--theme-fade) ease;
}
.coming-soon::before,
.coming-soon::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: clamp(2rem, 4vw, 3.5rem);
  height: 1px;
  background: var(--hairline);
  margin: 0 1.25rem 0 0;
}
.coming-soon::after { margin: 0 0 0 1.25rem; }

.scroll-cue {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--bronze));
  opacity: 0.55;
  animation: cue 3.2s var(--ease-out) infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Contrast: tracker vs coach ──────────────────────────────────── */
.contrast { border-top: 1px solid var(--hairline-soft); }

.contrast-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  text-align: left;
}

.contrast-divider { height: 100%; background: var(--hairline); }

.contrast-head {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.muted-head { color: var(--faint); transition: color var(--theme-fade) ease; }

.contrast-col p {
  color: var(--muted);
  max-width: 30rem;
  transition: color var(--theme-fade) ease;
}
.contrast-col em { color: var(--ink); transition: color var(--theme-fade) ease; }

/* ── The story: four exchanges ─────────────────────────────────────────── */
.story {
  background: var(--bg-panel);
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  position: relative;
  overflow: hidden;
  transition: background-color var(--theme-fade) ease;
}
.story::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60rem 36rem at 50% -20%, var(--glow-soft), transparent 65%);
}
.story .section-inner { position: relative; }

.story-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18em;
  margin: 0 auto;
}

.story-lede {
  color: var(--muted);
  margin-top: clamp(1.75rem, 4vh, 2.5rem);
  transition: color var(--theme-fade) ease;
}

.story-moves {
  list-style: none;
  max-width: var(--measure);
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  text-align: left;
}
.story-moves li {
  padding: 1.35rem 0.25rem;
  border-top: 1px solid var(--hairline-soft);
}
.story-moves li:last-child { border-bottom: 1px solid var(--hairline-soft); }
.story-moves .said {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink);
  transition: color var(--theme-fade) ease;
}
.story-moves .did {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  line-height: 1.65;
  color: var(--muted);
  margin-top: 0.5rem;
  transition: color var(--theme-fade) ease;
}

.story-close {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  line-height: 1.6;
  max-width: 36rem;
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
}
.story-close em { color: var(--bronze); transition: color var(--theme-fade) ease; }

/* ── Restraint ───────────────────────────────────────────────────── */
.restraint-head {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.875rem, 4.6vw, 3rem);
  line-height: 1.25;
}
.restraint-sub {
  color: var(--muted);
  margin-top: 1.5rem;
  transition: color var(--theme-fade) ease;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--hairline-soft);
  padding: clamp(3rem, 7vh, 4.5rem) var(--pad-x);
  text-align: center;
}
.footer-mark {
  font-family: var(--wordmark);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}
.footer-lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  color: var(--muted);
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  transition: color var(--theme-fade) ease;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  margin-top: 1.25rem;
}
.footer-links a,
.footer-email a {
  /* 44 px hit area on a phone: the padding grows the box, the negative margin
     hands the same space back to the layout, so spacing is unchanged. */
  display: inline-block;
  padding: 0.75rem 0;
  margin: -0.75rem 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color var(--theme-fade) ease;
}
.footer-links a:hover,
.footer-email a:hover { color: var(--bronze); }
.footer-email { margin-top: 1.25rem; }
.footer-email a { text-transform: none; letter-spacing: 0.18em; }

/* ── Reveal on scroll ────────────────────────────────────────────── */
/* Hidden-until-reveal applies only when JS is present to do the revealing. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.reveal[data-reveal-delay='1'] { transition-delay: 120ms; }
.reveal[data-reveal-delay='2'] { transition-delay: 240ms; }
.reveal[data-reveal-delay='3'] { transition-delay: 360ms; }
.reveal[data-reveal-delay='4'] { transition-delay: 480ms; }
.reveal[data-reveal-delay='5'] { transition-delay: 600ms; }
.reveal[data-reveal-delay='6'] { transition-delay: 720ms; }
.reveal[data-reveal-delay='7'] { transition-delay: 840ms; }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Old browsers and reduced-motion: everything simply visible. */
.js.no-observer .reveal { opacity: 1; transform: none; }

/* ── Theme change: a soft dusk sweep via the View Transitions API ── */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 700ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(root) { animation-name: -ua-view-transition-fade-out; }

/* ── Breakpoints ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .contrast-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contrast-divider { height: 1px; width: 100%; }
  .hero-arc { width: 55vw; opacity: 0.35; }
  .coming-soon::before, .coming-soon::after { width: 1.25rem; margin: 0 0.75rem 0 0; }
  .coming-soon::after { margin: 0 0 0 0.75rem; }
}

@media (max-width: 480px) {
  /* Let "Coming soon" stand alone — flanking rules crowd a narrow screen. */
  .coming-soon::before, .coming-soon::after { display: none; }
}

@media (min-width: 1800px) {
  /* Keep the composition intimate on very wide monitors. */
  .section-inner { max-width: 74rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { animation: none; opacity: 0.35; transform: none; }
  .theme-toggle .toggle-crescent { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  body { transition: none; }
}
