/* ChifEd — site styles
   Brand palette: "Sky & Navy", shared with every ChifEd app (see BRAND.md).
   Rules: ink and every button are navy; cards are white on sky with no
   border, shadow or gradient; saturated colour is kept for small
   dots and notes. */

/* Fonts: self-hosted variable fonts (SIL Open Font License 1.1, see
   assets/fonts/OFL-*.txt), so the site makes no third-party requests. */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces & ink */
  --page: #ebf6fd;
  --card: #ffffff;
  --wave: #d3e7f5;
  --sun: #fdf6e6;      /* light warm cream: contrast to the sky */
  --ink: #253140;
  --text: #3c4757;
  --muted: #5a6675;
  --hairline: #d8e6f0;

  /* Sorting tints, each with its readable text colour */
  --tint-blue: #d9e4f3;
  --tint-green: #f2f6d2;   --on-green: #607635;
  --tint-pink: #fbecec;    --on-pink: #8c332c;
  --tint-cream: #f7eed5;   --on-cream: #8f6a0d;

  /* App accents: dots & avatars, never buttons */
  --teacher: #3f6d9e;
  --student: #6f9440;
  --star: #d8a72a;

  /* Note hues, C to B */
  --note-c: #e0574a;
  --note-d: #e8843a;
  --note-e: #d4708a;
  --note-f: #85ac40;
  --note-g: #4fa39a;
  --note-a: #4f7cb5;
  --note-b: #8a6fa8;

  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-lg: 28px;
  --container: 1140px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  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 {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--card);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--teacher); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teacher);
  margin-bottom: 1rem;
}

/* Buttons: navy, always */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--card);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { background: #1a2330; border-color: #1a2330; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--card); border-color: var(--ink); color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: .9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(235, 246, 253, .9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
}
.logo-mark { width: 34px; height: 34px; color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--muted);
}
.site-nav a:not(.btn):hover { color: var(--ink); }

/* Hero */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 em { font-style: normal; color: var(--teacher); white-space: nowrap; }
.lede { font-size: 1.2rem; color: var(--text); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 24px; }
.hero-note {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .95rem; color: var(--muted);
}
.hero-note::before {
  content: ""; width: 10px; height: 10px; border-radius: 99px; background: var(--note-f);
}

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 440px; padding: 64px 0; }

/* Ruled lines behind the card: a music staff, or an exercise book */
.staff {
  position: absolute; left: -4%; right: -40%; top: 50%; height: 100px;
  transform: translateY(-50%) rotate(-6deg);
  background: repeating-linear-gradient(
    to bottom,
    var(--wave) 0, var(--wave) 3px,
    transparent 3px, transparent 24.25px
  );
}

/* Teacher–student card: the relationship stays at the centre */
.lesson-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 360px;
  background: var(--card); border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  transform: rotate(-2deg);
}
.lesson-label {
  margin: 0 0 18px; text-align: center;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.people { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.person strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.avatar {
  width: 76px; height: 76px; border-radius: 999px;
  display: grid; place-items: center; color: var(--card);
}
.avatar svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar-teacher { background: var(--teacher); }
.avatar-student { background: var(--student); }
.amp {
  margin-bottom: 30px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--muted);
}
.support {
  display: flex; align-items: center; gap: 12px;
  background: var(--sun); border-radius: 16px; padding: 12px 14px;
}
.support strong { display: block; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.support small { color: var(--muted); font-size: .82rem; }
.support-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--ink); color: var(--card); display: grid; place-items: center;
}
.support-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Floating dots: the brand's one splash of colour */
.float-dot {
  position: absolute; z-index: 2; border-radius: 99px;
  animation: float 7s ease-in-out infinite;
}
.float-dot.d1 { width: 22px; height: 22px; top: 8%; left: 10%; background: var(--note-c); }
.float-dot.d2 { width: 16px; height: 16px; top: 14%; right: 8%; background: var(--note-a); animation-delay: -2s; }
.float-dot.d3 { width: 14px; height: 14px; bottom: 12%; left: 4%; background: var(--note-g); animation-delay: -4s; }
.float-dot.d4 { width: 20px; height: 20px; bottom: 6%; right: 14%; background: var(--note-f); animation-delay: -5.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Sections */
.section { padding: 104px 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head p:not(.eyebrow) { font-size: 1.12rem; color: var(--text); }

/* Promise: blue cards on a white band */
.promise { background: var(--card); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principle {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--sun);
}
.principle-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 20px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--card);
}
.principle:nth-child(1) .principle-num { background: var(--note-c); }
.principle:nth-child(2) .principle-num { background: var(--note-g); }
.principle:nth-child(3) .principle-num { background: var(--note-a); }
.principle p { color: var(--text); margin: 0; }

