/* =====================================================================
   The Human Mastery Architecture
   Two design options behind the top-right toggle:
     [data-theme="atelier"]  — warm light editorial
     [data-theme="nocturne"] — architectural dark
   Tokens are themed; structure is shared.
   ===================================================================== */

/* ---- Base tokens (Atelier / warm light is the default) ---- */
:root,
[data-theme="atelier"] {
  --bg:        #f6f1e9;   /* warm ivory       */
  --bg-2:      #efe7da;   /* sand contrast    */
  --surface:   #fbf8f2;   /* card             */
  --ink:       #211d18;   /* near-black warm  */
  --ink-soft:  #5b5248;   /* muted body       */
  --line:      #ddd2c0;   /* hairline         */
  --accent:    #9a7b43;   /* muted gold       */
  --accent-ink:#7c6233;
  --on-accent: #fbf8f2;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body:    "Inter", system-ui, sans-serif;

  --display-weight: 500;
  --display-spacing: -0.01em;
  --section-num-opacity: 0.35;
  --grid-line: transparent;        /* no grid rails in Atelier */

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Nocturne / architectural dark (shared by Aurora + Anima) ---- */
[data-theme="nocturne"],
[data-theme="aurora"],
[data-theme="anima"] {
  --bg:        #15130f;   /* obsidian warm   */
  --bg-2:      #1d1a15;
  --surface:   #201c16;
  --ink:       #efe7d7;   /* champagne text  */
  --ink-soft:  #a79d8b;
  --line:      #352f26;
  --accent:    #c7a25e;   /* bronze/champagne*/
  --accent-ink:#dcbd7e;
  --on-accent: #15130f;

  --display-weight: 400;
  --display-spacing: 0.005em;
  --section-num-opacity: 0.5;
  --grid-line: #2a241c;            /* faint vertical rails */
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .6s var(--ease), color .6s var(--ease);
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 4rem); }

/* ---- Type ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-spacing); line-height: 1.04; }

.kicker {
  font-family: var(--font-body);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent-ink);
}

/* ===================================================================
   Top bar
   =================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 1rem clamp(1.25rem, 5vw, 4rem);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .6s var(--ease), border-color .6s var(--ease);
}

.wordmark { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; color: var(--ink); }
.wordmark__mark { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: .12em; }
.wordmark__full { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 1080px) { .wordmark__full { display: none; } }

.nav { display: flex; justify-content: center; gap: clamp(.9rem, 2vw, 1.8rem); }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: .82rem; letter-spacing: .04em; transition: color .3s; }
.nav a:hover { color: var(--ink); }
.nav__cta { color: var(--accent-ink) !important; font-weight: 500; }
@media (max-width: 920px) { .nav { display: none; } }

/* Design-option switch */
.switch {
  justify-self: end;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.switch__label { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); padding-inline: .5rem 0; }
.switch__btn {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 0; cursor: pointer; border-radius: 999px;
  padding: .4rem .8rem; font-family: var(--font-body);
  font-size: .76rem; letter-spacing: .04em; color: var(--ink-soft);
  background: transparent; transition: all .35s var(--ease);
}
.switch__num { font-family: var(--font-display); font-size: .9rem; opacity: .8; }
.switch__btn.is-active { background: var(--accent); color: var(--on-accent); }
@media (max-width: 560px) { .switch__label { display: none; } }

/* mobile menu toggle (nav is simple anchor list; toggle reveals it) */
.menu-toggle { display: none; }

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-family: var(--font-body); font-size: .86rem; letter-spacing: .04em;
  padding: .95rem 1.6rem; border-radius: 2px; transition: all .35s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-ink); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* ===================================================================
   Hero
   =================================================================== */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh; display: flex; align-items: center;
  padding-block: 6rem 4rem;
  background:
    radial-gradient(60% 50% at 80% 10%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%),
    var(--bg);
}
.hero .wrap { position: relative; z-index: 2; }

/* Holographic wireframe (canvas, drawn in hologram.js) — Aurora option only */
.hologram {
  position: absolute; top: 50%; right: clamp(-6rem, 2vw, 4rem);
  transform: translateY(-50%);
  width: min(48vw, 640px); height: min(48vw, 640px);
  pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
/* only the Aurora option reveals the hologram */
[data-theme="aurora"] .hologram.is-ready { opacity: 1; }
@media (max-width: 820px) {
  .hologram {
    right: 50%; transform: translate(50%, -50%);
    width: min(90vw, 460px); height: min(90vw, 460px);
    z-index: 0;
  }
  [data-theme="aurora"] .hologram.is-ready { opacity: .28; }
}

/* 3D particle human (Three.js, drawn in anima3d.js) — Anima option only */
.anima3d {
  position: absolute; top: 50%; right: clamp(-4rem, 3vw, 5rem);
  transform: translateY(-50%);
  width: min(42vw, 520px); height: min(88vh, 820px);
  pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 1.8s var(--ease);
}
[data-theme="anima"] .anima3d.is-ready { opacity: 1; }
@media (max-width: 820px) {
  .anima3d {
    right: 50%; transform: translate(50%, -50%);
    width: min(80vw, 380px); height: min(72vh, 620px);
    z-index: 0;
  }
  [data-theme="anima"] .anima3d.is-ready { opacity: .32; }
}
/* Anima: flat black hero so the opaque WebGL canvas blends with no seam;
   a faint cool wash sits behind the headline on the left only */
[data-theme="anima"] .hero {
  background:
    radial-gradient(50% 55% at 28% 38%, rgba(199,162,94,0.10), transparent 70%),
    #000;
}
.hero__title {
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  margin: 1.2rem 0 1.6rem;
}
.hero__lede { max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.4rem; }

.hero__scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); }
.hero__scroll span {
  display: block; width: 1px; height: 46px;
  background: linear-gradient(var(--accent), transparent);
  animation: drip 2.4s var(--ease) infinite;
}
@keyframes drip { 0% { opacity: 0; transform: scaleY(.2); transform-origin: top; } 50% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; } }

