/* ============================================================
   MindShaper — base styles, tokens, layout, components
   ============================================================ */

:root {
  /* ---- Color: backgrounds ---- */
  --bg: #FAF7F0;
  --bg-alt: #F1EBDB;
  --bg-sage: #EEF3E9;
  --bg-clay: #FBEAE0;
  --surface: #FFFFFF;

  /* ---- Color: text ---- */
  --ink: #1B241A;
  --ink-muted: #5C6B57;
  --ink-on-brand: #FAF7F0;

  /* ---- Color: brand accents ---- */
  --forest: #2E5B41;
  --forest-light: #3E7458;
  --forest-dark: #16281E;
  --rust: #C1552C;
  --rust-dark: #98411F;
  --gold: #D6A23F;
  --gold-light: #EAC373;
  --gold-dark: #A87C29;
  --clay: #E2704B;
  --sage: #7C9A72;

  /* ---- Gradients ---- */
  --gradient-forest: linear-gradient(135deg, var(--forest-light) 0%, var(--forest) 52%, var(--forest-dark) 100%);
  --gradient-warm: linear-gradient(120deg, var(--gold) 0%, var(--rust) 100%);
  --gradient-mesh: radial-gradient(50% 50% at 15% 20%, rgba(214, 162, 63, 0.20) 0%, transparent 60%),
    radial-gradient(45% 45% at 85% 15%, rgba(193, 85, 44, 0.16) 0%, transparent 60%),
    radial-gradient(55% 55% at 80% 90%, rgba(46, 91, 65, 0.14) 0%, transparent 60%);

  /* ---- Borders / shadows ---- */
  --border: rgba(27, 36, 26, 0.14);
  --border-soft: rgba(27, 36, 26, 0.08);
  --shadow-sm: 0 2px 10px rgba(27, 36, 26, 0.07);
  --shadow-md: 0 14px 34px rgba(27, 36, 26, 0.10);
  --shadow-lg: 0 30px 70px -12px rgba(27, 36, 26, 0.22);
  --shadow-xl: 0 46px 90px -20px rgba(27, 36, 26, 0.30);
  --shadow-forest: 0 16px 32px -6px rgba(46, 91, 65, 0.38);
  --shadow-gold: 0 14px 28px -6px rgba(168, 124, 41, 0.35);

  /* ---- Radii ---- */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-full: 999px;

  /* ---- Type ---- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* ---- Layout / motion ---- */
  --container: 1240px;
  --nav-h: 96px;
  --dur: 220ms;
  --dur-slow: 480ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 14px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
/* Faint paper-grain texture — adds tactile depth without visible pattern repeats */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140" viewBox="0 0 140 140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="matrix" values="0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.02 0"/></filter><rect width="140" height="140" filter="url(%23n)"/></svg>');
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
p { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--forest-dark); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.section { padding: 112px 0; position: relative; z-index: 1; }
@media (max-width: 720px) { .section { padding: 72px 0; } }


.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--forest); color: var(--ink-on-brand); padding: 12px 18px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--rust-dark);
  margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: var(--r-full); background: var(--rust); }
.dl .eyebrow::before { background: var(--gold); }

.section-heading { font-size: clamp(1.9rem, 1.3rem + 2.3vw, 2.75rem); line-height: 1.12; margin: 0 0 16px; }
.section-subtext { color: var(--ink-muted); font-size: 1.06rem; max-width: 620px; }
.section-subtext p + p { margin-top: 12px; }
.section-intro { max-width: 640px; margin: 0 0 48px; }

/* ---- Buttons ---- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: var(--r-full); font-weight: 700; font-size: 0.96rem;
  border: 1.5px solid transparent; transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap; isolation: isolate; overflow: hidden;
}
.btn svg { transition: transform var(--dur) var(--ease); flex-shrink: 0; position: relative; z-index: 1; }
.btn span { position: relative; z-index: 1; }

.btn--primary { background: var(--gradient-forest); color: var(--ink-on-brand); box-shadow: var(--shadow-forest); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  background-size: 220% 100%; background-position: 100% 0;
  transition: opacity var(--dur) var(--ease);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }
.btn--primary:hover::before { opacity: 1; animation: btn-shine 1.1s var(--ease); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--primary:active { transform: translateY(-1px); }
@keyframes btn-shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }

.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--border);
}
.btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: 0; background: var(--forest); border-radius: inherit;
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-slow) var(--ease);
}
.btn--ghost:hover { border-color: var(--forest); color: var(--ink-on-brand); transform: translateY(-3px); }
.btn--ghost:hover::before { transform: scaleX(1); }
.btn--full { width: 100%; }

/* ---- Reveal-on-scroll ---- */
[data-reveal], [data-reveal-child] {
  opacity: 0; transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-visible, [data-reveal-child].is-visible { opacity: 1; transform: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(250, 247, 240, 0.68); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), height var(--dur) var(--ease);
}
.navbar.is-scrolled {
  border-bottom-color: var(--border-soft); box-shadow: 0 8px 28px -14px rgba(27, 36, 26, 0.28);
  background: rgba(250, 247, 240, 0.9); height: calc(var(--nav-h) - 12px);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 12px; transition: transform var(--dur) var(--ease); }
