/*
Theme Name: Zalik Academy 2026
Theme URI: https://www.zalikacademy.com/
Author: Zalik Academy
Description: Custom theme for Zalik Academy. Urban, academic, editorial. Small groups, big ideas. Preserves the existing Zalik brand palette and crest while modernizing typography, hierarchy and conversion paths. Includes the Build Your Zalik Plan inquiry and fee estimator.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: zalik
*/

/* ==========================================================================
   ZALIK DESIGN SYSTEM
   Palette is the existing brand palette: white, teal, black, cyan.
   80% editorial restraint, 20% character play.
   ========================================================================== */

:root {
  /* Brand */
  --z-teal: #1895b5;
  --z-teal-deep: #106e86;
  --z-teal-ink: #0b4c5d;
  --z-cyan: #25d3ff;
  --z-black: #000000;
  --z-ink: #101315;
  --z-white: #ffffff;

  /* Neutrals derived from the brand, not generic gray */
  --z-paper: #f7fafb;
  --z-mist: #e8f1f4;
  --z-line: #d5e2e7;
  --z-muted: #4c5d64;

  /* Semantic */
  --z-bg: var(--z-white);
  --z-surface: var(--z-paper);
  --z-text: var(--z-ink);
  --z-accent: var(--z-teal);
  --z-accent-hot: var(--z-cyan);

  /* Type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.17rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.56rem, 1.4rem + 0.8vw, 2rem);
  --step-3: clamp(1.95rem, 1.6rem + 1.7vw, 2.9rem);
  --step-4: clamp(2.44rem, 1.8rem + 3.2vw, 4.2rem);
  --step-5: clamp(3rem, 2rem + 5vw, 6rem);

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  /* Shape */
  --radius-s: 6px;
  --radius-m: 12px;
  --container: 1180px;
  --container-narrow: 760px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-quick: 200ms;
  --dur-reveal: 600ms;
}

/* ==========================================================================
   BASE
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--z-text);
  background: var(--z-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--z-teal-deep); text-underline-offset: 0.15em; }
a:hover { color: var(--z-teal-ink); }

:focus-visible {
  outline: 3px solid var(--z-teal-ink);
  outline-offset: 2px;
  border-radius: 2px;
  box-shadow: 0 0 0 5px rgba(37, 211, 255, 0.45);
}
/* On dark grounds the cyan ring is 11.8:1, so keep it there. */
.hero :focus-visible, .band--dark :focus-visible, .warriors-band :focus-visible,
.plan-panel :focus-visible, .site-footer :focus-visible, .band--teal :focus-visible {
  outline-color: var(--z-cyan);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.45);
}

::selection { background: var(--z-cyan); color: var(--z-black); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--z-black);
  color: var(--z-white);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: var(--z-white); }

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

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.container--narrow { max-width: var(--container-narrow); }

.band { padding-block: var(--space-6); }
.band--tight { padding-block: var(--space-5); }
.band--dark { background: var(--z-black); color: var(--z-white); }
.band--dark h1, .band--dark h2, .band--dark h3 { color: var(--z-white); }
.band--dark a { color: var(--z-cyan); }
.band--mist { background: var(--z-mist); }
.band--teal { background: var(--z-teal-deep); color: var(--z-white); }
.band--teal h2, .band--teal h3 { color: var(--z-white); }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--z-teal-deep);
  margin-bottom: var(--space-2);
  display: block;
}
.band--dark .eyebrow, .band--teal .eyebrow { color: var(--z-cyan); }

.lede { font-size: var(--step-1); line-height: 1.5; max-width: 40ch; color: var(--z-muted); }
.band--dark .lede { color: rgba(255, 255, 255, 0.82); }
.band--teal .lede { color: var(--z-white); }

/* Editorial two-column split */
.split { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-text { grid-template-columns: 3fr 2fr; }
}

/* Oversized editorial numbers */
.bignum {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--step-5);
  line-height: 1;
  color: var(--z-teal);
  letter-spacing: -0.03em;
}

/* Horizontal stat / motto strip */
.motto-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  border-top: 3px solid var(--z-black);
  border-bottom: 3px solid var(--z-black);
  padding-block: var(--space-3);
}
.motto-strip span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: 0.02em;
}
.band--dark .motto-strip { border-color: var(--z-white); }

