/* ============================================================
   Clever School + KenAI Landing — styles
   Brand: KenAI-Brand-Colours.pdf v1.0 (LIGHT theme)
   - Brand purple  #6F36DD  (KenAI: CTAs, highlights, focus rings)
   - Clever green  #3DCC55  (Clever School accents; darkened for text)
   - Success #00BF63 · Error #D4183D
   - Radius 10px, solid colours only (no gradients), light-first
   Menu design, structure and animations ported from kenai-landing.
   ============================================================ */

/* ---------- Self-hosted fonts ----------
   Display: Lexend Deca (variable, 100–900)
   Body:    DM Sans (400 / 500 / 600 / 700) */

@font-face {
  font-family: "Lexend Deca";
  src: url("../fonts/LexendDeca.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f0f0f0;      /* cards, quotes, plan cards, FAQ items */
  --surface-2: #e6e6e8;    /* deeper surface accents */
  --surface-hover: #e9e9eb;
  --band: #f7f7f8;         /* alternating section background */
  --border: rgba(35, 35, 35, 0.1);
  --text: #232323;
  --text-70: rgba(35, 35, 35, 0.7);
  --text-50: rgba(35, 35, 35, 0.55);
  --text-30: rgba(35, 35, 35, 0.35);
  --brand: #6f36dd;
  --brand-soft: rgba(111, 54, 221, 0.1);
  --green: #3dcc55;
  --green-soft: rgba(61, 204, 85, 0.14);
  --green-deep: #2aa344;   /* green with enough contrast for text on white */
  --success: #00bf63;
  --success-soft: rgba(0, 191, 99, 0.14);
  --error: #d4183d;
  --error-soft: rgba(212, 24, 61, 0.14);
  --dark: #1c1c1e;         /* footer surface */
  --radius: 10px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Lexend Deca", "DM Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 104px; }
@media (max-width: 520px) {
  html { scroll-padding-top: 76px; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the width/height attributes (set for CLS) from
   distorting images once max-width scales them down */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 840px; }

/* ---------- Header ---------- */

/* fixed bar, hidden over the hero — slides in once the user scrolls
   past it (.site-header--visible toggled by js/main.js) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  /* white bar over a white page needs a hairline + soft shadow */
  background: #ffffff;
  border-bottom: 1px solid rgba(35, 35, 35, 0.08);
  box-shadow: 0 2px 14px rgba(35, 35, 35, 0.06);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.35s;
}
.site-header--visible {
  transform: translateY(0);
  visibility: visible;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

/* Clever School logo (full wordmark at every breakpoint) */
.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.logo .logo-school { height: 34px; width: auto; }

.site-header .logo img { transition: transform 0.25s ease; }
.site-header .logo:hover img { transform: scale(1.05); }

.header-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #7e48e6; }

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: rgba(35, 35, 35, 0.25);
}
.btn--secondary:hover { border-color: rgba(35, 35, 35, 0.5); }

.btn--small { padding: 9px 16px; font-size: 14px; white-space: nowrap; }

/* ---------- Type helpers ---------- */

.eyebrow {
  display: block;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h3 { font-size: 19px; font-weight: 700; }

.lead { color: var(--text-70); font-size: clamp(17px, 2vw, 20px); }

.micro-proof { color: var(--text-50); font-size: 14px; margin-top: 16px; }

.section-intro { color: var(--text-70); max-width: 640px; }
.section-intro--wide { max-width: 820px; }

/* ---------- Sections ---------- */

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--band { background: var(--band); }
.section--center { text-align: center; }
.section--center .section-intro { margin-left: auto; margin-right: auto; }

.section-head { margin-bottom: 36px; }

/* ---------- Hero ---------- */

.hero { padding: 88px 0 84px; }

/* centered hero: copy block on top, app showcase below */
.hero--center { text-align: center; }
.hero--center .hero-copy { max-width: 900px; margin: 0 auto; }
.hero--center .lead {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero-copy .lead { margin-top: 18px; }

.hero-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-top: 24px;
  color: var(--text-70);
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
}
.hero-panel b { color: var(--text); }
.hero--center .hero-panel { max-width: 640px; margin-left: auto; margin-right: auto; }

/* set by js/main.js on ≥768px viewports: the panel sentence stays on
   one line, font auto-shrunk to fit; phones wrap normally */
.oneline { white-space: nowrap; }
.hero-panel.oneline { max-width: max-content; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}
.hero--center .hero-ctas { justify-content: center; }

/* iPad on desktop, the two iPhones on mobile (.mockup-* helpers) */
.hero-showcase {
  margin-top: 56px;
  animation: fadeUp 0.7s 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.hero-showcase img { filter: drop-shadow(0 16px 30px rgba(35, 35, 35, 0.16)); }

/* hero entrance choreography */
.hero-copy > * { animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.34s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.44s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.54s; }

/* ---------- Cards / quotes / grids ---------- */

.card {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.card:hover { transform: translateY(-5px); background: var(--surface-hover); }
.card p { color: var(--text-50); font-size: 14.5px; margin-top: 6px; }
.card--pad-lg { padding: 32px; }
/* a feature block inside a card inherits the card's padding */
.card .feature { padding: 0; }

.grid { display: grid; gap: 20px; }
@media (min-width: 760px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Steps — editorial numbered flow ----------
   No tiles: each step sits under a hairline rule with a purple
   accent bar that stretches on hover, led by a big ghost number. */

.steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  gap: 36px 28px;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li {
  counter-increment: step;
  position: relative;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.steps li::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--green);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.steps li:hover::after { width: 100%; }
.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  color: rgba(42, 163, 68, 0.32);
  margin-bottom: 12px;
}
.steps li b { display: block; margin-bottom: 4px; font-size: 17px; }
.steps li span { color: var(--text-50); font-size: 14px; }

/* ---------- Difference cards — icon chips ---------- */

.diff-card { padding: 28px 24px; }
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-deep);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.icon-chip svg { width: 22px; height: 22px; }
.diff-card h3 { margin: 18px 0 0; font-size: 17.5px; }
.diff-card:hover .icon-chip { background: var(--green-deep); color: #fff; }

/* ---------- Skills table (with the university traits as its footer) ---------- */

.skills-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.skills-table td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.skills-table tbody tr:nth-child(even) td { background: #fafafa; }
.skills-table tbody tr { transition: background-color 0.15s ease; }
.skills-table tbody tr:hover td { background: var(--green-soft); }
.skills-table .st-name {
  width: 32%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16.5px;
  white-space: nowrap;
}
.skills-table .st-desc { color: var(--text-70); font-size: 15px; }
.skills-table tbody tr:last-child td { border-bottom: none; }

/* left-aligned subheadings introducing each table */
.table-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  margin: 0 0 20px;
}
.skills-table + .table-heading { margin-top: 40px; }

/* trait name cell: sketched icon chip + label */
.st-trait { display: inline-flex; align-items: center; gap: 12px; }
.st-trait .tr-ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green-deep);
}
.st-trait .tr-ic svg { width: 17px; height: 17px; }
/* mobile: rows stack into full-width blocks, like the kenai-landing tables */
@media (max-width: 640px) {
  .skills-table,
  .skills-table tbody,
  .skills-table tr,
  .skills-table td {
    display: block;
    width: 100%;
  }
  .skills-table tr { padding: 14px 18px; }
  .skills-table tr + tr { border-top: 1px solid var(--border); }
  .skills-table td {
    padding: 0;
    border: none;
    white-space: normal;
  }
  .skills-table td + td { margin-top: 4px; }
  .skills-table tbody tr:nth-child(even) { background: #fafafa; }
  .skills-table tbody tr:nth-child(even) td { background: transparent; }
  .skills-table tbody tr:hover td { background: transparent; }
}

/* ---------- Student outcomes — chat-bubble benefit rows ---------- */

.outcome-list { display: grid; gap: 18px; }
@media (min-width: 760px) {
  .outcome-list { grid-template-columns: 1fr 1fr; gap: 22px 28px; }
}

.outcome { display: flex; gap: 14px; align-items: flex-start; }
.outcome .oc-ic {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green-deep);
  margin-top: 6px;
}

/* speech-bubble card: one sharp corner toward its icon */
.outcome .oc-bubble {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 16px 20px;
  transition: transform 0.25s ease;
}
.outcome:hover .oc-bubble { transform: translateY(-3px); }
.outcome .oc-bubble h3 { font-size: 16.5px; }
.outcome .oc-bubble p { color: var(--text-50); font-size: 14.5px; margin-top: 4px; }

/* ---------- Check lists ---------- */

.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-70); }
.checklist .ic {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}
.checklist--green .ic { background: var(--green-soft); color: var(--green-deep); }

