/* Smart Launch — smartlaunch.me
   Mobile-first. Palette, type and logo rules from _brand_guideline/ (Concept 5, The Crossing Bridge 5.1). */

/* ---------- Fonts (self-hosted, variable weight) ---------- */
@font-face {
  font-family: "Inter";   /* headings; the display cut is picked automatically at heading sizes */
  src: url("fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Dancing Script";
  src: url("fonts/DancingScript.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Brand tokens ---------- */
:root {
  --blue-deep: #1f5a93;        /* buttons, links, H1/H2, crisis bar, "Launch" */
  --blue-deep-hover: #174673;
  --blue-sky: #e3effa;         /* fill only */
  --plum: #5a3d5c;             /* bridge mark, "Smart", H3, secondary borders */
  --plum-dark: #321f33;        /* text on peach fills */
  --peach: #e8a88a;            /* border and fill only, never text */
  --peach-fill: #fceddf;
  --gold: #d4a237;             /* border and fill only, never text */
  --gold-fill: #f5e4b8;
  --green-accent: #388e3c;     /* icons, checkmarks, borders; never text */
  --green-deep: #1b5e20;       /* green text */
  --cream: #fbf9f5;
  --white: #ffffff;
  --text: #1f2937;             /* all body copy */
  --muted: #52606d;
  --border: #d8e0e8;
  --focus: #1f5a93;
  /* No approved error color exists; these are carried over from the previous site. */
  --error-fill: #fdecea;
  --error-border: #e5a29b;
  --error-text: #6b1d16;
  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 12px;
  --radius-control: 8px;
  --content-width: 760px;
}

/* ---------- Reset-ish base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;      /* 17px on 26px */
  line-height: 1.53;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blue-deep);
  line-height: 1.2;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 2.75rem); line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 1.875rem); }
h3, h4 { color: var(--plum); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
p { margin: 0 0 1em; }
a { color: var(--blue-deep); }
a:not(.btn) { text-decoration-thickness: 1px; text-underline-offset: 2px; }
ul, ol { padding-left: 1.25em; }
small { font-size: 0.875rem; }
button, input, select, textarea { font-family: inherit; }

/* ---------- Logo: Mark 5.1 bridge + Wordmark 5 ---------- */
.bridge-mark { display: block; flex: none; }
.wordmark {
  font-family: var(--font-heading);   /* Inter, matching the approved client reference wordmark */
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  white-space: nowrap;
}
.wordmark__smart { font-weight: 400; }
.wordmark__launch { font-weight: 700; }
/* Lockups keep the mark at 2.1x to 2.25x the wordmark size (never under 2x). */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--plum);        /* two-tone: plum mark and "Smart", blue-deep "Launch" */
}
.brand .wordmark { font-size: 1.25rem; }
.brand .wordmark__launch { color: var(--blue-deep); }
.brand--footer { gap: 0.875rem; min-height: 0; }
.brand--footer .wordmark { font-size: 1.5rem; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.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;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--blue-deep);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 6px;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
}

/* ---------- Crisis bar ---------- */
.crisis-bar {
  background: var(--blue-deep);
  color: var(--white);
  font-size: 0.9375rem;
  line-height: 1.4;
}
.crisis-bar__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  align-items: center;
}
.crisis-bar__text { font-weight: 500; }
.crisis-bar__link {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.25rem 0.1rem;
}
.crisis-bar__sep { opacity: 0.7; }
.crisis-bar__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem 0.7rem;
  border-radius: 4px;
  background: var(--white);
  color: var(--blue-deep);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}
.crisis-bar__more::after { content: "\2192"; margin-left: 0.35em; }
.crisis-bar__more:hover { background: var(--blue-sky); }
/* The standard blue ring would vanish on the blue bar. */
.crisis-bar a:focus-visible { outline-color: var(--white); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.5rem 1rem;
  max-width: var(--content-width);
  margin: 0 auto;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 -0.5rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--blue-deep);
  border-radius: 6px;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a.site-nav__login {
  min-height: 36px;
  margin: 4px 0.5rem;
  padding: 0 0.75rem;
  border: 2px solid var(--blue-deep);
  font-weight: 700;
}
.site-nav a.site-nav__login:hover { background: var(--blue-sky); text-decoration: none; }

