/* Layout: a Cartagena wall-and-sea page. Sky-tinted hero where the mascot stands on an orange crenellated wall,
   then calm content bands; chunky outlined "sticker" cards echo the logo. Tale floats bottom-right as the guide. */
@font-face {
  font-family: "Fredoka"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/figtree-latin.woff2") format("woff2");
}
:root {
  --bg: #F5FAF8;
  --surface: #FFFFFF;
  --sky: #DDF5F0;
  --sand: #FFF3E4;
  --fg: #12302C;
  --fg-muted: #4A6863;
  --line: #CFE4DF;
  --heading: #0B4A43;
  --brand: #17C2AE;
  --brand-ink: #0B6B5F;
  --outline: #0B5A51;
  --accent: #C2410C;
  --accent-ink: #B9400F;
  --on-accent: #FFFFFF;
  --wall: #FF7442;
  --wall-dark: #E0581F;
  --sun: #FFC61A;
  --tale: #1F7FD6;
  --tale-navy: #16224A;
  --on-tale: #FFFFFF;
  --shadow: 0 10px 30px rgba(11, 74, 67, 0.12);
  --font-display: "Fredoka", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 22px;
  --max: 1140px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1E1D; --surface: #10302D; --sky: #0E3633; --sand: #1B2723;
    --fg: #E4F4F1; --fg-muted: #A2C2BC; --line: #22504A; --heading: #E9FBF7;
    --brand: #2BD9C3; --brand-ink: #4FE6D2; --outline: #2BD9C3;
    --accent: #C2410C; --accent-ink: #FF9468; --on-accent: #FFFFFF;
    --wall: #E8642F; --wall-dark: #B9471A; --sun: #FFC61A; --tale: #5BB4FF; --tale-navy: #0B1430;
    --on-tale: #0B1430;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1E1D; --surface: #10302D; --sky: #0E3633; --sand: #1B2723;
  --fg: #E4F4F1; --fg-muted: #A2C2BC; --line: #22504A; --heading: #E9FBF7;
  --brand: #2BD9C3; --brand-ink: #4FE6D2; --outline: #2BD9C3;
  --accent: #C2410C; --accent-ink: #FF9468; --on-accent: #FFFFFF;
  --wall: #E8642F; --wall-dark: #B9471A; --sun: #FFC61A; --tale: #5BB4FF; --tale-navy: #0B1430;
  --on-tale: #0B1430;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--surface);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); }
h1, h2, h3 { font-family: var(--font-display); color: var(--heading); line-height: 1.12; margin: 0; text-wrap: balance; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--tale); outline-offset: 3px; border-radius: 8px; }

.wrap {
  max-width: var(--max); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: clamp(56px, 8vw, 96px); }
.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink);
}
.lead { color: var(--fg-muted); font-size: 1.12rem; max-width: 60ch; }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 720px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 40px; height: 47px; object-fit: contain; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.01em; }
.wordmark .g { color: var(--brand-ink); }
.wordmark .l { color: var(--accent-ink); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.nav a:hover { color: var(--brand-ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  display: inline-flex; border: 2px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg);
}
.lang a {
  color: var(--fg-muted); font: 700 0.85rem var(--font-body); text-decoration: none;
  padding: 8px 12px; border-radius: 999px; letter-spacing: 0.04em; min-height: 36px; display: inline-flex; align-items: center;
}
.lang a[aria-current="true"] { background: var(--brand); color: #052B27; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1.06rem var(--font-display); letter-spacing: 0.01em;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 3px solid var(--outline); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 4px 4px 0 var(--outline); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--outline); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--outline); }
.btn-ghost { background: var(--surface); color: var(--heading); }
.btn-ghost:hover { background: var(--sky); }
.btn-sm { padding: 8px 16px; font-size: 0.95rem; box-shadow: 3px 3px 0 var(--outline); }

/* Hero */
.hero { background: var(--sky); position: relative; overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: end;
  padding-top: clamp(40px, 6vw, 72px);
}
.hero-copy { display: grid; gap: 20px; padding-bottom: clamp(48px, 7vw, 88px); min-width: 0; }
.hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.2rem); font-weight: 700; }
.hero h1 .hl { color: var(--accent-ink); }
.hero .lead { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem); color: var(--fg); opacity: 0.88; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 0; }
.hero-tags li {
  font-size: 0.88rem; font-weight: 600; color: var(--brand-ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.hero-art { position: relative; align-self: end; display: grid; justify-items: center; }
.hero-art .sun {
  position: absolute; width: min(82%, 400px); aspect-ratio: 1; border-radius: 50%; top: 4%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sun) 55%, transparent) 0%, transparent 68%);
}
.hero-art img { position: relative; width: min(100%, 340px); margin-bottom: -6px; animation: bob 4.5s ease-in-out 4; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Crenellated wall that the hero sits on */
.wall {
  height: 58px; position: relative;
  background:
    repeating-linear-gradient(90deg, var(--wall) 0 46px, transparent 46px 76px) top / 100% 22px no-repeat,
    linear-gradient(var(--wall), var(--wall)) bottom / 100% 36px no-repeat;
}
.wall::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  background:
    repeating-linear-gradient(90deg, transparent 0 58px, var(--wall-dark) 58px 61px),
    linear-gradient(transparent 16px, var(--wall-dark) 16px 19px, transparent 19px);
  opacity: 0.55;
}
.sea {
  height: 26px;
  background:
    radial-gradient(14px 12px at 14px 0, var(--brand) 98%, transparent) 0 0 / 28px 14px repeat-x,
    linear-gradient(var(--bg), var(--bg));
}