.brand:hover { transform: scale(1.02); }
.brand__img { display: block; height: 86px; width: auto; flex-shrink: 0; transition: height var(--dur) var(--ease); }
.navbar.is-scrolled .brand__img { height: 68px; }
.footer .brand__img { height: 100px; }

.navbar__links { display: flex; align-items: center; gap: 2px; padding: 5px; background: rgba(27, 36, 26, 0.035); border-radius: var(--r-full); border: 1px solid var(--border-soft); }
.navbar__links a {
  position: relative; display: inline-block; padding: 10px 16px; border-radius: var(--r-full); font-weight: 600; font-size: 0.93rem; color: var(--ink-muted);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.navbar__links a:hover { color: var(--ink); background: rgba(27, 36, 26, 0.05); }
.navbar__links a.is-active { color: var(--ink-on-brand); background: var(--gradient-forest); box-shadow: var(--shadow-forest); }

.navbar__toggle { display: none; background: none; border: none; padding: 6px; color: var(--ink); }

@media (max-width: 940px) {
  .navbar__toggle { display: block; }
  .brand__img { height: 72px; }
  .navbar__nav {
    position: fixed; inset: var(--nav-h) 0 0 0; background: var(--bg); padding: 26px 28px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    overflow-y: auto;
  }
  .navbar__nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .navbar__links { flex-direction: column; align-items: stretch; gap: 4px; background: none; border: none; padding: 0; }
  .navbar__links a { padding: 15px 16px; border-radius: var(--r-sm); font-size: 1.1rem; border-bottom: 1px solid var(--border-soft); }
  .navbar__links a.is-active { border-bottom-color: transparent; }
}

@media (max-width: 480px) {
  .brand__img { height: 58px; }
  .footer .brand__img { height: 68px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: 56px; padding-bottom: 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--gradient-mesh);
}
.hero__rules {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 37px, var(--border-soft) 38px);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 75%, transparent);
}
.hero__scatter { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__scatter span {
  position: absolute; display: grid; place-items: center; color: var(--gold); opacity: 0.5;
  animation: hero-float 6.5s ease-in-out infinite;
}
.hero__scatter span svg { width: 100%; height: 100%; }
.hero__scatter span:nth-child(1) { top: 10%; left: 5%; width: 30px; height: 30px; animation-delay: 0s; }
.hero__scatter span:nth-child(2) { top: 26%; left: 93%; width: 22px; height: 22px; color: var(--rust); animation-delay: 1.1s; }
.hero__scatter span:nth-child(3) { top: 70%; left: 4%; width: 26px; height: 26px; color: var(--forest); animation-delay: 2.2s; }
.hero__scatter span:nth-child(4) { top: 80%; left: 90%; width: 24px; height: 24px; animation-delay: 3.1s; }
.hero__scatter span:nth-child(5) { top: 6%; left: 50%; width: 20px; height: 20px; color: var(--rust); animation-delay: 1.8s; }
@keyframes hero-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-14px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .hero__scatter span { animation: none; } }