/* ---------- Main / layout ---------- */
.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack > * { margin: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 0 0 1rem;
}
.hero__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 58% center;
  border-radius: var(--radius);
}
@media (min-width: 640px) {
  .hero__image { aspect-ratio: 16 / 9; }
}
.hero__badges {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero__badges li {
  background: var(--peach-fill);
  border: 1px solid var(--peach);
  color: var(--plum-dark);
  border-radius: 6px;
  padding: 0.2rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.hero__subtitle {
  font-size: 1.1875rem;
  line-height: 1.5;
}

/* ---------- Cards / callouts / notices ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h2 { font-size: 1.5rem; }
/* Fills carry dark text only: blue-sky, peach and gold are never text colors. */
.callout {
  background: var(--blue-sky);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.notice {
  background: var(--peach-fill);
  border: 1px solid var(--peach);
  border-radius: var(--radius);
  color: var(--plum-dark);
  padding: 1.25rem;
}
.notice h2 { font-size: 1.5rem; }
.notice--emergency {
  background: var(--gold-fill);
  border-color: var(--gold);
  color: var(--text);
}

/* ---------- Section bands (list of headings, etc.) ---------- */
.section-band {
  background: var(--blue-sky);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  color: var(--blue-deep);
}
.section-preview {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ---------- CTA buttons ---------- */
.cta-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (min-width: 640px) {
  .cta-group { grid-template-columns: 1fr 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-control);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1.0625rem;
  width: 100%;
  text-align: center;
}
@media (min-width: 640px) {
  .btn { width: auto; }
}
.btn--primary {
  background: var(--blue-deep);
  color: var(--white);
}
.btn--primary:hover,
.btn--primary:active { background: var(--blue-deep-hover); }
.btn--secondary {
  background: var(--white);
  color: var(--blue-deep);
  border-color: var(--blue-deep);
}
.btn--secondary:hover,
.btn--secondary:active { background: var(--blue-sky); }
.btn--ghost {
  background: transparent;
  color: var(--blue-deep);
  border-color: transparent;
  text-decoration: underline;
}
.btn:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* ---------- Forms (used by the wizard) ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1rem;
}
.field label {
  font-weight: 500;
}
.field input,
.field textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--text);
  min-height: 44px;
}

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}
.checklist__item input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--green-accent);
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

/* ---------- Progress ---------- */
.progress {
  height: 8px;
  background: var(--blue-sky);
  color: var(--blue-deep);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--green-accent);
}

/* ---------- Signature preview ---------- */
.signature-preview {
  font-family: "Dancing Script", cursive;
  font-size: 2rem;
  color: var(--blue-deep);
}

/* ---------- Page image ---------- */
.page-image {
  width: 100%;
  border: 1px solid var(--muted);
  border-radius: 6px;
}

/* ---------- Resource cards (crisis page) ---------- */
.resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.resource-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Sources list ---------- */
.sources-list li {
  margin-bottom: 0.75rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.site-footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}