/* Quote */
.quote-band { background: var(--ink); color: var(--card); padding: 88px 0; text-align: center; }
.quote-band blockquote { margin: 0 auto; max-width: 820px; }
.quote-band p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.25; margin-bottom: 18px;
}
.quote-band footer { color: var(--tint-cream); font-weight: 600; letter-spacing: .02em; }

/* Apps: white cards on sky */
.apps { background: var(--sun); }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.app-grid.two { grid-template-columns: repeat(2, 1fr); }
.app-card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .2s ease;
}
.app-card:hover { transform: translateY(-4px); }
.app-card p { color: var(--text); margin: 0; }
.app-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 22px;
  display: grid; place-items: center;
}
.app-icon svg {
  width: 26px; height: 26px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.tone-pink  { background: var(--tint-pink);  color: var(--on-pink); }
.tone-blue  { background: var(--tint-blue);  color: var(--teacher); }
.tone-green { background: var(--tint-green); color: var(--on-green); }
.tone-cream { background: var(--tint-cream); color: var(--on-cream); }

/* How it works */
.how { background: var(--card); }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; top: 26px; left: 26px; right: 26px; height: 2px;
  background: repeating-linear-gradient(to right, var(--muted) 0 6px, transparent 6px 14px);
  opacity: .45;
}
.steps li { position: relative; }
.step-num {
  position: relative; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: var(--card);
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  margin-bottom: 22px; box-shadow: 0 0 0 8px var(--card);
}
.steps p { color: var(--text); margin: 0; }

/* CTA */
.cta-card {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  background: var(--ink); color: var(--card);
  border-radius: var(--radius-lg); padding: 64px;
  position: relative; overflow: hidden;
}
.cta-card::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 280px; height: 130px;
  background: repeating-linear-gradient(to bottom, rgba(211, 231, 245, .18) 0 2px, transparent 2px 26px);
  transform: rotate(-12deg); pointer-events: none;
}
.cta-copy .eyebrow { color: var(--tint-cream); }
.cta-copy p:not(.eyebrow) { color: rgba(255, 255, 255, .8); font-size: 1.1rem; margin: 0; }

.cta-simple { grid-template-columns: 1fr auto; }
.btn-light { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn-light:hover { background: var(--card); border-color: var(--card); color: var(--ink); }

/* Footer */
.site-footer { padding: 56px 0 40px; }
.footer-inner {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  border-top: 1px solid var(--hairline); padding-top: 32px;
}
.logo-footer { font-size: 1.25rem; }
.logo-footer .logo-mark { width: 28px; height: 28px; }
.footer-tag { margin: 0; color: var(--muted); font-size: .95rem; }
.footer-meta { margin: 0; display: flex; gap: 20px; font-size: .9rem; color: var(--muted); }
.footer-meta a { color: var(--ink); font-weight: 600; }
.footer-meta a:hover { color: var(--teacher); }
.legal { margin-top: 24px; font-size: .82rem; line-height: 1.55; color: var(--muted); }
.legal p { margin: 0 0 4px; max-width: 72ch; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner, .cta-card, .cta-simple { grid-template-columns: 1fr; }
  .cta-simple .btn { justify-self: start; }
  .hero { padding-top: 48px; }
  .hero-visual { margin-top: 16px; }
  .principles, .app-grid { grid-template-columns: 1fr 1fr; }
  .cta-card { padding: 48px 40px; gap: 32px; }
}

@media (max-width: 760px) {
  .site-nav a:not(.btn) { display: none; }

  .principles, .app-grid, .app-grid.two, .steps { grid-template-columns: 1fr; }
  .steps { gap: 32px; }
  .steps::before { top: 26px; bottom: 26px; left: 26px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(to bottom, var(--muted) 0 6px, transparent 6px 14px); }
  .steps li { padding-left: 80px; }
  .step-num { position: absolute; left: 0; top: 0; }

  .section { padding: 72px 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-meta { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero-actions .btn { width: 100%; }
  .hero-visual { min-height: 0; padding: 72px 0; }
  .avatar { width: 64px; height: 64px; }
  .cta-card { padding: 32px 20px; border-radius: var(--radius); }
}
