/* ==========================================================================
   Capital Clarity Trading — shared stylesheet
   Brand palette is LOCKED. Do not improvise colours.
   --ink        #0F1A14  near-black green
   --green      #3D7344  accent green
   --green-deep #2D5F37  deep green
   --cream      #D4C9A8  cream
   --cream-lt   #E8DEC5  light cream
   ========================================================================== */

/* ---------- self-hosted fonts (no Google CDN dependency) ---------- */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #0F1A14;
  --ink-2: #142219;
  --ink-3: #1B2C22;
  --green: #3D7344;
  --green-deep: #2D5F37;
  --green-bright: #5C9A63;
  --cream: #D4C9A8;
  --cream-lt: #E8DEC5;
  --line: rgba(212, 201, 168, 0.16);
  --line-strong: rgba(212, 201, 168, 0.32);
  --muted: rgba(232, 222, 197, 0.66);

  --font-display: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 4px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream-lt);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--cream-lt); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
::selection { background: var(--green); color: var(--cream-lt); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap--narrow { max-width: 760px; }
section { padding: clamp(56px, 8vw, 104px) 0; }
.band { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band--green { background: linear-gradient(160deg, var(--green-deep) 0%, #24492c 100%); border: 0; }

.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--green-bright); font-weight: 600; margin: 0 0 18px;
  font-family: var(--font-body);
}
.lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--muted); line-height: 1.62; }
.rule { width: 54px; height: 3px; background: var(--green); border: 0; margin: 0 0 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 15px 30px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
  font-family: var(--font-body); text-align: center;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-bright); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--cream-lt); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--cream); background: rgba(212,201,168,.07); }
.btn--cream { background: var(--cream-lt); color: var(--ink); }
.btn--cream:hover { background: #fff; transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 26, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand img.mark {
  height: 42px; width: auto; border-radius: 5px; display: block;
  box-shadow: 0 0 0 1px rgba(212,201,168,.22);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { white-space: nowrap; font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; letter-spacing: .01em; }
.brand-tag { white-space: nowrap; font-size: .6rem; letter-spacing: .19em; text-transform: uppercase; color: var(--green-bright); font-weight: 600; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 9px 11px; font-size: .875rem; color: var(--muted); border-radius: var(--radius);
  white-space: nowrap; transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--cream-lt); background: rgba(212,201,168,.06); }
.nav a.is-active { color: var(--cream-lt); }
.nav a.nav-cta { background: var(--green); color: #fff; margin-left: 10px; padding: 9px 15px; font-weight: 600; }
.nav a.nav-cta:hover { background: var(--green-bright); }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line-strong);
  color: var(--cream-lt); border-radius: var(--radius); padding: 8px 12px; cursor: pointer;
  font-size: .85rem;
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(72px, 12vw, 140px) 0 clamp(60px, 9vw, 110px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 420px at 82% 8%, rgba(61,115,68,.30), transparent 65%),
    radial-gradient(560px 400px at 8% 92%, rgba(45,95,55,.22), transparent 62%);
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 19ch; }
.hero .lede { max-width: 54ch; margin-top: 26px; }
.hero-split { display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.hero-logo { justify-self: center; width: 100%; max-width: 400px; }
.hero-logo img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 22px 60px rgba(0,0,0,.45); }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 40px; }
  .hero-logo { max-width: 320px; justify-self: start; order: -1; }
}
.hero-credential {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: 100px;
  font-size: .78rem; letter-spacing: .06em; color: var(--cream); text-transform: uppercase; font-weight: 600;
}
.hero-credential .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-bright); }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.card .num {
  font-family: var(--font-display); font-size: 2.1rem; color: var(--green-bright);
  line-height: 1; margin-bottom: 14px; display: block; font-weight: 600;
}

/* pillar card */
.pillar .kicker { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--green-bright); font-weight: 700; display: block; margin-bottom: 12px; }

/* ---------- quote / metaphor block ---------- */
.quote {
  border-left: 3px solid var(--green); padding: 6px 0 6px 26px; margin: 34px 0;
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.38; color: var(--cream-lt);
}
.quote span { color: var(--muted); display: block; font-family: var(--font-body); font-size: .9rem; margin-top: 14px; letter-spacing: .02em; }

/* ---------- email capture ---------- */
.capture { background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: clamp(30px, 5vw, 52px); }
.capture h2 { margin-bottom: 12px; }
.capture .lede { max-width: 52ch; }
.signup { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; max-width: 560px; }
.signup input[type="email"], .signup input[type="text"] {
  flex: 1 1 240px; padding: 15px 18px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: rgba(15,26,20,.7); color: var(--cream-lt);
  font-family: var(--font-body); font-size: .98rem;
}
.signup input::placeholder { color: rgba(232,222,197,.4); }
.signup input:focus { outline: 2px solid var(--green-bright); outline-offset: 1px; border-color: transparent; }
.fineprint { font-size: .82rem; color: rgba(232,222,197,.5); margin-top: 16px; }
.form-note { display: none; margin-top: 18px; padding: 13px 16px; border-radius: var(--radius); background: rgba(61,115,68,.18); border: 1px solid var(--green); font-size: .92rem; }
.form-note.is-visible { display: block; }
.form-note.is-error { background: rgba(160, 82, 60, .16); border-color: #A0523C; }

/* ---------- video ---------- */
.video-frame {
  position: relative; padding-top: 56.25%; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.video-frame iframe, .video-frame .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* No video configured yet — collapse the 16:9 void into a compact, deliberate
   notice rather than a large empty box. Reverts automatically once a video ID
   is set in config.js. */
.video-frame.is-empty { padding-top: 0; }
.video-frame.is-empty .placeholder {
  position: static; height: auto; padding: 34px 24px;
}
.video-frame .placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--muted); text-align: center; padding: 24px;
}
.video-frame .placeholder .play {
  width: 66px; height: 66px; border-radius: 50%; background: var(--green);
  display: grid; place-items: center; color: #fff; font-size: 1.3rem;
}