.site-footer__words {
  color: var(--plum);
  font-weight: 500;
  margin: 0.5rem 0 0;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0.75rem 0 0.5rem;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer__disclaimer {
  font-size: 0.875rem;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .crisis-bar,
  .site-header,
  .site-footer,
  .btn,
  .skip-link {
    display: none !important;
  }
  body { background: var(--white); }
  .site-main { max-width: none; padding: 0; }
}

/* Wizard and done page (moved out of templates so the CSP can stay strict). */
[hidden] { display: none !important; }
.wizard-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.step-counter { font-weight: 500; }
.progress__bar { background: currentColor; height: 100%; width: 0; transition: width .2s ease; }
.wizard-start-over { margin-top: 2rem; }

/* ---------- Accounts, portal, admin (Phase 5) ---------- */
.narrow { max-width: 520px; }
.site-nav__form { display: inline; }
.site-nav__button {
  font: inherit; font-size: 1rem; font-weight: 500; color: var(--blue-deep); background: none; border: 0;
  padding: 0.5rem; min-height: 44px; cursor: pointer; text-decoration: none;
}
.site-nav__button:hover { text-decoration: underline; }
.flashes { margin: 0 0 1rem; }
.flash { margin: 0 0 0.5rem; padding: 0.75rem 1rem; border-radius: var(--radius-control); border: 1px solid var(--green-accent); background: var(--white); color: var(--text); }
.flash--error { background: var(--error-fill); border-color: var(--error-border); color: var(--error-text); }
.field__hint { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.field select { font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--muted); border-radius: var(--radius-control); background: var(--white); color: var(--text); min-height: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.link-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.link-list a { display: inline-flex; align-items: center; min-height: 44px; }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.inline-form input { font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--muted); border-radius: var(--radius-control); min-height: 44px; flex: 1 1 200px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.tile { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; }
.tile__n { font-family: var(--font-heading); font-size: 2rem; color: var(--blue-deep); font-weight: 700; line-height: 1.1; }
.tile__l { font-size: 0.875rem; line-height: 1.4; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--text); font-weight: 700; }
.table .num { text-align: right; }
.table small { color: var(--muted); }
.warn { color: #8a3b12; font-weight: 700; }
.qr svg { width: 200px; height: 200px; display: block; }
details summary { cursor: pointer; font-weight: 500; min-height: 44px; display: flex; align-items: center; }
.cookie-notice {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--white); border-top: 2px solid var(--blue-deep);
  padding: 0.75rem 1rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap;
}
.cookie-notice p { margin: 0; flex: 1 1 280px; font-size: 0.875rem; line-height: 1.5; }
.cookie-notice .btn { width: auto; min-height: 40px; padding: 0.4rem 1rem; }
@media (max-width: 640px) { .table { display: block; overflow-x: auto; } }

.code-input { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; font-family: var(--font-mono); }
/* Masked like a password until the eye button reveals it. */
.code-wrap { position: relative; display: flex; }
.inline-form .code-wrap { flex: 1 1 200px; }
.code-wrap .code-input { width: 100%; padding-right: 3rem; border: 2px solid var(--plum); -webkit-text-security: disc; }
.code-wrap .code-input--shown { -webkit-text-security: none; }
.code-toggle { position: absolute; top: 0; right: 0; bottom: 0; width: 3rem; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; }
.code-toggle:hover { color: var(--blue-deep); }
.code-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.code-toggle .code-toggle__eye-off { display: none; }
.code-toggle[aria-pressed="true"] .code-toggle__eye { display: none; }
.code-toggle[aria-pressed="true"] .code-toggle__eye-off { display: inline; }
.code-cell { font-family: var(--font-mono); letter-spacing: 0.1em; }

/* ---------- School landing page ---------- */
/* Founder video under the hero (portrait phone recording), kept to a readable height and centered. */
.page-home .site-main > .hero + .video-feature { margin-top: 0; }
.video-feature__player { display: block; width: 100%; max-width: 420px; max-height: 80vh; margin: 0 auto; border-radius: var(--radius); background: #000; aspect-ratio: 9 / 16; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8125rem; font-weight: 700; color: var(--plum); margin: 0; }
.page-home .hero h1 { font-size: clamp(2.125rem, 1.2rem + 4vw, 3rem); }
.page-home .site-main > section + section { margin-top: 2.5rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
.steps__item { position: relative; padding-top: 1.25rem; }
.steps__item h3 { margin: 0.25rem 0 0.5rem; }
.steps__item p { margin: 0; }
.steps__n { display: inline-flex; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue-deep); color: var(--white); font-weight: 700; align-items: center; justify-content: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.checks li { padding-left: 1.75rem; position: relative; }
.checks li::before { content: "\2713"; position: absolute; left: 0.25rem; color: var(--green-accent); font-weight: 700; }
.principles { padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.pricing { border-color: var(--blue-deep); }
.pricing__amount { margin: 0; }
.pricing__number { font-family: var(--font-heading); font-size: 2.75rem; font-weight: 700; letter-spacing: -0.01em; color: var(--blue-deep); }
.pricing__per { color: var(--muted); }
.faq { border-bottom: 1px solid var(--border); padding: 0.25rem 0; }
.faq p { margin: 0 0 0.75rem; }
.family { border-color: var(--plum); }

/* ---------- Legal pages, acceptance checkbox, copyright ---------- */
.legal h2 { font-size: 1.25rem; margin-top: 1.5rem; }
.legal ul { padding-left: 1.25rem; }
/* Block, not flex: as flex items the links inside the label could not wrap and ran off narrow screens. */
.field--check label { display: block; padding-left: 1.85rem; font-weight: 400; line-height: 1.4; }
.field--check input { float: left; width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0.15rem 0 0 -1.85rem; padding: 0; accent-color: var(--green-accent); }
.site-footer__copyright { font-size: 0.8125rem; margin: 0.75rem 0 0; }