/* What they learn */
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.learn-card {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: grid; gap: 12px; align-content: start; min-width: 0;
}
.learn-card .icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--sky); color: var(--brand-ink);
}
.learn-card:nth-child(2) .icon { background: var(--sand); color: var(--accent-ink); }
.learn-card:nth-child(3) .icon { background: color-mix(in srgb, var(--tale) 16%, var(--surface)); color: var(--tale); }
.learn-card p { color: var(--fg-muted); }

/* Programs */
.programs { background: var(--sand); }
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.program {
  background: var(--surface); border: 3px solid var(--outline); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--outline); padding: 26px; display: grid; gap: 14px;
  grid-template-rows: auto auto 1fr auto auto; min-width: 0;
}
.program .age {
  justify-self: start; font: 700 0.92rem var(--font-display); letter-spacing: 0.02em;
  padding: 5px 14px; border-radius: 999px; color: #0B2A26;
}
.program:nth-child(1) .age { background: var(--sun); }
.program:nth-child(2) .age { background: var(--brand); }
.program:nth-child(3) .age { background: var(--wall); color: #2A0E03; }
.program h3 { font-size: 1.6rem; }
.program p { color: var(--fg-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: 0.82rem; font-weight: 600; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.program dl { margin: 0; display: grid; gap: 6px; border-top: 1.5px dashed var(--line); padding-top: 14px; font-size: 0.94rem; }
.program dl div { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.program dt { color: var(--fg-muted); }
.program dd { margin: 0; font-weight: 600; }
.program .btn { justify-self: start; }

/* Class flow */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.flow li { display: grid; gap: 10px; align-content: start; position: relative; min-width: 0; }
.flow .num {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font: 700 1.3rem var(--font-display); background: var(--surface); color: var(--heading);
  border: 3px solid var(--outline);
}
.flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 26px; left: 62px; right: -6px; border-top: 3px dotted var(--line);
}
.flow h3 { font-size: 1.15rem; }
.flow p { color: var(--fg-muted); font-size: 0.96rem; }
.flow-note { margin-top: 28px; color: var(--fg-muted); }

/* Why */
.why { background: var(--surface); border-block: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.why-item { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.why-item .mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--sky); color: var(--brand-ink);
  display: grid; place-items: center;
}
.why-item h3 { font-size: 1.22rem; margin-bottom: 6px; }
.why-item p { color: var(--fg-muted); }

/* Meet Tale */
.meet { background: var(--tale-navy); color: #DCE6FF; position: relative; overflow: hidden; }
.meet .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.meet h2 { color: #FFFFFF; }
.meet .eyebrow { color: #8FCBFF; }
.meet p { color: #C5D3F5; max-width: 52ch; }
.meet-art { position: relative; display: grid; place-items: center; }
.meet-art::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 155, 255, 0.35), transparent 70%);
}
.meet-art img { position: relative; width: min(100%, 320px); }
.meet-copy { display: grid; gap: 18px; min-width: 0; }
.meet-qs { display: flex; flex-wrap: wrap; gap: 8px; }
.meet-qs button {
  font: 600 0.92rem var(--font-body); color: #E8F1FF; background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(143, 203, 255, 0.45); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.meet-qs button:hover { background: rgba(46, 155, 255, 0.25); }
.meet .btn-primary { --outline: #8FCBFF; }

/* FAQ */
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq-list details {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 0 22px;
}
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 0; font: 600 1.1rem var(--font-display); color: var(--heading);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font: 700 1.5rem var(--font-display); color: var(--accent-ink); flex-shrink: 0; transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding-bottom: 20px; color: var(--fg-muted); max-width: 65ch; }

/* Enrollment */
.enroll { background: var(--sky); }
.enroll-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 32px; align-items: start; }
.form-card {
  background: var(--surface); border: 3px solid var(--outline); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--outline); padding: clamp(20px, 4vw, 34px); min-width: 0;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--fg); background: var(--bg);
  border: 2px solid var(--line); border-radius: 12px; padding: 11px 14px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--fg-muted); }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.form-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; }