/* Pull quote */
.pullquote {
  border-left: 5px solid var(--z-cyan);
  padding-left: var(--space-3);
  font-size: var(--step-1);
  line-height: 1.45;
  font-weight: 500;
  max-width: 34ch;
  margin: var(--space-4) 0;
}
.pullquote cite { display: block; margin-top: var(--space-2); font-style: normal; font-size: var(--step--1); color: var(--z-muted); font-weight: 600; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-0);
  padding: 0.8em 1.6em;
  border-radius: var(--radius-s);
  border: 2px solid var(--z-black);
  background: var(--z-black);
  color: var(--z-white);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-quick) var(--ease-out), background var(--dur-quick), color var(--dur-quick);
  min-height: 48px;
}
.btn:hover { background: var(--z-teal-deep); border-color: var(--z-teal-deep); color: var(--z-white); transform: translateY(-2px); }

.btn--primary { background: var(--z-teal-deep); border-color: var(--z-teal-deep); }
.btn--primary:hover { background: var(--z-teal-ink); border-color: var(--z-teal-ink); }

.btn--ghost { background: transparent; color: var(--z-black); }
.btn--ghost:hover { background: var(--z-black); color: var(--z-white); }

.band--dark .btn--ghost, .band--teal .btn--ghost { color: var(--z-white); border-color: var(--z-white); }
.band--dark .btn--ghost:hover, .band--teal .btn--ghost:hover { background: var(--z-white); color: var(--z-black); }

.btn--cyan { background: var(--z-cyan); border-color: var(--z-cyan); color: var(--z-black); }
.btn--cyan:hover { background: var(--z-white); border-color: var(--z-white); color: var(--z-black); }

/* ==========================================================================
   HEADER + NAV
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--z-white);
  border-bottom: 1px solid var(--z-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: clamp(0.6rem, 2vw, 1.5rem);
  min-height: 76px;
  padding-block: 0.6rem;
}
.site-brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--z-black); min-width: 0; flex-shrink: 1; }
.site-brand img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.site-brand__name { font-family: var(--font-display); font-weight: 900; font-size: clamp(0.95rem, 2.2vw, 1.2rem); letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.1; min-width: 0; }
.site-brand__tag { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.06em; color: var(--z-muted); text-transform: none; line-height: 1.3; max-width: 30ch; }

.primary-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: clamp(0.3rem, 1vw, 1.1rem); margin: 0; padding: 0; }
.primary-nav a {
  display: block;
  padding: 0.6rem 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  white-space: nowrap;
  color: var(--z-ink);
  text-decoration: none;
}
.primary-nav a:hover { color: var(--z-teal-ink); }
.primary-nav .current-menu-item > a { color: var(--z-teal-deep); box-shadow: inset 0 -3px 0 var(--z-cyan); }

/* Dropdowns */
.primary-nav li { position: relative; }
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--z-white);
  border: 1px solid var(--z-line);
  border-radius: var(--radius-s);
  box-shadow: 0 14px 34px rgba(16, 19, 21, 0.12);
  padding: 0.5rem;
  flex-direction: column;
  gap: 0;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: flex; }
.primary-nav .sub-menu a { padding: 0.55rem 0.75rem; border-radius: var(--radius-s); font-weight: 500; }
.primary-nav .sub-menu a:hover { background: var(--z-mist); }

.header-cta { flex-shrink: 0; white-space: nowrap; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--z-black);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
}

@media (max-width: 1200px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--z-white);
    border-bottom: 1px solid var(--z-line);
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    padding: var(--space-2) clamp(1.1rem, 4vw, 2rem) var(--space-4);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { padding: 0.85rem 0.25rem; font-size: 1.05rem; border-bottom: 1px solid var(--z-mist); }
  .primary-nav .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding-left: var(--space-2); }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  background: var(--z-black);
  color: var(--z-white);
  position: relative;
  overflow: hidden;
}
.hero__inner { padding-block: clamp(4rem, 10vw, 8rem); position: relative; z-index: 2; }
.hero h1 { color: var(--z-white); max-width: 14ch; }
.hero h1 .hero__sub {
  display: block;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--z-cyan);
  margin-top: 0.4em;
}
.hero .lede { color: rgba(255, 255, 255, 0.85); margin-block: var(--space-3) var(--space-4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.35;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 20%, rgba(0, 0, 0, 0.45) 70%, rgba(24, 149, 181, 0.35) 100%);
}