/* ===================================================================
   For-whom band
   =================================================================== */
.band { background: var(--bg-2); border-block: 1px solid var(--line); padding-block: clamp(3rem, 7vw, 5.5rem); }
.band__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.band__lead { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.3; }
.tags { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.tags li { font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-left: 1.2rem; position: relative; }
.tags li::before { content: ""; position: absolute; left: 0; top: .6em; width: .5rem; height: 1px; background: var(--accent); }
@media (max-width: 760px) { .band__grid { grid-template-columns: 1fr; } }

/* ===================================================================
   Sections (shared)
   =================================================================== */
.section { position: relative; padding-block: clamp(4rem, 9vw, 8rem); }
.section--contrast { background: var(--bg-2); }

/* faint vertical grid rails — Nocturne only (token is transparent in Atelier) */
.section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 25% 100%;
  background-position: center;
  opacity: .6;
}

.section__head { position: relative; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section__num {
  display: block; font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1;
  color: var(--accent); opacity: var(--section-num-opacity); margin-bottom: .4rem;
}
.section__title { font-size: clamp(1.9rem, 4.2vw, 3.3rem); margin-top: .8rem; max-width: 20ch; }

/* ---- Prose ---- */
.prose { max-width: 62ch; }
.prose p { margin-bottom: 1.4rem; color: var(--ink-soft); font-size: clamp(1rem, 1.3vw, 1.12rem); }
.prose__pull {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2rem) !important; line-height: 1.35;
  color: var(--ink) !important; margin-block: 2rem !important;
  padding-left: 1.4rem; border-left: 2px solid var(--accent);
}
.prose__muted { font-size: .95rem !important; }

/* ---- Why different ---- */
.compare { max-width: 70ch; }
.compare__lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--ink-soft); }
.compare__note {
  margin-top: 2rem; font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--ink);
}

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 3vw, 2.5rem); margin-bottom: 3.5rem; }
.stat { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.stat__n { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--ink); line-height: 1; }
.stat__l { display: block; margin-top: .6rem; font-size: .82rem; letter-spacing: .04em; color: var(--ink-soft); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---- Structure (28-day) ---- */
.structure { display: flex; flex-direction: column; gap: 1px; background: var(--line); border-block: 1px solid var(--line); margin-bottom: 2rem; }
.structure__row { display: grid; grid-template-columns: 5rem 1fr; gap: 1.5rem; align-items: center; background: var(--bg); padding: 1.6rem .2rem; }
.section--contrast .structure__row { background: var(--bg-2); }
.structure__n { font-family: var(--font-display); font-size: 2.6rem; color: var(--accent); text-align: center; }
.structure__row h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.structure__row p { color: var(--ink-soft); font-size: .95rem; }
.structure__note { max-width: 62ch; color: var(--ink-soft); font-style: italic; font-family: var(--font-display); font-size: clamp(1.1rem, 2vw, 1.5rem); }

/* ---- Cards (receive) ---- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--surface); padding: clamp(1.6rem, 3vw, 2.6rem); transition: background .3s; }
.card:hover { background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.card h3 { font-size: 1.4rem; margin-bottom: .7rem; }
.card p { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 680px) { .cards { grid-template-columns: 1fr; } }

/* ---- The Experience (feel) ---- */
.section--feel { text-align: center; }
.section--feel .section__head { display: flex; flex-direction: column; align-items: center; }
.feel__words { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1.2; max-width: 16ch; margin-inline: auto; }
.feel__not { margin-top: 1.8rem; color: var(--ink-soft); letter-spacing: .04em; }

/* ---- Online Programme list ---- */
.programme { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 2rem; border-top: 1px solid var(--line); }
.programme li { padding: 1.1rem .4rem; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--ink); display: flex; align-items: baseline; gap: .8rem; }
.programme li::before { content: counter(prog, decimal-leading-zero); counter-increment: prog; font-family: var(--font-body); font-size: .7rem; letter-spacing: .1em; color: var(--accent-ink); }
.programme { counter-reset: prog; }
@media (max-width: 680px) { .programme { grid-template-columns: 1fr; } }

/* ---- About ---- */
.about { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.about > * { min-width: 0; }
.about__portrait {
  display: block; width: 100%; max-width: 420px; height: auto;
  aspect-ratio: 3 / 4; object-fit: cover;
  border: 1px solid var(--line); border-radius: 2px;
}
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about__portrait { max-width: 320px; } }

/* ---- Apply ---- */
.section--apply { background: var(--bg-2); }
.applyform { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.field label span { text-transform: none; letter-spacing: 0; opacity: .6; }
.field input, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
  padding: .85rem 1rem; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.applyform__foot { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.applyform__note { font-size: .82rem; color: var(--ink-soft); font-style: italic; }
@media (max-width: 620px) { .applyform { grid-template-columns: 1fr; } }

/* ===================================================================
   Footer
   =================================================================== */
.footer { border-top: 1px solid var(--line); padding-block: 3rem; background: var(--bg); }
.footer__grid { display: flex; flex-direction: column; gap: 1rem; }
.footer__fine { font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }

/* ===================================================================
   Reveal on scroll (motion as garnish)
   =================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