/* ---------- Why us: expectations + story stack ---------- */

.why-grid { align-items: start; }
@media (min-width: 760px) {
  .why-grid { gap: 48px; }
}

.expect-list { gap: 14px; }
.expect-list li { font-weight: 600; color: var(--text); }

.why-story { display: grid; gap: 14px; }
.why-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--text-50);
  font-size: 16px;
  font-weight: 600;
}
.why-fact .wf-ic {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-30);
  font-size: 13px;
  font-weight: 700;
}
.why-conclusion {
  background: var(--green-soft);
  border-left: 3px solid var(--green-deep);
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 6px;
}
.why-conclusion p { color: var(--text-70); }
.why-conclusion p + p { margin-top: 8px; }
.why-conclusion b { color: var(--text); }

/* ---------- Mockup showcase ---------- */

.mockup-wrap { display: flex; justify-content: center; }
.mockup-wrap img { width: 100%; height: auto; max-width: 880px; }
.mockup-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  max-width: 620px;
  margin: 0 auto;
}

.caption { text-align: center; color: var(--text-30); font-size: 13px; margin-top: 14px; }

/* ---------- Subject tiles ---------- */

.subject-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}
.subject-tile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.subject-tile svg { width: 18px; height: 18px; flex: none; color: var(--green-deep); }
.subject-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(42, 163, 68, 0.5);
}
/* the "coming soon" ghost tile */
.subject-tile--more {
  background: transparent;
  border-style: dashed;
  color: var(--text-50);
  font-weight: 500;
}
.subject-tile--more svg { color: var(--text-30); }
.subject-tile--more:hover { border-color: var(--border); transform: none; }