/* Kinetic word reveal (LEARN. BUILD. SPEAK. MOVE. LEAD.) */
.word-reveal { display: flex; flex-wrap: wrap; gap: 0.35em 0.6em; font-family: var(--font-display); font-weight: 900; font-size: var(--step-3); }
.word-reveal span { opacity: 0; transform: translateY(0.5em); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); }
.word-reveal.is-visible span { opacity: 1; transform: none; }
.word-reveal span:nth-child(2) { transition-delay: 120ms; }
.word-reveal span:nth-child(3) { transition-delay: 240ms; }
.word-reveal span:nth-child(4) { transition-delay: 360ms; }
.word-reveal span:nth-child(5) { transition-delay: 480ms; }
.word-reveal .accent { color: var(--z-teal); }
.band--dark .word-reveal .accent { color: var(--z-cyan); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Underline draw */
.draw-line { position: relative; display: inline-block; }
.draw-line::after {
  content: '';
  position: absolute;
  left: 0; bottom: -0.12em;
  height: 0.14em;
  width: 100%;
  background: var(--z-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-reveal) var(--ease-out) 250ms;
}
.is-visible .draw-line::after, .draw-line.is-visible::after { transform: scaleX(1); }

/* ==========================================================================
   PILLARS / PATHWAYS (editorial rows, deliberately not a card grid)
   ========================================================================== */

.pillars { display: grid; gap: 0; border-top: 3px solid var(--z-black); }
.pillar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: baseline;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--z-line);
}
.pillar__num { font-family: var(--font-display); font-weight: 900; font-size: var(--step-2); color: var(--z-teal-deep); min-width: 2.2ch; }
.pillar h3 { margin-bottom: 0.25em; }
.pillar p { color: var(--z-muted); max-width: 60ch; margin: 0; }

.pathways { display: grid; gap: 1px; background: var(--z-line); border: 1px solid var(--z-line); }
@media (min-width: 700px) { .pathways { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .pathways--five { grid-template-columns: repeat(5, 1fr); } }
.pathway {
  background: var(--z-white);
  padding: var(--space-3);
  text-decoration: none;
  color: var(--z-ink);
  transition: background var(--dur-quick);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 170px;
}
.pathway:hover { background: var(--z-mist); color: var(--z-ink); }
.pathway h3 { font-size: var(--step-1); margin: 0; }
.pathway p { font-size: var(--step--1); color: var(--z-muted); margin: 0; flex: 1; }
.pathway .pathway__go { font-family: var(--font-display); font-weight: 700; color: var(--z-teal-deep); font-size: var(--step--1); }

/* ==========================================================================
   WARRIORS band
   ========================================================================== */

.warriors-band { background: var(--z-black); color: var(--z-white); position: relative; overflow: hidden; }
.warriors-band h2 {
  font-size: var(--step-5);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--z-white);
  line-height: 0.95;
}
.warriors-band h2 em { font-style: normal; color: var(--z-cyan); }
.warriors-band .ball {
  display: inline-block;
  width: 0.6em; height: 0.6em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--z-cyan), var(--z-teal-deep));
  vertical-align: baseline;
  margin-left: 0.1em;
}
.is-visible .ball { animation: ball-bounce 700ms var(--ease-out) 400ms 1 both; }
@keyframes ball-bounce {
  0% { transform: translateY(-1.4em); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-0.35em); }
  100% { transform: translateY(0); }
}

/* ==========================================================================
   DAY AT ZALIK timeline
   ========================================================================== */

.day-timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--z-teal); }
.day-timeline li { position: relative; padding: 0 0 var(--space-3) var(--space-4); }
.day-timeline li::before {
  content: '';
  position: absolute;
  left: -8px; top: 0.45em;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--z-cyan);
  border: 3px solid var(--z-white);
}
.day-timeline time { font-family: var(--font-display); font-weight: 800; color: var(--z-teal-deep); display: block; }
.day-timeline p { margin: 0; color: var(--z-muted); }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.stories { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .stories { grid-template-columns: 1fr 1fr; } }
.story { border-top: 3px solid var(--z-black); padding-top: var(--space-2); }
.story blockquote { margin: 0; font-size: var(--step-1); line-height: 1.45; font-weight: 500; }
.story figcaption { margin-top: var(--space-2); font-weight: 600; color: var(--z-muted); font-size: var(--step--1); }

/* ==========================================================================
   PARTNERS (OUR VILLAGE)
   ========================================================================== */