/* ---------- portrait ---------- */
.portrait { margin: 0; justify-self: center; width: 100%; max-width: 460px; }
.portrait img {
  width: 100%; height: auto; display: block; border-radius: 6px;
  box-shadow: 0 22px 60px rgba(0,0,0,.5);
}
.portrait figcaption {
  margin-top: 14px; font-size: .84rem; color: rgba(232,222,197,.5);
  letter-spacing: .01em; text-align: center;
}
@media (max-width: 900px) { .portrait { max-width: 360px; justify-self: start; } }

/* ---------- product screenshots ---------- */
.shot {
  margin: 0; border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; background: #0d150f;
  box-shadow: 0 18px 44px rgba(0,0,0,.38);
}
.shot img { width: 100%; height: auto; display: block; }
.shot figcaption {
  padding: 15px 20px; font-size: .87rem; color: var(--muted);
  border-top: 1px solid var(--line); background: var(--ink-2);
}
.shot figcaption strong { color: var(--cream-lt); font-weight: 600; }

/* ---------- weekly pack download ---------- */
.pack {
  display: none; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--ink-3); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 26px 28px; margin-top: 30px;
}
.pack.is-visible { display: flex; }
.pack .pack-icon {
  flex: none; width: 46px; height: 56px; border-radius: 3px;
  background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  display: grid; place-items: center; color: #fff;
  font: 700 .62rem/1 var(--font-body); letter-spacing: .08em;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.pack .pack-body { flex: 1 1 260px; }
.pack .pack-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; display: block; }
.pack .pack-meta { font-size: .82rem; color: rgba(232,222,197,.5); margin-top: 4px; display: block; }

/* ---------- work-in-progress notice ---------- */
.wip {
  display: flex; gap: 15px; align-items: flex-start;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: rgba(61, 115, 68, .09); padding: 22px 24px;
}
.wip--centre {
  flex-direction: column; align-items: center; text-align: center;
  padding: 28px 34px; max-width: 440px;
}
.wip .pip {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green-bright); margin-top: 8px;
  box-shadow: 0 0 0 0 rgba(92, 154, 99, .6); animation: wip-pulse 2.4s ease-out infinite;
}
.wip--centre .pip { margin: 0 0 4px; }
@keyframes wip-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(92,154,99,.55); }
  70%  { box-shadow: 0 0 0 12px rgba(92,154,99,0); }
  100% { box-shadow: 0 0 0 0 rgba(92,154,99,0); }
}
@media (prefers-reduced-motion: reduce) { .wip .pip { animation: none; } }
.wip .label {
  display: block; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--green-bright); font-weight: 700; margin-bottom: 7px;
}
.wip p { color: var(--muted); font-size: .96rem; margin: 0; max-width: 46ch; }

/* ---------- list ---------- */
.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 13px; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px; background: var(--green-bright); border-radius: 2px;
}
.ticks li strong { color: var(--cream-lt); font-weight: 600; }

/* ---------- curriculum ---------- */
.module { border-top: 1px solid var(--line); padding: 26px 0; }
.module:last-child { border-bottom: 1px solid var(--line); }
.module h3 { font-size: 1.15rem; margin-bottom: 6px; }
.module .mod-label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--green-bright); font-weight: 700; margin-bottom: 10px; }
.module ol { margin: 14px 0 0; padding-left: 20px; color: var(--muted); font-size: .95rem; }
.module ol li { margin-bottom: 7px; max-width: 82ch; }
.module > p { max-width: 82ch; }
.modules { max-width: 900px; }

/* ---------- footer ---------- */
.site-footer { background: #0B1410; border-top: 1px solid var(--line); padding: 62px 0 34px; margin-top: 0; }
.footer-logo { display: block; width: 200px; max-width: 60%; height: auto; border-radius: 7px; margin-bottom: 20px; }

/* ---------- contact ---------- */
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 26px 28px; margin-top: 26px;
}
.contact-card .label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--green-bright); font-weight: 700; display: block; margin-bottom: 6px; }
.contact-card a.addr {
  font-family: var(--font-display); font-size: clamp(.98rem, 2.2vw, 1.2rem); color: var(--cream-lt);
  border-bottom: 1px solid var(--green); padding-bottom: 2px; word-break: break-word;
}
.contact-card a.addr:hover { color: var(--green-bright); border-color: var(--green-bright); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--font-body); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--green-bright); margin-bottom: 16px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--muted); font-size: .92rem; }
.site-footer a:hover { color: var(--cream-lt); }
.footer-bottom {
  margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: .8rem; color: rgba(232,222,197,.42);
}
.disclaimer { font-size: .8rem; color: rgba(232,222,197,.42); line-height: 1.6; max-width: 62ch; margin-top: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 840px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1020px) {
  .nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line); padding: 10px var(--pad) 18px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 4px; border-radius: 0; }
  .nav a.nav-cta { margin: 10px 0 0; text-align: center; padding: 14px; }
  .nav-toggle { display: block; }
  .site-header .wrap { position: relative; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .brand-tag { display: none; }
}