.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__content { max-width: 580px; }
.hero__headline { font-size: clamp(2.7rem, 1.7rem + 3.9vw, 4.7rem); line-height: 1.25; margin: 0 0 24px; letter-spacing: -0.02em; }
.hero__headline .accent {
  background: var(--gradient-warm); -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative; display: inline-block;
}
.hero__subtext { font-size: 1.16rem; color: var(--ink-muted); max-width: 480px; margin: 0 0 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__media { position: relative; }
.hero__media::before {
  content: ""; position: absolute; z-index: 0; top: 10%; right: -12%; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 162, 63, 0.35) 0%, transparent 68%); filter: blur(6px); pointer-events: none;
}
.hero__frame {
  position: relative; z-index: 1; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 3.3;
  border: 7px solid var(--surface); box-shadow: var(--shadow-xl);
  transition: transform var(--dur-slow) var(--ease);
}
.hero__media:hover .hero__frame { transform: translateY(-4px); }
.hero__frame::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--r-xl); background: var(--gradient-forest);
  transform: rotate(-4deg) scale(1.02); transform-origin: center;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute; left: -22px; bottom: -26px; z-index: 2; background: var(--surface); border-radius: var(--r-md);
  padding: 18px 22px; box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; row-gap: 1px;
  border: 1px solid var(--border-soft); max-width: 250px;
}
.hero__badge::before {
  content: ""; grid-row: 1 / span 2; grid-column: 1; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--gradient-warm);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="5 13 10 18 19 7"/></svg>') center/22px no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="5 13 10 18 19 7"/></svg>') center/22px no-repeat;
}
.hero__badge-value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--forest); }
.hero__badge-label { display: block; font-size: 0.82rem; color: var(--ink-muted); margin-top: 2px; }

@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__content { max-width: none; }
  .hero__media { order: -1; max-width: 420px; margin: 0 auto; }
  .hero__badge { left: 14px; bottom: -18px; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-alt); }
.about__inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.about__media { position: relative; }
.about__media::before {
  content: ""; position: absolute; z-index: 0; inset: 22px -22px auto auto; width: 88%; aspect-ratio: 4 / 4.5;
  border-radius: var(--r-lg); background: var(--gradient-warm); opacity: 0.9; transform: rotate(4deg);
}
.about__frame {
  position: relative; z-index: 1; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xl);
  transition: transform var(--dur-slow) var(--ease);
}
.about__media:hover .about__frame { transform: translateY(-6px) rotate(-1deg); }
.about__frame::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); border: 10px solid var(--surface); z-index: 1; pointer-events: none;
}
.about__frame img { width: 100%; aspect-ratio: 4 / 4.5; object-fit: cover; }
.about__paragraphs { color: var(--ink-muted); font-size: 1.05rem; }
.about__paragraphs p + p { margin-top: 14px; }
.about__highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.about-highlight {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--r-md); font-weight: 600; font-size: 0.94rem;
  box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.about-highlight:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }
.about-highlight__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--gradient-warm); color: var(--surface); flex-shrink: 0; }

@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; gap: 44px; }
  .about__media { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 520px) {
  .about__highlights { grid-template-columns: 1fr; }
}

/* ============================================================
   BOOKS SHELF
   ============================================================ */
.books__shelf-wrap { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 28px; }
.books__viewport { flex: 1; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.books__viewport::-webkit-scrollbar { display: none; }
.books__track { display: flex; gap: 22px; padding: 6px 4px 20px; }

.shelf-btn {
  flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-full);
  background: var(--surface); border: 1.5px solid var(--border); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: background var(--dur) var(--ease-spring), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease);
}
.shelf-btn:hover:not(:disabled) { background: var(--gradient-forest); color: var(--ink-on-brand); border-color: var(--forest); transform: scale(1.08); box-shadow: var(--shadow-forest); }
.shelf-btn:disabled { opacity: 0.35; cursor: default; }

.book-card {
  flex: 0 0 auto; width: 226px; background: var(--surface); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease-spring), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  position: relative;
}
.book-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; z-index: 2; background: var(--gradient-forest);
}
.book-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--border); }
.book-card__cover { aspect-ratio: 3 / 4; background: var(--bg-alt); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.book-card__cover img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--dur-slow) var(--ease); }
.book-card:hover .book-card__cover img { transform: scale(1.07); }
.book-card__cover-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink-muted); border: 2px dashed var(--border); margin: 0; box-sizing: border-box;
}
.book-card__cover-placeholder em { font-style: normal; font-size: 0.78rem; font-weight: 600; }
.book-card__body { padding: 17px 19px 21px; display: flex; flex-direction: column; gap: 4px; }
.book-card__subject { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rust-dark); }
.book-card__name { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.25; margin: 2px 0; }
.book-card__class { font-size: 0.86rem; color: var(--ink-muted); font-weight: 600; }