.partner-group { border-top: 1px solid var(--z-line); padding-block: var(--space-3); display: grid; gap: var(--space-2); }
@media (min-width: 860px) { .partner-group { grid-template-columns: 240px 1fr; } }
.partner-group h3 { font-size: var(--step-1); }
.partner { display: flex; gap: var(--space-2); align-items: flex-start; padding-block: var(--space-1); }
.partner img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.partner p { margin: 0; color: var(--z-muted); font-size: var(--step--1); }
.partner strong { display: block; color: var(--z-ink); font-size: var(--step-0); }

/* ==========================================================================
   CHARACTERS
   ========================================================================== */

.crew { display: grid; gap: var(--space-3); }
@media (min-width: 700px) { .crew { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .crew { grid-template-columns: repeat(3, 1fr); } }
.crew-member { text-align: center; padding: var(--space-3); }
.crew-member img { width: 130px; height: 130px; object-fit: contain; margin-inline: auto; transition: transform var(--dur-quick) var(--ease-out); }
.crew-member:hover img { transform: translateY(-6px); }
.crew-member h3 { font-size: var(--step-1); margin-top: var(--space-2); }
.crew-member .domain { font-family: var(--font-display); font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; color: var(--z-teal-deep); }
.crew-member .motto { font-style: italic; color: var(--z-muted); font-size: var(--step--1); }

/* Character peek: small mascot easing into a section corner */
.char-peek { position: absolute; bottom: 0; right: clamp(0.5rem, 4vw, 3rem); width: clamp(70px, 9vw, 120px); transform: translateY(30%); opacity: 0; transition: transform var(--dur-reveal) var(--ease-out), opacity var(--dur-reveal); pointer-events: none; }
.is-visible .char-peek, .char-peek.is-visible { transform: translateY(4%); opacity: 1; }

/* ==========================================================================
   FORMS
   ========================================================================== */

.field { margin-bottom: var(--space-3); }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-family: var(--font-display); }
.field .hint { font-size: var(--step--1); color: var(--z-muted); margin-top: 0.35rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.8rem 1rem;
  border: 2px solid var(--z-line);
  border-radius: var(--radius-s);
  background: var(--z-white);
  color: var(--z-ink);
  min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--z-teal);
  outline: 3px solid var(--z-teal-ink);
  outline-offset: 0;
}
.field-row { display: grid; gap: var(--space-2); }
@media (min-width: 700px) { .field-row { grid-template-columns: 1fr 1fr; } }

/* Choice chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.6em 1.1em;
  border: 2px solid var(--z-line);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step--1);
  transition: all var(--dur-quick);
  min-height: 44px;
}
.chip input:checked + span { background: var(--z-black); border-color: var(--z-black); color: var(--z-white); }
.chip input:focus-visible + span { outline: 3px solid var(--z-cyan); outline-offset: 2px; }
.chip:hover span { border-color: var(--z-teal); }

/* Option tiles (single-select with description) */
.option-tiles { display: grid; gap: var(--space-2); }
@media (min-width: 700px) { .option-tiles { grid-template-columns: repeat(2, 1fr); } }
.option-tile { position: relative; }
.option-tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option-tile .tile-body {
  border: 2px solid var(--z-line);
  border-radius: var(--radius-m);
  padding: var(--space-2) var(--space-3);
  transition: all var(--dur-quick);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.option-tile strong { font-family: var(--font-display); font-size: var(--step-0); }
.option-tile p { margin: 0; font-size: var(--step--1); color: var(--z-muted); }
.option-tile input:checked + .tile-body { border-color: var(--z-teal); background: var(--z-mist); box-shadow: inset 0 0 0 1px var(--z-teal); }
.option-tile input:focus-visible + .tile-body { outline: 3px solid var(--z-cyan); outline-offset: 2px; }

/* Stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--z-black); border-radius: var(--radius-s); overflow: hidden; }
.stepper button {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  width: 52px; height: 52px;
  border: 0;
  background: var(--z-white);
  cursor: pointer;
  color: var(--z-black);
}
.stepper button:hover { background: var(--z-mist); }
.stepper output {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  min-width: 64px;
  text-align: center;
  border-inline: 2px solid var(--z-black);
  padding: 0.6rem 0.4rem;
  font-variant-numeric: tabular-nums;
}

/* Segmented control */
.segmented { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--z-black); border-radius: var(--radius-s); overflow: hidden; }
.segmented .seg { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: inline-block;
  padding: 0.65em 1.2em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step--1);
  border-right: 1px solid var(--z-line);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.segmented .seg:last-child span { border-right: 0; }