.subjects-kenai { font-size: 17px; font-weight: 600; margin-top: 28px; }
.subjects-kenai .b-kenai { color: var(--brand); }

/* ---------- Section closing lines ---------- */

.closing { margin-top: 32px; }
.closing p { color: var(--text-70); }
.closing b { color: var(--text); }

/* ---------- University section: text + building photo ---------- */


/* closing note — mirrors the why-conclusion card, anchored left */
.ready-close {
  max-width: 720px;
  margin-top: 40px;
  background: var(--green-soft);
  border-left: 3px solid var(--green-deep);
  border-radius: 14px;
  padding: 22px 24px;
  text-align: left;
}
.ready-close p { color: var(--text-70); }
.ready-close p + p { margin-top: 8px; }
.ready-close b { color: var(--text); }

/* ---------- Pricing cards ---------- */

.plan-card {
  position: relative;
  background: var(--green-soft);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease;
}
.plan-card:hover { transform: translateY(-4px); background: rgba(61, 204, 85, 0.2); }
/* free trial: transparent with a subtle border */
.plan-card--hl {
  background: transparent;
  border: 1px solid var(--border);
}
.plan-card--hl:hover {
  background: transparent;
  border-color: rgba(35, 35, 35, 0.24);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--green-deep);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.plan-cat {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.plan-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.plan-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.1;
  margin: 12px 0 6px;
}
.plan-price .per {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-50);
}
.plan-price .price-was {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-30);
  text-decoration: line-through;
  margin-right: 2px;
}
.plan-card--best { border: 1px solid rgba(42, 163, 68, 0.55); }
.plan-card--best:hover { border-color: rgba(42, 163, 68, 0.85); }
.plan-desc { color: var(--text-50); font-size: 14.5px; margin-bottom: 4px; }
.plan-card .checklist { margin: 14px 0 4px; flex-grow: 1; }
.plan-card .checklist li { font-size: 14.5px; }
.plan-cta { margin-top: 22px; }
.plan-cta .btn { width: 100%; }