.books__shelf-empty { padding: 40px 0 8px; text-align: center; }
.books__shelf-empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-md); background: var(--bg-alt); color: var(--forest); margin-bottom: 14px; }
.books__shelf-empty h3 { font-size: 1.2rem; margin-bottom: 8px; }
.books__shelf-empty p { color: var(--ink-muted); max-width: 460px; margin: 0 auto; }

.books__cta { text-align: center; margin-top: 40px; }

@media (max-width: 640px) {
  .books__shelf-wrap { padding: 0 12px; }
  .shelf-btn { width: 38px; height: 38px; }
  .book-card { width: 172px; }
}

/* ============================================================
   TEACHERS (alternating split layout)
   ============================================================ */
.teachers { background: var(--bg-sage); }
.teachers__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }

.teachers__media { position: relative; }
.teachers__media::before {
  content: ""; position: absolute; z-index: 0; inset: 20px -20px auto auto; width: 90%; aspect-ratio: 4 / 4.6;
  border-radius: var(--r-lg); opacity: 0.85;
  background: var(--gradient-forest); transform: rotate(-3deg);
}

.teachers__frame {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xl); position: relative; z-index: 1;
  border: 8px solid var(--surface); transition: transform var(--dur-slow) var(--ease);
}
.teachers__frame img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; }
.teachers__frame { transform: rotate(1.2deg); }
.teachers__media:hover .teachers__frame { transform: rotate(0deg) translateY(-4px); }

.teachers__features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 22px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gradient-warm);
  transform: scaleY(0); transform-origin: bottom; transition: transform var(--dur) var(--ease);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border); }
.feature-card:hover::before { transform: scaleY(1); }
.feature-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--bg-clay); color: var(--rust-dark); margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 6px; }
.feature-card p { font-size: 0.88rem; color: var(--ink-muted); }

@media (max-width: 900px) {
  .teachers__inner { grid-template-columns: 1fr; gap: 40px; }
  .teachers__frame { transform: none; max-width: 360px; margin: 0 auto; }
  .teachers__media::before { max-width: 360px; margin: 0 auto; inset: 16px 8px auto auto; }
  .teachers__features { grid-template-columns: 1fr; }
}

/* ============================================================
   DIGITAL LEARNING — horizontal selector
   ============================================================ */
.dl {
  background: radial-gradient(120% 140% at 15% -10%, #234432 0%, var(--forest-dark) 46%, #0F1D15 100%);
  color: var(--ink-on-brand); position: relative; overflow: hidden;
}
.dl::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.7;
  background:
    radial-gradient(38% 55% at 92% 8%, rgba(214, 162, 63, 0.16) 0%, transparent 70%),
    radial-gradient(45% 60% at -5% 95%, rgba(226, 112, 75, 0.14) 0%, transparent 70%);
}
.dl .container { z-index: 1; }
.dl .eyebrow { color: var(--gold-light); }
.dl .section-heading { color: var(--ink-on-brand); }
.dl .section-subtext { color: rgba(250, 247, 240, 0.72); }

.dl__tab-nav {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 36px; scrollbar-width: none;
}
.dl__tab-nav::-webkit-scrollbar { display: none; }
.dl-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: var(--r-full);
  background: rgba(250, 247, 240, 0.07); color: rgba(250, 247, 240, 0.8); border: 1.5px solid rgba(250, 247, 240, 0.14);
  font-weight: 700; font-size: 0.9rem; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring);
}
.dl-tab:hover { border-color: rgba(250, 247, 240, 0.4); color: var(--ink-on-brand); transform: translateY(-2px); }
.dl-tab.is-active { background: var(--gradient-warm); color: var(--forest-dark); border-color: transparent; box-shadow: var(--shadow-gold); }

