/* =================================================================
   YEC. — Shared design system
   Brand: grounded, energizing, warm. Person first. Business second.
   ================================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Montserrat:wght@400;500;600&display=swap');

/* ---- Tokens ---- */
:root {
  /* Brand palette (verified kit) */
  --orange:     #E98500;
  --teal:       #007396;
  --navy:       #172029;
  --slate:      #2E3641;
  --charcoal:   #282828;
  --gray:       #515151;
  --warm-gray:  #B8B4B1;
  --cool-light: #E8ECF0;
  --cream:      #ECECE4;
  --white:      #FFFFFF;

  /* Tints (derived, used sparingly for borders/hovers) */
  --orange-deep: #cf7600;
  --teal-deep:   #005e7a;
  --navy-soft:   #20303c;

  /* Type */
  --font-head: 'Open Sans', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  --font-kicker: 'Montserrat', system-ui, sans-serif;

  /* Rhythm */
  --container: 1240px;
  --container-narrow: 880px;
  --gutter: clamp(22px, 5vw, 64px);
  --section-y: clamp(80px, 11vw, 168px);

  /* Tweakable (overridden by tweaks panel) */
  --tw-accent: var(--orange);
  --tw-head-weight: 300;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--navy);
  background: var(--cream);
  line-height: 1.62;
  font-size: 18px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }

/* =================================================================
   Typography
   ================================================================= */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--tw-head-weight); line-height: 1.04; letter-spacing: -0.015em; }

.display {
  font-weight: var(--tw-head-weight);
  font-size: clamp(2.9rem, 8.5vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
.h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.lead { font-size: clamp(1.18rem, 1.7vw, 1.45rem); font-weight: 400; line-height: 1.55; }
.body-lg { font-size: 1.18rem; }
.small { font-size: 0.95rem; }

/* The kicker — Montserrat, uppercase, tracked */
.kicker {
  font-family: var(--font-kicker);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  color: var(--tw-accent);
}
.kicker::before {
  content: "";
  width: 26px; height: 2px;
  background: currentColor;
  display: inline-block;
}
.kicker.no-rule::before { display: none; }

.measure { max-width: 64ch; }
.measure-sm { max-width: 52ch; }

/* =================================================================
   Layout
   ================================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section.tight { padding-block: clamp(56px, 7vw, 104px); }

/* Section background fields — flat, confident. */
.bg-orange { background: var(--orange); color: var(--white); }
.bg-orange .kicker { color: var(--navy); }
.bg-teal   { background: var(--teal);   color: var(--white); }
.bg-teal .kicker { color: var(--cream); }
.bg-navy   { background: var(--navy);   color: var(--cream); }
.bg-navy .kicker { color: var(--orange); }
.bg-slate  { background: var(--slate);  color: var(--cream); }
.bg-slate .kicker { color: var(--orange); }
.bg-cream  { background: var(--cream);  color: var(--navy); }
.bg-light  { background: var(--cool-light); color: var(--navy); }
.bg-white  { background: var(--white);  color: var(--navy); }

/* On dark fields, secondary text softens */
.bg-orange .muted, .bg-teal .muted, .bg-navy .muted, .bg-slate .muted { color: rgba(255,255,255,0.78); }
.muted { color: var(--gray); }
.bg-cream .muted, .bg-light .muted, .bg-white .muted { color: var(--gray); }

/* =================================================================
   Buttons / CTAs
   ================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-kicker);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  padding: 1.05em 1.7em;
  border-radius: 0;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--charcoal); transform: translateY(-2px); }

.btn-accent { background: var(--tw-accent); color: var(--white); }
.btn-accent:hover { filter: brightness(.94); transform: translateY(-2px); }

.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-deep); transform: translateY(-2px); }

.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--cream); transform: translateY(-2px); }

.btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.btn-outline:hover { background: var(--navy); color: var(--white); border-color: var(--navy); transform: translateY(-2px); }
.bg-navy .btn-outline:hover, .bg-orange .btn-outline:hover, .bg-teal .btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* Text link with underline reveal */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-kicker); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
  color: var(--tw-accent);
  transition: gap .25s ease;
}
.link-arrow:hover { gap: 0.85em; }

/* =================================================================
   The spot — the period made visible
   ================================================================= */
.spot {
  display: inline-block;
  width: 0.62em; height: 0.62em;
  border-radius: 50%;
  background: var(--tw-accent);
  vertical-align: baseline;
}