/* ---------- FAQ (native details/summary) ---------- */

.faq-list { display: grid; gap: 10px; }
.faq-list details {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 20px;
  transition: background-color 0.2s ease;
}
.faq-list details[open] { border-color: rgba(35, 35, 35, 0.18); }
.faq-list summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 17px 36px 17px 0;
  font-weight: 600;
  font-size: 16.5px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green-deep);
  font-size: 22px;
  font-weight: 500;
  transition: transform 0.25s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
.faq-list .faq-a { padding: 0 0 18px; color: var(--text-70); }

/* ---------- Footer (dark, scoped tokens) ---------- */

.site-footer {
  background: var(--dark);
  padding: 44px 0 40px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13.5px;
  line-height: 1.7;
}

.foot-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.foot-logos { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.foot-logos .fl-school { height: 34px; width: auto; }
.foot-logos .fl-kenai { height: 34px; width: auto; }
.foot-logos .logo-divider { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.18); }

.foot-text p { margin-bottom: 4px; }
.foot-text a { color: rgba(255, 255, 255, 0.7); text-decoration: underline; }
.foot-text a:hover { color: #ffffff; }
.foot-copy { margin-top: 16px; color: rgba(255, 255, 255, 0.3); }

.foot-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
}
.foot-nav a { color: rgba(255, 255, 255, 0.55); text-decoration: none; }
.foot-nav a:hover { color: #ffffff; text-decoration: underline; }
.fn-head {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fn-head--gap { margin-top: 12px; }

.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.foot-social a:hover { background: var(--brand); transform: translateY(-2px); }

/* ---------- keyframes ---------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- scroll reveal (class added by JS) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal--in { opacity: 1; transform: none; }

/* ---------- header nav ---------- */

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
/* desktop: menu sits on the right, next to the header CTA
   (six anchor items need more room than the kenai-landing nav,
   so the burger kicks in at 1023 instead of 880) */
@media (min-width: 1024px) {
  .site-nav { margin-left: auto; margin-right: 24px; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  white-space: nowrap;
  border: none;
  background: none;
  border-radius: var(--radius);
  color: var(--text-70);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(35, 35, 35, 0.06);
  text-decoration: none;
}
.nav-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.nav-caret { font-size: 10px; opacity: 0.6; transition: transform 0.2s ease; }
.nav-item--dropdown:hover .nav-caret,
.nav-item--dropdown.open .nav-caret { transform: rotate(180deg); }

.nav-item--dropdown { position: relative; }

/* padding-top keeps the hover alive across the gap under the button */
.dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  padding-top: 10px;
  display: none;
  z-index: 60;
}
.nav-item--dropdown:hover .dropdown,
.nav-item--dropdown:focus-within .dropdown,
.nav-item--dropdown.open .dropdown { display: block; }

.dropdown__panel {
  min-width: 240px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 10px 30px rgba(35, 35, 35, 0.12);
  animation: dropIn 0.22s ease backwards;
}
.dropdown__panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.4;
}
.dropdown__panel a:hover {
  background: rgba(35, 35, 35, 0.06);
  text-decoration: none;
}
/* non-clickable subject names — dimmed to read as informational */
.dropdown__panel span {
  display: block;
  padding: 8px 12px;
  color: var(--text-50);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  cursor: default;
}

/* ---------- icon-only app link in the fixed header ---------- */

.header-applink {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(35, 35, 35, 0.18);
  border-radius: 999px;
  color: var(--text-70);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.header-applink:hover { color: var(--text); border-color: rgba(35, 35, 35, 0.4); }
.header-applink svg { width: 18px; height: 18px; flex: none; }
.header-applink::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  white-space: nowrap;
  background: #232323;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.header-applink:hover::after,
.header-applink:focus-visible::after { opacity: 1; transform: translateY(0); }

/* ---------- hamburger (tablet / mobile) ---------- */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-burger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* open state: bars form an X */
.site-header.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1023px) {
  .nav-burger { display: flex; }

  /* nav becomes a panel dropping from the header bar */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(35, 35, 35, 0.08);
    box-shadow: 0 12px 20px rgba(35, 35, 35, 0.08);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 22px;
  }
  .site-header.nav-open .site-nav { display: flex; }

  .site-nav .nav-link { width: 100%; justify-content: flex-start; }

  /* subjects submenu unfolds in place instead of floating */
  .nav-item--dropdown { position: static; }
  .dropdown { position: static; padding-top: 0; }
  .dropdown__panel {
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 6px 14px;
    animation: none;
  }
  .dropdown__panel a,
  .dropdown__panel span { padding: 9px 12px; }
}