.form-status {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--sand);
  border: 1.5px solid var(--line); font-size: 0.96rem;
}
.contact-card { display: grid; gap: 18px; }
.contact-card .item { display: grid; gap: 2px; }
.contact-card .k { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; color: var(--fg-muted); }
.contact-card .v { font-weight: 600; font-size: 1.05rem; }
.contact-card .tale-tip {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  background: var(--tale-navy); color: #DCE6FF; border-radius: 18px; padding: 14px; font-size: 0.95rem;
}
.contact-card .tale-tip img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #0B1430; }
.contact-card .tale-tip button {
  background: none; border: 0; padding: 0; color: #8FCBFF; font: 700 0.95rem var(--font-body); cursor: pointer; text-decoration: underline;
}

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-block: 28px; }
.site-footer p { color: var(--fg-muted); font-size: 0.92rem; }

/* ---------- Tale widget ---------- */
.tale-fab {
  position: fixed; z-index: 70;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 72px; height: 72px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--tale-navy); border: 3px solid var(--tale);
  box-shadow: 0 0 0 0 rgba(46, 155, 255, 0.5), 0 8px 24px rgba(10, 20, 50, 0.35);
  animation: glow 2.8s ease-out 3;
}
.tale-fab img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tale-fab[aria-expanded="true"] { animation: none; }
@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(46, 155, 255, 0.55), 0 8px 24px rgba(10, 20, 50, 0.35); }
  70% { box-shadow: 0 0 0 16px rgba(46, 155, 255, 0), 0 8px 24px rgba(10, 20, 50, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(46, 155, 255, 0), 0 8px 24px rgba(10, 20, 50, 0.35); }
}
.tale-teaser {
  position: fixed; z-index: 70;
  right: calc(104px + env(safe-area-inset-right, 0px)); bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); color: var(--fg); border: 2px solid var(--tale);
  border-radius: 18px 18px 4px 18px; padding: 10px 40px 10px 14px; max-width: 250px;
  font-size: 0.95rem; font-weight: 600; box-shadow: var(--shadow); cursor: pointer;
}
.tale-teaser .x {
  position: absolute; top: 2px; right: 2px; background: none; border: 0; color: var(--fg-muted);
  font-size: 1.3rem; cursor: pointer; line-height: 1; width: 36px; height: 36px; border-radius: 50%;
}
.tale-panel {
  position: fixed; z-index: 80;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  width: min(390px, calc(100vw - 40px)); height: min(580px, calc(100vh - 140px));
  background: var(--surface); border: 2px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  display: grid; grid-template-rows: auto 1fr auto auto auto; overflow: hidden;
}
.tale-head {
  background: var(--tale-navy); color: #fff; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px;
  align-items: center; padding: 12px 14px;
}
.tale-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tale); }
.tale-head strong { font: 600 1.15rem var(--font-display); display: block; line-height: 1.1; }
.tale-head span { font-size: 0.82rem; color: #A9C4F2; display: flex; align-items: center; gap: 6px; }
.tale-head span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3BE58A; }
.tale-head button {
  background: rgba(255, 255, 255, 0.1); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.tale-log { overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 0.96rem; line-height: 1.5; overflow-wrap: anywhere; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1.5px solid var(--line); border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; background: var(--tale-navy); color: #EEF3FF; border-bottom-right-radius: 6px; }
.msg .act {
  display: inline-block; margin-top: 10px; font: 700 0.92rem var(--font-display); color: var(--on-accent);
  background: var(--accent); border: 2px solid var(--outline); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--tale); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.tale-chips { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--bg); border-top: 1px solid var(--line); }
.tale-chips button {
  flex-shrink: 0; font: 600 0.85rem var(--font-body); color: var(--brand-ink); background: var(--surface);
  border: 1.5px solid var(--brand); border-radius: 999px; padding: 5px 12px; cursor: pointer;
}
.tale-chips button:hover { background: var(--sky); }
.tale-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px calc(10px + 0px); border-top: 1px solid var(--line); }
.tale-form input {
  font: inherit; font-size: 1rem; color: var(--fg); background: var(--bg); border: 2px solid var(--line);
  border-radius: 999px; padding: 9px 16px; min-width: 0;
}
.tale-form input:focus { outline: none; border-color: var(--tale); }
.tale-form button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tale); color: var(--on-tale); cursor: pointer;
  display: grid; place-items: center;
}