.segmented input:checked + span { background: var(--z-black); color: var(--z-white); }
.segmented input:focus-visible + span { outline: 3px solid var(--z-cyan); outline-offset: -3px; }

/* Accordion */
.accordion { border: 1px solid var(--z-line); border-radius: var(--radius-m); overflow: hidden; }
.accordion details { border-bottom: 1px solid var(--z-line); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-size: 1.4rem; color: var(--z-teal); transition: transform var(--dur-quick); }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .accordion__body { padding: 0 var(--space-3) var(--space-3); color: var(--z-muted); }

/* ==========================================================================
   ESTIMATOR (Build Your Zalik Plan)
   ========================================================================== */

.estimator-layout { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 1020px) {
  .estimator-layout { grid-template-columns: minmax(0, 1fr) 360px; }
}

.est-step { padding-block: var(--space-4); border-top: 3px solid var(--z-black); }
.est-step:first-child { border-top: 0; padding-top: 0; }
.est-step__label {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--z-teal-deep);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-1);
}
.est-step h2 { font-size: var(--step-2); }
.est-step .step-intro { color: var(--z-muted); max-width: 58ch; }

.rate-callout {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-display);
  margin-block: var(--space-2);
}
.rate-callout .rate { font-size: var(--step-3); font-weight: 900; color: var(--z-teal-deep); }
.rate-callout .per { font-weight: 600; color: var(--z-muted); }

.live-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  margin-top: var(--space-2);
  font-variant-numeric: tabular-nums;
}
.live-line .calc { color: var(--z-muted); font-size: var(--step--1); font-weight: 600; display: block; }

/* Sticky plan panel (desktop) */
.plan-panel {
  position: sticky;
  top: 96px;
  background: var(--z-black);
  color: var(--z-white);
  border-radius: var(--radius-m);
  padding: var(--space-3);
}
.plan-panel h2 { color: var(--z-white); font-size: var(--step-1); text-transform: uppercase; letter-spacing: 0.06em; }
.plan-panel dl { margin: 0; }
.plan-panel .plan-row { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: 0.55rem; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.plan-panel .plan-row dt { color: rgba(255, 255, 255, 0.75); font-size: var(--step--1); }
.plan-panel .plan-row dt small { display: block; color: rgba(255, 255, 255, 0.5); }
.plan-panel .plan-row dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-panel .plan-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-2); }
.plan-panel .plan-total .amount { font-family: var(--font-display); font-weight: 900; font-size: var(--step-3); color: var(--z-cyan); font-variant-numeric: tabular-nums; }
.plan-panel .plan-monthly { display: flex; justify-content: space-between; color: rgba(255, 255, 255, 0.75); font-size: var(--step--1); padding-bottom: var(--space-2); }
.plan-panel .plan-embers {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px dashed rgba(37, 211, 255, 0.5);
  border-radius: var(--radius-s);
  font-size: var(--step--1);
  color: rgba(255, 255, 255, 0.85);
}
.plan-panel .plan-embers strong { color: var(--z-cyan); display: block; }

/* Mobile sticky estimate bar */
.plan-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--z-black);
  color: var(--z-white);
  padding: 0.8rem clamp(1.1rem, 4vw, 2rem);
  padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
  border: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.plan-bar .amount { font-family: var(--font-display); font-weight: 900; font-size: var(--step-1); color: var(--z-cyan); font-variant-numeric: tabular-nums; }
@media (max-width: 1019px) {
  .plan-bar { display: flex; }
  .plan-panel { position: fixed; inset: auto 0 0 0; top: auto; z-index: 95; border-radius: var(--radius-m) var(--radius-m) 0 0; max-height: 75vh; overflow-y: auto; transform: translateY(100%); transition: transform 300ms var(--ease-out); }
  .plan-panel.is-open { transform: none; }
  body.plan-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 92; }
}

/* Estimator result states */
.screener-result { border-radius: var(--radius-m); padding: var(--space-3); margin-top: var(--space-3); border: 2px solid var(--z-line); }
.screener-result--maybe { border-color: var(--z-teal); background: var(--z-mist); }
.screener-result--review { border-color: var(--z-cyan); }
.screener-result h3 { font-size: var(--step-1); }