/* small phones: logo cluster + app icon + CTA + burger must fit */
@media (max-width: 520px) {
  .site-header .container { height: 60px; padding: 0 16px; }
  .logo .logo-school { height: 24px; }
  .header-cta { gap: 6px; }
  .site-header .header-applink { width: 36px; height: 36px; flex: none; }
  .header-cta .btn--small {
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
  }
  .nav-burger { width: 40px; padding: 10px 8px; flex: none; }
}
/* the very narrowest phones (320px) */
@media (max-width: 360px) {
  .site-header .container { padding: 0 10px; }
  .logo .logo-school { height: 20px; }
  .site-header .header-applink { width: 32px; height: 32px; }
  .header-cta { gap: 5px; }
  .header-cta .btn--small { padding: 7px 8px; font-size: 12.5px; }
  .nav-burger { width: 36px; padding: 9px 7px; }
}

/* ---------- responsive visibility helpers ---------- */

@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 767.98px) {
  .desktop-only { display: none !important; }
}

/* ---------- reduced motion: switch it all off ---------- */

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

/* ---------- legal pages (privacy policy / teen privacy notice) ----------
   standalone documents: no menu, no footer; the title shares the same
   left-aligned block as the body text. Ported from kenai-landing. */

.legal { padding: 64px 0 84px; text-align: justify; }
.legal h1 { font-size: clamp(26px, 2.8vw, 34px); margin: 0 0 10px; }
.legal .lead { margin: 0 0 16px; font-size: 16px; }
.legal h2 { font-size: 19px; margin: 40px 0 10px; }
.legal h3 { font-size: 16.5px; margin: 26px 0 8px; }
.legal .legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px 22px;
  margin: 0 0 32px;
  font-size: 14px;
}
.legal .legal-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-50);
  text-decoration: none;
}
.legal .legal-links a:hover { color: var(--text); }
.legal .legal-links svg { width: 15px; height: 15px; flex: none; }
.legal p { color: var(--text-70); margin: 0 0 14px; line-height: 1.65; }
.legal ul { color: var(--text-70); margin: 0 0 14px; padding-left: 22px; line-height: 1.65; }
.legal ul li { margin-bottom: 8px; }
.legal .legal-meta { color: var(--text-50); font-size: 14px; }
.legal a { color: var(--brand); }