/* Orbit system (built per-page, base styles here) */
.orbit-stage { position: relative; aspect-ratio: 1; width: min(560px, 86vw); margin-inline: auto; }
.orbit-core {
  position: absolute; inset: 0; margin: auto;
  width: 30%; height: 30%; border-radius: 50%;
  background: var(--tw-accent);
  display: grid; place-items: center;
  z-index: 3;
}
.orbit-ring { position: absolute; inset: 0; border: 1px dashed rgba(255,255,255,0.22); border-radius: 50%; }
.orbit-dot {
  position: absolute; top: 50%; left: 50%;
  display: flex; align-items: center; gap: 0.55rem;
  transform: translate(-50%, -50%);
  transform-origin: center;
}
.orbit-dot .node { width: 15px; height: 15px; border-radius: 50%; flex: none; box-shadow: 0 0 0 6px rgba(0,0,0,0.06); }
.orbit-dot .label {
  font-family: var(--font-kicker); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap;
}
/* left-half dots: label sits to the LEFT of the node, right-aligned */
.orbit-dot.flip { flex-direction: row-reverse; }
.orbit-dot.flip .label { text-align: right; }

/* =================================================================
   Cards & content blocks
   ================================================================= */
.card {
  background: var(--white);
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid rgba(23,32,41,0.10);
  height: 100%;
}
.card.on-dark { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 84px); align-items: center; }
.split.lean-left { grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 860px) { .split, .split.lean-left { grid-template-columns: 1fr; gap: 40px; } }

/* Pillar / numbered item */
.pillar-num {
  font-family: var(--font-kicker); font-weight: 500;
  font-size: 0.8rem; letter-spacing: 0.16em;
  color: var(--tw-accent);
}

/* =================================================================
   Image slots (placeholders the user fills)
   ================================================================= */
.imgslot {
  position: relative;
  background: var(--cool-light);
  border: 1px solid rgba(23,32,41,0.12);
  overflow: hidden;
  display: grid; place-items: center;
}
.bg-navy .imgslot, .bg-slate .imgslot, .bg-teal .imgslot { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); }
.bg-orange .imgslot { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.28); }
.imgslot .imgslot-tag {
  font-family: var(--font-kicker); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.68rem; color: var(--gray);
  padding: 0.5em 0.9em; text-align: center; line-height: 1.5;
}
.bg-navy .imgslot .imgslot-tag, .bg-teal .imgslot .imgslot-tag, .bg-orange .imgslot .imgslot-tag, .bg-slate .imgslot .imgslot-tag { color: rgba(255,255,255,0.62); }
.imgslot.ratio-portrait { aspect-ratio: 4 / 5; }
.imgslot.ratio-square   { aspect-ratio: 1; }
.imgslot.ratio-wide     { aspect-ratio: 16 / 10; }
.imgslot.ratio-tall     { aspect-ratio: 3 / 4; }
/* faint corner ticks to read as a deliberate frame */
.imgslot::before, .imgslot::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 1.5px solid rgba(23,32,41,0.18);
}
.imgslot::before { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.imgslot::after { bottom: 14px; right: 14px; border-left: none; border-top: none; }
.bg-navy .imgslot::before, .bg-navy .imgslot::after, .bg-teal .imgslot::before, .bg-teal .imgslot::after, .bg-orange .imgslot::before, .bg-orange .imgslot::after { border-color: rgba(255,255,255,0.3); }

/* =================================================================
   Iceberg illustration (styled placeholder + waterline)
   ================================================================= */
.iceberg-frame {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  background: linear-gradient(to bottom, var(--cool-light) 0 38%, var(--teal) 38% 100%);
  overflow: hidden;
}
.iceberg-frame .waterline {
  position: absolute; left: 0; right: 0; top: 38%;
  border-top: 2px dashed rgba(255,255,255,0.55);
}
.iceberg-frame .wl-label {
  position: absolute; top: calc(38% - 26px); left: 18px;
  font-family: var(--font-kicker); font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray);
}

/* =================================================================
   Reveal on scroll (restrained)
   ================================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =================================================================
   Rule / divider
   ================================================================= */
.rule { height: 1px; background: rgba(23,32,41,0.12); border: 0; }
.bg-navy .rule, .bg-teal .rule, .bg-orange .rule, .bg-slate .rule { background: rgba(255,255,255,0.18); }

/* Eyebrow stat-free fact line */
.facts dt { font-family: var(--font-head); font-weight: 300; font-size: clamp(1.3rem,2.2vw,1.8rem); }
.facts dd { color: var(--gray); margin-top: 6px; }

/* Utility */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.stack > * + * { margin-top: var(--stack, 1.2rem); }
.flex { display: flex; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 0.7rem; }
.gap { gap: 1.1rem; }
.gap-lg { gap: 1.8rem; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.mt-1 { margin-top: 0.6rem; } .mt-2 { margin-top: 1.2rem; } .mt-3 { margin-top: 2rem; } .mt-4 { margin-top: 3rem; }
.full { width: 100%; }