[hidden] { display: none !important; }

/* ==========================================================================
   EVENTS + SOCIAL FEED
   ========================================================================== */

.events-list { display: grid; gap: var(--space-2); }
.event-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  border: 1px solid var(--z-line);
  border-radius: var(--radius-m);
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  color: var(--z-ink);
  transition: border-color var(--dur-quick);
}
.event-row:hover { border-color: var(--z-teal); color: var(--z-ink); }
.event-row__date { text-align: center; font-family: var(--font-display); }
.event-row__date .day { font-size: var(--step-2); font-weight: 900; color: var(--z-teal-deep); display: block; line-height: 1; }
.event-row__date .month { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--step--1); }
.event-row h3 { margin: 0 0 0.2em; font-size: var(--step-1); }
.event-row p { margin: 0; color: var(--z-muted); font-size: var(--step--1); }
@media (max-width: 600px) { .event-row { grid-template-columns: 64px 1fr; } .event-row .pathway__go { display: none; } }

.social-grid { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .social-grid { grid-template-columns: repeat(4, 1fr); } }
.social-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--z-mist);
}
.social-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-quick) var(--ease-out); }
.social-card:hover img { transform: scale(1.04); }
.social-card .social-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--z-white);
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer { background: var(--z-black); color: rgba(255, 255, 255, 0.8); padding-block: var(--space-5) var(--space-3); }
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--z-cyan); }
.footer-grid { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand img { width: 72px; margin-bottom: var(--space-2); }
.footer-brand p { font-size: var(--step--1); max-width: 34ch; }
.site-footer h4 { color: var(--z-white); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: var(--space-2); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: var(--step--1); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: var(--space-4); padding-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }

/* ==========================================================================
   404
   ========================================================================== */

.error-404 { text-align: center; padding-block: var(--space-6); }
.error-404 h1 { font-size: var(--step-4); max-width: 18ch; margin-inline: auto; }
.error-404 img { width: 160px; margin: 0 auto var(--space-3); }

/* ==========================================================================
   CONTENT (default page/post styling)
   ========================================================================== */

.entry-content { max-width: var(--container-narrow); }
.entry-content h2 { margin-top: var(--space-4); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content img { border-radius: var(--radius-m); }
.entry-content blockquote { border-left: 5px solid var(--z-cyan); margin: var(--space-3) 0; padding-left: var(--space-3); font-style: italic; }
.wide-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--z-line); }
th { font-family: var(--font-display); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; }

/* ==========================================================================
   MOTION SAFETY
   ========================================================================== */

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

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
  .site-header, .site-footer, .plan-bar, .hero__media, .char-peek { display: none !important; }
  .plan-panel { position: static; background: none; color: var(--z-black); border: 1px solid var(--z-black); }
}