.dl__panels { position: relative; }
.dl-panel {
  display: none; gap: 28px; background: rgba(250, 247, 240, 0.05); backdrop-filter: blur(6px);
  border: 1px solid rgba(250, 247, 240, 0.14); border-radius: var(--r-lg); padding: 44px;
  box-shadow: inset 0 1px 0 rgba(250, 247, 240, 0.08), var(--shadow-lg);
}
.dl-panel.is-active { display: flex; animation: dl-fade var(--dur-slow) var(--ease); }
@keyframes dl-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dl-panel__icon { flex-shrink: 0; display: grid; place-items: center; width: 62px; height: 62px; border-radius: var(--r-md); background: var(--gradient-warm); color: var(--forest-dark); box-shadow: var(--shadow-gold); }
.dl-panel__body h3 { color: var(--ink-on-brand); font-size: 1.4rem; margin-bottom: 12px; }
.dl-panel__body p { color: rgba(250, 247, 240, 0.78); font-size: 1rem; max-width: 620px; }
.dl-panel__points { margin: 20px 0 24px; display: grid; gap: 10px; }
.dl-panel__points li { display: flex; align-items: center; gap: 10px; color: rgba(250, 247, 240, 0.85); font-size: 0.94rem; }
.dl-panel__points svg { color: var(--gold); flex-shrink: 0; }
.dl-panel .btn--primary { background: var(--gradient-warm); color: var(--forest-dark); box-shadow: var(--shadow-gold); }
.dl-panel .btn--primary::before { background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); background-size: 220% 100%; }

.dl__web-support { text-align: center; margin-top: 30px; color: rgba(250, 247, 240, 0.55); font-size: 0.9rem; }

@media (max-width: 720px) {
  .dl-panel { flex-direction: column; padding: 28px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact { position: relative; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact__map-frame {
  border-radius: var(--r-lg); overflow: hidden; border: 6px solid var(--surface); box-shadow: var(--shadow-lg); aspect-ratio: 16 / 10;
  filter: grayscale(0.15) contrast(1.03);
}
.contact__map-frame iframe { width: 100%; height: 100%; border: 0; }
.contact__map-note { margin-top: 14px; font-weight: 600; color: var(--ink-muted); font-size: 0.92rem; }
.contact__info { display: grid; gap: 12px; margin-top: 22px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 17px 19px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.contact-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.contact-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--gradient-forest); color: var(--ink-on-brand); flex-shrink: 0; }
.contact-card__text { display: flex; flex-direction: column; gap: 2px; }
.contact-card__label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); font-weight: 700; }
.contact-card__value { font-weight: 600; font-size: 0.98rem; }
.contact-card__value a:hover { color: var(--rust-dark); }

.contact__form { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 7px; }
.form-field label { font-weight: 700; font-size: 0.85rem; }
.form-field input, .form-field textarea {
  border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 13px 15px; background: var(--bg-alt);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--forest); background: var(--surface); box-shadow: 0 0 0 4px rgba(46, 91, 65, 0.1); }
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--rust); }
.form-error { font-size: 0.78rem; color: var(--rust-dark); min-height: 1em; }
.contact__form-status { margin-top: 12px; font-weight: 700; font-size: 0.92rem; color: var(--forest); min-height: 1.4em; }
.contact__form-status.is-error { color: var(--rust-dark); }

@media (max-width: 900px) {
  .contact__inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: linear-gradient(180deg, var(--ink) 0%, #12180F 100%);
  color: rgba(250, 247, 240, 0.82); padding-top: 72px; position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-warm);
}
.footer__inner { display: grid; grid-template-columns: 1.1fr 1.9fr; gap: 48px; padding-bottom: 52px; }
.footer__desc { margin-top: 16px; max-width: 300px; font-size: 0.92rem; color: rgba(250, 247, 240, 0.55); }
.footer__columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__col-heading { font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold-light); margin-bottom: 18px; }
.footer__col ul { display: grid; gap: 11px; }
.footer__col a { font-size: 0.94rem; color: rgba(250, 247, 240, 0.7); transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease); }
.footer__col a:hover { color: var(--ink-on-brand); padding-left: 4px; }

.footer__bottom { border-top: 1px solid rgba(250, 247, 240, 0.14); padding: 22px 0; }
.footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: rgba(250, 247, 240, 0.55); }
.footer__legal-note { max-width: 560px; }

@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__columns { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   SECTION TRANSITIONS
   A single confident diagonal cut where the background colour changes,
   instead of a hard rectangular seam. Each pseudo-element is coloured to
   match the section above it, so the cut reads as one clean edge.
   ============================================================ */
#digital-learning::after,
#teachers::after,
#contact::after {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 58px; z-index: 1; pointer-events: none;
}
#digital-learning::after { background: var(--bg); clip-path: polygon(0 0, 100% 0, 100% 30%, 0 100%); }
#teachers::after { background: #14251C; clip-path: polygon(0 0, 100% 0, 100% 30%, 0 100%); }
#contact::after { background: var(--bg-sage); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 30%); }

@media (max-width: 720px) {
  #digital-learning::after, #teachers::after, #contact::after { height: 34px; }
}