/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--tale-navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Mobile menu */
.menu-btn {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg); color: var(--heading); cursor: pointer;
}
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0 14px; display: grid; }
.mobile-nav a { display: block; padding: 12px 4px; font-weight: 600; color: var(--fg); text-decoration: none; font-size: 1.05rem; }
.mobile-nav a:hover { color: var(--brand-ink); }

/* Form: requirements and errors */
.req { color: var(--accent-ink); font-weight: 700; }
.form-note { font-size: 0.9rem; color: var(--fg-muted); margin-bottom: 16px; }
.hint { font-size: 0.86rem; color: var(--fg-muted); }
.err { font-size: 0.9rem; color: var(--accent-ink); font-weight: 600; }
.err[hidden] { display: none; }
.field [aria-invalid="true"] { border-color: var(--accent); }
.consent [aria-invalid="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent a { color: var(--brand-ink); font-weight: 600; }
.form-status.ok { background: var(--sky); border-color: var(--brand); }
.form-status.bad { border-color: var(--accent); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.contact-card .v a { color: var(--brand-ink); }

/* Footer links */
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.footer-links a { color: var(--brand-ink); font-weight: 600; }

/* Tale privacy note */
.tale-note { font-size: 0.8rem; color: var(--fg-muted); padding: 6px 14px 0; background: var(--bg); }

/* Legal pages */
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-bottom: 12px; }
.legal h2 { font-size: 1.45rem; margin: 36px 0 12px; }
.legal h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--fg); }
.legal p + p { margin-top: 12px; }
.legal ul, .legal ol { padding-left: 1.3em; display: grid; gap: 6px; }
.legal .meta { color: var(--fg-muted); font-size: 0.95rem; }
.legal .summary {
  background: var(--sky); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0;
}
.legal nav { margin: 20px 0; }
.legal table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.95rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.not-found { text-align: center; display: grid; gap: 18px; justify-items: center; }
.not-found img { width: 180px; }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .mobile-nav.open { display: block; }
  .learn-grid, .program-grid { grid-template-columns: 1fr; max-width: 560px; }
  .flow { grid-template-columns: 1fr; gap: 20px; }
  .flow li { grid-template-columns: 52px 1fr; column-gap: 16px; }
  .flow li .num { grid-row: span 2; }
  .flow li:not(:last-child)::after { top: 58px; bottom: -18px; left: 25px; right: auto; border-top: 0; border-left: 3px dotted var(--line); }
  .why-grid { grid-template-columns: 1fr; }
  .enroll-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-art img { width: min(70%, 260px); }
  .meet .wrap { grid-template-columns: 1fr; }
  .meet-art img { width: min(60%, 240px); }
  .form-grid { grid-template-columns: 1fr; }
  .brand .wordmark { font-size: 1.3rem; }
  .header-actions .btn { display: none; }
}
@media (max-width: 520px) {
  .tale-panel {
    right: 0; left: 0; bottom: 0; width: 100%; height: min(86vh, 640px);
    border-radius: 24px 24px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
  }
  .tale-teaser { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