/* ===== SPA additions ===== */
.site-header { position: sticky; top: 0; }
.photo-slot{border:2px dashed var(--z-line);border-radius:var(--radius-m);background:var(--z-mist);display:grid;place-items:center;text-align:center;padding:var(--space-4) var(--space-3);min-height:200px;color:var(--z-muted)}
.photo-slot span{font-family:var(--font-display);font-weight:700;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--z-teal-deep);display:block;margin-bottom:.4rem}
.photo-slot p{max-width:34ch;margin:0;font-size:.9rem}
.hero .photo-slot,.warriors-band .photo-slot{border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.05);color:rgba(255,255,255,.72)}
.hero .photo-slot span,.warriors-band .photo-slot span{color:var(--z-cyan)}
.fee--pending{color:var(--z-muted);font-weight:500}
.err{color:#b3403a;font-weight:600;font-size:var(--step--1);margin-top:.4rem}
.plan-print{display:none}
@media print{
  body.printing-plan *{visibility:hidden !important}
  body.printing-plan .plan-print,body.printing-plan .plan-print *{visibility:visible !important}
  body.printing-plan .plan-print{display:block !important;position:absolute;left:0;top:0;width:100%;padding:24px;font-family:var(--font-body)}
  .plan-print h1{font-family:var(--font-display);font-size:24px;margin:0 0 4px}
  .plan-print .pp-row{display:flex;justify-content:space-between;border-bottom:1px solid #ccc;padding:8px 0}
  .plan-print .pp-total{font-weight:800;font-size:20px;margin-top:12px;display:flex;justify-content:space-between}
}
.primary-nav a.is-current{color:var(--z-teal-deep);box-shadow:inset 0 -3px 0 var(--z-cyan)}
/* Crest sits on a white plate wherever the ground is dark, because the
   crest's lion and outer type are black linework. */
.logo-plate{display:grid;place-items:center;background:var(--z-white);border-radius:50%;padding:6px;flex-shrink:0}

/* ==========================================================================
   MOBILE HARDENING
   The header CTA must never disappear: it is the primary conversion path.
   Everything below prevents overlap and keeps tap targets honest on phones.
   ========================================================================== */

@media (max-width: 1200px) {
  /* Tagline is decorative once space is tight; the crest and name carry it. */
  .site-brand__tag { display: none; }
  .header-cta { padding: 0.7em 1.05em; font-size: 0.9rem; }
}

@media (max-width: 720px) {
  .site-header__inner { min-height: 66px; gap: 0.5rem; }
  .site-brand img { width: 42px; height: 42px; }
  .site-brand__name { font-size: 0.9rem; letter-spacing: 0.02em; }
  .nav-toggle { padding: 0.45rem 0.65rem; font-size: 0.85rem; }
  .header-cta { padding: 0.65em 0.85em; font-size: 0.82rem; }
  .primary-nav { top: 66px; max-height: calc(100vh - 66px); }
}

@media (max-width: 460px) {
  /* Below this the crest plus two controls is all that fits on one line. */
  .site-brand__name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header-cta { font-size: 0.78rem; padding: 0.6em 0.7em; }
}

@media (max-width: 860px) {
  /* Bands were tuned for desktop rhythm; tighten so sections do not sprawl. */
  :root { --space-6: 3.75rem; --space-5: 2.75rem; }
  .hero__inner { padding-block: clamp(2.5rem, 9vw, 4rem); }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .split { gap: var(--space-3); }
  .motto-strip { gap: 0.5rem 1.25rem; }
  .motto-strip span { font-size: 1.05rem; }
  .pillar { grid-template-columns: 1fr; gap: 0.35rem; }
  .pillar__num { font-size: var(--step-1); }
  .word-reveal { font-size: var(--step-2); gap: 0.25em 0.45em; }
  .warriors-band h2 { font-size: clamp(2.2rem, 12vw, 3.4rem); }
  .bignum { font-size: clamp(2.5rem, 14vw, 4rem); }
  .stories { gap: var(--space-3); }
  .partner-group { grid-template-columns: 1fr; }
  blockquote.pullquote { max-width: none; }
}

@media (max-width: 620px) {
  /* Wide tables and the estimator panel are the two real overflow risks. */
  table { min-width: 34rem; }
  .wide-scroll { -webkit-overflow-scrolling: touch; }
  .option-tiles { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented .seg { flex: 1 1 auto; }
  .segmented span { width: 100%; justify-content: center; }
  .chips { gap: 0.45rem; }
  .chip span { font-size: 0.82rem; padding: 0.55em 0.9em; }
  .stepper button { width: 56px; height: 56px; }
  .est-step { padding-block: var(--space-3); }
  .rate-callout { flex-wrap: wrap; gap: 0.25rem 0.6rem; }
  .rate-callout .rate { font-size: var(--step-2); }
}

/* The mobile estimate bar overlays the page, so the last section needs room
   to clear it and the panel needs a close affordance. */
@media (max-width: 1019px) {
  body.has-plan-bar main { padding-bottom: 5.5rem; }
  .estimator-layout { padding-bottom: 1rem; }
  .plan-panel { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
}

/* Never let a long word or URL push the page sideways. */
h1, h2, h3, p, li, td, th, summary { overflow-wrap: break-word; }
.container { overflow-x: clip; }
img, svg, iframe, table { max-width: 100%; }

/* Sticky header offset for in-page anchors. */
:target { scroll-margin-top: 90px; }

/* Labels for radio/checkbox groups: styled like a field label but not a
   <label>, since they point at a group rather than one control. */
.group-label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-family: var(--font-display); }

/* Photography. Placeholder stock until real Zalik images land: see
   public/img/CREDITS.txt. Fixed aspect so swapping an image cannot reflow
   the page, and a mist ground so a slow load is not a white hole. */
.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-m);
  background: var(--z-mist);
}
.hero .photo, .warriors-band .photo { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.split .photo { aspect-ratio: 4 / 5; }
@media (max-width: 860px) { .split .photo { aspect-ratio: 3 / 2; } }
