/* ==========================================================================
   MindForge Academy — Design System (Vibrant Academic Revision)
   Deep saturated mahogany as the dominant base, marigold as the signature
   accent, plus teal / terracotta / cobalt assigned to each grade band —
   a palette that doubles as a wayfinding system, editorial hairline
   layouts instead of boxed cards.
   Signature: The Grade Rail — a vertical line of grade markers (1–12)
   grouped into Primary / Foundation / Secondary / Senior Secondary bands,
   each in its own band color.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Color — deep, saturated mahogany as the dominant base, marigold as the
     signature brand accent, plus three more jewel-tone accents assigned to
     each grade band (Foundation teal, Secondary terracotta, Senior
     Secondary cobalt) so the palette itself becomes a wayfinding system
     that scales from Class 1 through Class 12. */
  --mahogany: #3D1810;
  --mahogany-mid: #5A2418;
  --mahogany-light: #6E2E1E;
  --marigold: #E8A63C;
  --marigold-light: #F0C878;
  --marigold-deep: #B5822E;
  --teal: #2A9D8F;
  --teal-deep: #1D6B60;
  --teal-pale: #DCEEEA;
  --teal-ondark: #3DBFAE;
  --terracotta: #C1603D;
  --terracotta-deep: #8B4128;
  --terracotta-pale: #F5E3DA;
  --terracotta-ondark: #E8956B;
  --cobalt: #3E6E96;
  --cobalt-deep: #2A4D6B;
  --cobalt-pale: #DDE8F0;
  --cobalt-ondark: #7CB0DB;
  --paper: #FAF3E7;
  --white: #FEFDFB;
  --ink: #12151C;
  --ink-soft: rgba(18, 21, 28, 0.64);
  --ink-faint: rgba(18, 21, 28, 0.4);
  --hairline: rgba(232, 166, 60, 0.32);
  --hairline-soft: rgba(18, 21, 28, 0.1);
  --hairline-dark: rgba(254, 253, 251, 0.14);

  /* Type */
  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --container: 1140px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 2px 10px rgba(61, 24, 16, 0.07);
  --shadow-md: 0 12px 32px rgba(61, 24, 16, 0.14);
  --shadow-lg: 0 24px 64px rgba(61, 24, 16, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }
:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 3px;
}

/* ---- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--mahogany);
}
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.85rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); }
h4 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { color: var(--ink-soft); }
.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.6;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marigold-deep);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--marigold);
  flex-shrink: 0;
}
.eyebrow--on-dark { color: rgba(254, 253, 251, 0.78); }
.eyebrow--on-dark::before { background: var(--marigold); }

/* ---- Layout --------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: 740px; }
.section { padding: 6.5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section--paper { background: var(--paper); }
.section--mahogany { background: var(--mahogany); color: var(--white); }
.section--mahogany h2, .section--mahogany h3, .section--mahogany h4 { color: var(--white); }
.section--mahogany p { color: rgba(254, 253, 251, 0.72); }
.section-head { max-width: 640px; margin-bottom: 3.2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--marigold-light) 0%, var(--marigold) 55%, var(--marigold-deep) 100%);
  color: var(--mahogany);
  box-shadow: 0 1px 2px rgba(61, 24, 16, 0.15);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(232, 166, 60, 0.3); }
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(254, 253, 251, 0.38);
}
.btn--outline:hover { border-color: var(--marigold); background: rgba(232, 166, 60, 0.08); transform: translateY(-2px); }
.btn--outline-navy {
  background: transparent;
  color: var(--mahogany);
  border: 1px solid rgba(61, 24, 16, 0.24);
}
.btn--outline-navy:hover { border-color: var(--marigold-deep); color: var(--marigold-deep); transform: translateY(-2px); }
.btn--small { padding: 0.68rem 1.3rem; font-size: 0.74rem; }
.btn--block { width: 100%; justify-content: center; }
.btn--whatsapp {
  background: #25D366;
  color: #06341C;
  border: none;
}
.btn--whatsapp:hover { background: #22c15e; transform: translateY(-2px); }
.btn--whatsapp svg { width: 17px; height: 17px; }
.form__divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.1rem 0;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form__divider::before, .form__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline-soft);
}

/* ---- Header / Nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(61, 24, 16, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--white);
}
.brand__mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.brand__text { line-height: 1.18; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.62rem;
  color: var(--white);
  display: block;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(216, 232, 228, 0.72);
  text-transform: uppercase;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2.05rem;
}
.nav__link {
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(254, 253, 251, 0.72);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--marigold);
  transition: width 0.25s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--white); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.nav__right { display: flex; align-items: center; gap: 1.5rem; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
}
.nav__toggle span { width: 22px; height: 1.5px; background: var(--white); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--mahogany);
  padding: 6rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav__links { display: flex; flex-direction: column; gap: 1.6rem; }
.mobile-nav__links a { font-family: var(--font-display); font-size: 1.7rem; color: var(--white); }
.mobile-nav__cta { margin-top: 2.2rem; }

@media (max-width: 860px) {
  .nav__links, .nav__right .btn--outline { display: none; }
  .nav__toggle { display: flex; }
  .mobile-nav { display: block; }
  body.nav-open { overflow: hidden; }
}

/* ---- Hero (home) ------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, rgba(232, 166, 60, 0.15), transparent 60%),
    radial-gradient(ellipse 60% 50% at 6% 96%, rgba(42, 157, 143, 0.12), transparent 62%),
    linear-gradient(165deg, var(--mahogany) 0%, var(--mahogany-mid) 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero__subject-icons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(254, 253, 251, 0.08);
  pointer-events: none;
}
.hero__subject-icons g { stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 780px) {
  .hero__subject-icons { opacity: 0.7; }
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.7fr;
  gap: 3rem;
  align-items: center;
  padding: 5.5rem 0 5rem;
}
.hero h1 { color: var(--white); margin: 1.1rem 0 1.4rem; }
.hero .lede { color: rgba(254, 253, 251, 0.74); margin-bottom: 2.4rem; }
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__rail-wrap { display: flex; justify-content: center; }
.hero__rail-wrap svg { height: min(78vh, 660px); width: auto; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; padding: 3rem 0 3rem; text-align: left; }
  .hero__rail-wrap { display: none; }
}

/* ---- Grade Rail (signature element) ----------------------------------------- */
.rail-svg .rail-line {
  stroke-dasharray: 616;
  stroke-dashoffset: 616;
  animation: draw-rail 1.5s var(--ease) 0.3s forwards;
}
.rail-svg .rail-node {
  opacity: 0;
  transform-origin: center;
  animation: pop-node 0.5s var(--ease) forwards;
}
.rail-svg .rail-node--1 { animation-delay: 0.4s; }
.rail-svg .rail-node--2 { animation-delay: 0.5s; }
.rail-svg .rail-node--3 { animation-delay: 0.6s; }
.rail-svg .rail-node--4 { animation-delay: 0.7s; }
.rail-svg .rail-node--5 { animation-delay: 0.8s; }
.rail-svg .rail-node--6 { animation-delay: 0.9s; }
.rail-svg .rail-node--7 { animation-delay: 1.0s; }
.rail-svg .rail-node--8 { animation-delay: 1.1s; }
.rail-svg .rail-node--9 { animation-delay: 1.2s; }
.rail-svg .rail-node--10 { animation-delay: 1.3s; }
.rail-svg .rail-node--11 { animation-delay: 1.4s; }
.rail-svg .rail-node--12 { animation-delay: 1.5s; }
.rail-svg .rail-label { opacity: 0; animation: fade-in 0.6s var(--ease) 1.7s forwards; }
@keyframes draw-rail { to { stroke-dashoffset: 0; } }
@keyframes pop-node { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rail-svg .rail-line, .rail-svg .rail-node, .rail-svg .rail-label { animation: none; opacity: 1; stroke-dashoffset: 0; }
}

/* ---- Page hero (interior pages) ---------------------------------------------- */
.page-hero {
  background:
    radial-gradient(ellipse 70% 55% at 78% 8%, rgba(232, 166, 60, 0.15), transparent 60%),
    radial-gradient(ellipse 60% 50% at 6% 96%, rgba(42, 157, 143, 0.12), transparent 62%),
    linear-gradient(165deg, var(--mahogany) 0%, var(--mahogany-mid) 100%);
  color: var(--white);
  padding: 5rem 0 4.5rem;
}
.page-hero h1 { color: var(--white); margin: 1rem 0 1rem; }
.page-hero .lede { color: rgba(254, 253, 251, 0.74); }

/* ---- Feature list — editorial hairline layout (replaces boxed cards) --------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.6rem 2.2rem;
}
.feature-list--cols-3 { grid-template-columns: repeat(3, 1fr); }
.feature-item {
  padding-top: 1.8rem;
  border-top: 1px solid var(--hairline);
}
.feature-item__icon {
  width: 28px; height: 28px;
  margin-bottom: 1.3rem;
  color: var(--marigold-deep);
}
.feature-item h4 { margin-bottom: 0.55rem; }
.feature-item p { font-size: 0.92rem; }

@media (max-width: 980px) { .feature-list, .feature-list--cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-list, .feature-list--cols-3 { grid-template-columns: 1fr; } }

/* ---- Program cards --------------------------------------------------------------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
.program-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border-top: 2px solid var(--marigold);
  box-shadow: var(--shadow-sm);
  padding: 2.3rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.program-card--foundation { border-top-color: var(--teal); }
.program-card--secondary { border-top-color: var(--terracotta); }
.program-card--senior { border-top-color: var(--cobalt); }
.program-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--marigold-deep);
  margin-bottom: 1.2rem;
}
.program-card__badge::before { content: ''; width: 14px; height: 1px; background: var(--marigold); }
.program-card h3 { margin-bottom: 0.6rem; }
.program-card p { font-size: 0.95rem; margin-bottom: 1.1rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.tag {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--hairline-soft);
  padding: 0.32rem 0.75rem;
  border-radius: 100px;
}
.tag--teal {
  color: var(--teal-deep);
  background: var(--teal-pale);
  border-color: transparent;
  font-weight: 600;
}
.program-card__link { font-weight: 600; font-size: 0.86rem; letter-spacing: 0.02em; color: var(--marigold-deep); display: inline-flex; align-items: center; gap: 0.35rem; }
.program-card__link svg { transition: transform 0.2s var(--ease); width: 14px; height: 14px; }
.program-card:hover .program-card__link svg { transform: translateX(3px); }

/* mini rail used on courses page as a section topper */
.mini-rail { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1rem; }
.mini-rail__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--marigold);
  flex-shrink: 0;
}
.mini-rail__line { height: 1px; background: var(--hairline); flex-grow: 1; max-width: 60px; }
.mini-rail__text { font-family: var(--font-mono); font-size: 0.76rem; color: var(--marigold-deep); letter-spacing: 0.04em; }
.mini-rail--foundation .mini-rail__dot { background: var(--teal); }
.mini-rail--foundation .mini-rail__text { color: var(--teal-deep); }
.mini-rail--secondary .mini-rail__dot { background: var(--terracotta); }
.mini-rail--secondary .mini-rail__text { color: var(--terracotta-deep); }
.mini-rail--senior .mini-rail__dot { background: var(--cobalt); }
.mini-rail--senior .mini-rail__text { color: var(--cobalt-deep); }

@media (max-width: 900px) { .program-grid { grid-template-columns: 1fr; } }

/* ---- Course blocks (Courses page, full program sections) --------------------------- */
.course-block__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }
.course-block__checklist {
  background: var(--white);
  border-top: 2px solid var(--marigold);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  padding: 2.1rem;
}
.label-sm {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--marigold-deep);
  margin-bottom: 1.1rem;
}
.check-list { display: flex; flex-direction: column; gap: 0.85rem; }
.check-list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.94rem; color: var(--ink-soft); }
.check-list svg { width: 17px; height: 17px; color: var(--marigold-deep); flex-shrink: 0; margin-top: 0.16rem; }
@media (max-width: 860px) { .course-block__grid { grid-template-columns: 1fr; } }

.highlight-box {
  background: var(--mahogany);
  border-left: 3px solid var(--marigold);
  border-radius: var(--radius-md);
  padding: 1.9rem 2.1rem;
  margin-top: 2.6rem;
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  color: var(--white);
}
.highlight-box__icon { width: 30px; height: 30px; color: var(--marigold); flex-shrink: 0; }
.highlight-box h4 { color: var(--white); margin-bottom: 0.45rem; }
.highlight-box p { color: rgba(254, 253, 251, 0.72); font-size: 0.93rem; margin: 0; max-width: 62ch; }
@media (max-width: 600px) { .highlight-box { flex-direction: column; } }

/* ---- CTA banner --------------------------------------------------------------------- */
.cta-banner {
  background: var(--mahogany);
  border-top: 2px solid var(--marigold);
  border-radius: var(--radius-md);
  padding: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 166, 60, 0.22), transparent 70%);
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.4rem; }
.cta-banner p { color: rgba(254, 253, 251, 0.7); }

/* ---- Testimonials ------------------------------------------------------------------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--white);
  border: 1px dashed rgba(232, 166, 60, 0.45);
  border-radius: var(--radius-md);
  padding: 1.9rem;
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--marigold);
  opacity: 0.55;
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}
.testimonial-card p.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.testimonial-card .attribution { font-size: 0.82rem; font-weight: 600; color: var(--mahogany); font-family: var(--font-body); }
.testimonial-card .attribution span { font-weight: 400; color: var(--ink-faint); }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ---- About page specifics -------------------------------------------------------------- */
.founder-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.2rem;
  align-items: center;
}
.founder-portrait {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 64px rgba(61, 24, 16, 0.28);
  border: 1px solid var(--hairline);
}
.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.founder-portrait--empty {
  background: linear-gradient(155deg, var(--mahogany) 0%, var(--teal-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(254, 253, 251, 0.5);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
}
.founder-portrait--empty::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(232, 166, 60, 0.22), transparent 55%);
}

/* ---- Holistic page: gallery + jade accent ---------------------------------- */
.eyebrow--teal { color: var(--teal-deep); }
.eyebrow--teal::before { background: var(--teal); }

.holistic-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2rem;
}
.holistic-gallery__item {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--hairline-soft);
}
.holistic-gallery--wide .holistic-gallery__item { aspect-ratio: 4 / 3; }
.holistic-gallery--four { grid-template-columns: repeat(2, 1fr); }
.holistic-gallery--four .holistic-gallery__item { aspect-ratio: 5 / 4; }
.holistic-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.holistic-gallery__item:hover img { transform: scale(1.05); }

.holistic-gallery--feature {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
}
.holistic-gallery--feature .holistic-gallery__item {
  aspect-ratio: 4 / 5;
  height: auto;
}
.holistic-gallery--feature .holistic-gallery__item--large {
  grid-column: 1 / 4;
  aspect-ratio: 4 / 3;
}

.holistic-feature-img {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(61, 24, 16, 0.28);
  border: 1px solid var(--hairline);
}
.holistic-feature-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 780px) {
  .holistic-gallery { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .holistic-gallery--feature { grid-template-columns: 1fr 1fr; height: auto; grid-auto-rows: auto; }
  .holistic-gallery--feature .holistic-gallery__item { aspect-ratio: 4/5; height: auto; }
  .holistic-gallery--feature .holistic-gallery__item--large { grid-row: auto; grid-column: 1 / 3; aspect-ratio: 16/10; }
}
@media (max-width: 480px) {
  .holistic-gallery { grid-template-columns: 1fr; }
  .holistic-gallery--feature .holistic-gallery__item--large { grid-column: 1; }
}
.philosophy-list { display: flex; flex-direction: column; gap: 1.7rem; margin-top: 1.6rem; }
.credential-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.8rem; margin-top: 1.5rem; }
.credential-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 600; color: var(--mahogany); }
.credential-item svg { width: 16px; height: 16px; color: var(--marigold-deep); flex-shrink: 0; }
.philosophy-item { display: flex; gap: 1.2rem; }
.philosophy-item__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--marigold-deep);
  padding-top: 0.2rem;
  flex-shrink: 0;
  width: 2rem;
}
@media (max-width: 860px) { .founder-grid { grid-template-columns: 1fr; } }

/* ---- Contact page ------------------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-card {
  background: var(--mahogany);
  color: var(--white);
  border-radius: var(--radius-lg);
  border-top: 2px solid var(--marigold);
  padding: 2.5rem;
}
.contact-card h3 { color: var(--white); margin-bottom: 1.6rem; }
.contact-row { display: flex; gap: 1rem; margin-bottom: 1.4rem; align-items: flex-start; }
.contact-row svg { width: 19px; height: 19px; color: var(--marigold); flex-shrink: 0; margin-top: 0.2rem; }
.contact-row__label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(216, 232, 228, 0.65); margin-bottom: 0.25rem; }
.contact-row__value { font-size: 0.98rem; color: rgba(254, 253, 251, 0.92); }
.contact-card__social { display: flex; gap: 0.8rem; margin-top: 1.8rem; }
.social-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(254, 253, 251, 0.06);
  border: 1px solid rgba(254, 253, 251, 0.15);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.social-icon:hover { background: var(--marigold); border-color: var(--marigold); transform: translateY(-2px); }
.social-icon:hover svg { color: var(--mahogany); }
.social-icon svg { width: 17px; height: 17px; color: var(--white); transition: color 0.2s; }

.form-card {
  background: var(--white);
  border-top: 2px solid var(--marigold);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form__group { margin-bottom: 1.3rem; }
.form__label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--mahogany); margin-bottom: 0.45rem; }
.form__input, .form__textarea, .form__select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s;
}
.form__input:focus, .form__textarea:focus, .form__select:focus { border-color: var(--teal); outline: none; }
.form__textarea { resize: vertical; min-height: 120px; }
.form__textarea--sm { min-height: 64px; }
.form__note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.9rem; }
.form__success {
  display: none;
  background: var(--teal-pale);
  color: var(--teal-deep);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 1rem;
}
.form__success.is-visible { display: block; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form__row { grid-template-columns: 1fr; } }

/* ---- Footer --------------------------------------------------------------------------------- */
.site-footer { background: var(--mahogany); color: rgba(254, 253, 251, 0.7); padding: 4.2rem 0 2rem; border-top: 1px solid var(--hairline); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hairline-dark);
}
.footer__brand .brand__name { color: var(--white); }
.footer__desc { font-size: 0.9rem; margin-top: 0.9rem; max-width: 30ch; color: rgba(254, 253, 251, 0.58); }
.footer__heading { font-family: var(--font-mono); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(216, 232, 228, 0.65); margin-bottom: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__links a { font-size: 0.92rem; color: rgba(254, 253, 251, 0.7); transition: color 0.2s; }
.footer__links a:hover { color: var(--marigold); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.6rem;
  font-size: 0.82rem;
  color: rgba(254, 253, 251, 0.48);
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---- Misc utilities ------------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 2.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---- Incantation Generator ------------------------------------------------------------------------- */
.incant-results__head { text-align: center; margin-bottom: 2.5rem; }
.incant-results__head .eyebrow { justify-content: center; }
.incant-results__head h2 { margin: 0.9rem 0 1.1rem; }
.incant-results__wish {
  max-width: 56ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.incant-list {
  list-style: none;
  counter-reset: incant;
  background: var(--mahogany);
  border-radius: var(--radius-lg);
  padding: 1rem 2.4rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}
.incant-group-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--marigold);
  padding: 1.5rem 0 0.4rem;
  break-after: avoid;
}
.incant-list > .incant-group-label:first-child { padding-top: 1.1rem; }
.incant-sublist { list-style: none; margin: 0; padding: 0; }
.incant-list li {
  counter-increment: incant;
  display: flex;
  gap: 1.3rem;
  align-items: flex-start;
  padding: 1.3rem 0;
  border-bottom: 1px solid rgba(254, 253, 251, 0.1);
  break-inside: avoid;
}
.incant-list li:last-child { border-bottom: none; }
.incant-list li::before {
  content: counter(incant, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--marigold);
  flex-shrink: 0;
  padding-top: 0.35rem;
  width: 1.8rem;
}
.incant-list li span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--white);
  line-height: 1.55;
}

.practice-method {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2.6rem;
  margin-bottom: 2.5rem;
}
.practice-method h3 { margin-bottom: 1.4rem; }
.practice-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 1rem; }
.practice-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2rem;
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.practice-steps li::before {
  content: counter(step) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--marigold-deep);
}
.practice-steps li strong { color: var(--mahogany); }

.result-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }

#incantation-results-wrap { scroll-margin-top: 100px; }
.print-header { display: none; }

@media (max-width: 640px) {
  .incant-list { padding: 0.5rem 1.3rem; }
  .incant-list li span { font-size: 1.02rem; }
  .practice-method { padding: 1.8rem 1.6rem; }
}

/* ---- Print stylesheet — used when a student downloads their incantations ---------------------------- */
@media print {
  .no-print, .site-header, .mobile-nav, .page-hero, #incantation-form-wrap, .mf-assistant {
    display: none !important;
  }
  body { background: #fff; }
  .section { padding: 0; }
  .print-header {
    display: block;
    text-align: center;
    margin-bottom: 1.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid #E8A63C;
  }
  .print-header__brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    color: #3D1810;
  }
  .print-header__sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5A2418;
    margin-top: 0.3rem;
  }
  .incant-results__head .eyebrow { display: none; }
  .incant-list, .practice-method {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    box-shadow: none;
  }
  .incant-list li, .practice-steps li { break-inside: avoid; }
  @page { margin: 16mm; }
}

/* ---- MindForge Assistant widget --------------------------------------- */
.mf-assistant { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90; }
.mf-assistant__toggle {
  width: 64px; height: 64px;
  border-radius: 0;
  background: url('images/ember-amber-cutout.png') center/contain no-repeat;
  color: var(--white);
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 10px 18px rgba(61, 24, 16, 0.45));
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
  position: relative;
  z-index: 0;
}
.mf-assistant__toggle:hover { transform: scale(1.06); }
.mf-assistant__toggle svg { width: 25px; height: 25px; }
.mf-assistant__toggle .mf-assistant__icon-chat { display: none; }
.mf-assistant__toggle .mf-assistant__icon-close {
  display: none;
  align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(61, 24, 16, 0.7);
}
.mf-assistant.is-open .mf-assistant__icon-close { display: flex; }
/* Ripple pulse via transform+opacity only — these are compositor-accelerated
   and animate reliably on mobile/Android Chrome, unlike box-shadow, which
   many mobile browsers throttle or skip for battery reasons. */
.mf-assistant__toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--marigold);
  z-index: -1;
  animation: mf-toggle-ripple 2.6s ease-out infinite;
}
.mf-assistant.has-opened .mf-assistant__toggle::after { animation: none; content: none; }
@keyframes mf-toggle-ripple {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

.mf-assistant__nudge {
  position: absolute;
  right: 72px;
  bottom: 16px;
  background: var(--white);
  color: var(--mahogany);
  padding: 0.55rem 1rem;
  border-radius: 100px;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: var(--font-body);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: mf-nudge-float 2.8s ease-in-out infinite;
  pointer-events: none;
}
.mf-assistant.is-open .mf-assistant__nudge,
.mf-assistant.has-opened .mf-assistant__nudge { display: none; }
@keyframes mf-nudge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (max-width: 480px) {
  .mf-assistant__nudge { font-size: 0.78rem; right: 64px; padding: 0.5rem 0.85rem; }
}

.mf-assistant__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 410px;
  max-width: calc(100vw - 2.4rem);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  border: 1px solid var(--hairline-soft);
}
.mf-assistant.is-open .mf-assistant__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mf-assistant__header {
  background: var(--mahogany);
  color: var(--white);
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.mf-assistant__header-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; }
.mf-assistant__header-sub { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(216,232,228,0.7); margin-top: 0.2rem; }
.mf-assistant__close {
  background: none; border: none; color: rgba(254,253,251,0.7); cursor: pointer;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s, color 0.2s;
}
.mf-assistant__close:hover { background: rgba(254,253,251,0.1); color: var(--white); }
.mf-assistant__close svg { width: 16px; height: 16px; }

.mf-assistant__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--paper);
}
.mf-assistant__msg {
  max-width: 88%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  line-height: 1.58;
  letter-spacing: 0.003em;
}
.mf-assistant__msg--bot {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--hairline-soft);
  color: var(--ink);
  border-bottom-left-radius: 2px;
}
.mf-assistant__msg--bot strong { color: var(--marigold-deep); font-weight: 700; }
.mf-assistant__msg--user {
  align-self: flex-end;
  background: var(--mahogany);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.mf-assistant__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.1rem 1rem;
  background: var(--paper);
  flex-shrink: 0;
}
.mf-assistant__chip {
  font-size: 0.76rem;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 0.4rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--marigold-deep);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.mf-assistant__chip:hover { background: var(--marigold); color: var(--mahogany); border-color: var(--marigold); }

.mf-assistant__form {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem;
  border-top: 1px solid var(--hairline-soft);
  background: var(--white);
  flex-shrink: 0;
}
.mf-assistant__input {
  flex: 1;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--ink);
  min-width: 0;
}
.mf-assistant__input:focus { outline: none; border-color: var(--marigold); }
.mf-assistant__send {
  background: var(--marigold);
  color: var(--mahogany);
  border: none;
  border-radius: var(--radius-sm);
  width: 42px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.mf-assistant__send:hover { background: var(--marigold-deep); }
.mf-assistant__send svg { width: 17px; height: 17px; }

@media (max-width: 480px) {
  .mf-assistant { right: 1rem; bottom: 1rem; }
  .mf-assistant__panel { width: calc(100vw - 2rem); height: min(72vh, 520px); bottom: 72px; }
  .mf-assistant__toggle { width: 54px; height: 54px; }
}

/* ---- Ember (assistant personality upgrade) ------------------------------ */
.mf-assistant__header { gap: 0.7rem; }
.mf-assistant__avatar {
  width: 30px; height: 34px; flex-shrink: 0;
  background: url('images/ember-amber-cutout.png') center/contain no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: var(--mahogany);
}
.mf-assistant__avatar svg { display: none; }
.mf-assistant__header-row { display: flex; align-items: center; gap: 0.7rem; }

.mf-assistant__msg--bot { display: flex; flex-direction: column; gap: 0.4rem; }
.mf-assistant__msg-speak {
  align-self: flex-start;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--marigold-deep); opacity: 0.7; display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.mf-assistant__msg-speak:hover { opacity: 1; }
.mf-assistant__msg-speak svg { width: 12px; height: 12px; }
.mf-assistant__msg-speak.is-speaking { color: var(--teal-deep); opacity: 1; }

/* Typing indicator */
.mf-assistant__typing { display: flex; gap: 4px; padding: 0.85rem 1rem; align-items: center; }
.mf-assistant__typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--marigold-deep); opacity: 0.5;
  animation: mf-typing-bounce 1.1s infinite ease-in-out;
}
.mf-assistant__typing span:nth-child(2) { animation-delay: 0.15s; }
.mf-assistant__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes mf-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Mic button */
.mf-assistant__mic {
  background: var(--paper);
  color: var(--marigold-deep);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  width: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.mf-assistant__mic svg { width: 17px; height: 17px; }
.mf-assistant__mic:hover { border-color: var(--marigold); }
.mf-assistant__mic.is-listening {
  background: var(--teal); color: var(--white); border-color: var(--teal);
  animation: mf-mic-pulse 1.3s infinite;
}
@keyframes mf-mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(20,195,142,0.45); }
  70% { box-shadow: 0 0 0 9px rgba(20,195,142,0); }
  100% { box-shadow: 0 0 0 0 rgba(20,195,142,0); }
}
.mf-assistant__mic[hidden] { display: none; }

.mf-assistant__listening-note {
  text-align: center; font-size: 0.76rem; color: var(--teal-deep); font-family: var(--font-mono);
  padding: 0.3rem 0 0.7rem; background: var(--paper);
}

/* ---- Incantations page: sky-blue, sunrise, stars ------------------------ */
.page-hero--sky {
  background:
    radial-gradient(ellipse 65% 45% at 50% 100%, rgba(255, 196, 110, 0.4), transparent 72%),
    linear-gradient(180deg, #0C2E52 0%, #1B5D95 55%, #3B93CC 100%);
  position: relative;
  overflow: hidden;
}
.sky-graphics {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sky-graphics__sun {
  fill: #FFD37A;
  opacity: 0.85;
  filter: blur(1px);
}
.sky-star { fill: #FFF6DE; animation: sky-twinkle 3.4s ease-in-out infinite; }
.sky-star:nth-child(odd) { animation-delay: 0.6s; }
.sky-star:nth-child(3n) { animation-delay: 1.4s; }
.sky-star:nth-child(4n) { animation-delay: 2.1s; }
@keyframes sky-twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.incant-list--sky {
  background:
    radial-gradient(ellipse 70% 35% at 50% 105%, rgba(255, 196, 110, 0.3), transparent 70%),
    linear-gradient(165deg, #0F3A63 0%, #1D6DA6 100%);
}
.incant-list--sky .incant-group-label { color: #FFD37A; }
.incant-list--sky li::before { color: #FFD37A; }
.incant-list--sky li { border-bottom-color: rgba(255, 255, 255, 0.14); }

.incant-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--white);
}
.incant-loading p { font-family: var(--font-body); font-size: 0.95rem; color: rgba(254,253,251,0.85); margin: 0; max-width: 32ch; }
.incant-loading__dots { display: flex; gap: 7px; }
.incant-loading__dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: #FFD37A;
  animation: incant-loading-bounce 1.1s infinite ease-in-out;
}
.incant-loading__dots span:nth-child(2) { animation-delay: 0.15s; }
.incant-loading__dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes incant-loading-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-7px); opacity: 1; }
}

/* ---- Homepage: Philosophy section ---------------------------------------- */
.philosophy-section {
  background:
    radial-gradient(ellipse 60% 50% at 85% 100%, rgba(232, 166, 60, 0.14), transparent 65%),
    linear-gradient(165deg, var(--mahogany) 0%, var(--mahogany-mid) 100%);
  color: var(--white);
}
.philosophy-section h2 { color: var(--white); }
.philosophy-section .lede { color: rgba(254, 253, 251, 0.8); margin-top: 0.8rem; }
.philosophy-section p { color: rgba(254, 253, 251, 0.82); }
.philosophy-section__list {
  list-style: none;
  margin: 1.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.philosophy-section__list li {
  padding-left: 1.4rem;
  position: relative;
  color: rgba(254, 253, 251, 0.9);
  font-size: 0.96rem;
}
.philosophy-section__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--marigold);
}
.philosophy-section__closer {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--marigold-light) !important;
  margin-top: 1.6rem;
  line-height: 1.4;
}

/* ---- Homepage: glowing Incantations nav link ------------------------------ */
.nav__link--glow {
  position: relative;
  animation: nav-glow 2.2s ease-in-out infinite;
}
@keyframes nav-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(232, 166, 60, 0.35); }
  50% { text-shadow: 0 0 10px rgba(232, 166, 60, 0.95), 0 0 18px rgba(232, 166, 60, 0.5); }
}

/* ---- Dedicated Ember page -------------------------------------------------- */
.ember-page-section { padding-top: 3rem; padding-bottom: 5rem; }
.ember-full {
  background: var(--white);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ember-full__messages {
  height: 560px;
  overflow-y: auto;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--paper);
}
.ember-full__msg {
  max-width: 78%;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  line-height: 1.62;
  letter-spacing: 0.003em;
}
.ember-full__msg--bot {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--hairline-soft);
  color: var(--ink);
  border-bottom-left-radius: 2px;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.ember-full__msg--bot strong { color: var(--marigold-deep); font-weight: 700; }
.ember-full__msg--user {
  align-self: flex-end;
  background: var(--mahogany);
  color: var(--white);
  border-bottom-right-radius: 2px;
}
.ember-full__typing { display: flex; gap: 5px; padding: 1rem 1.2rem; align-items: center; }
.ember-full__typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--marigold-deep); opacity: 0.5;
  animation: mf-typing-bounce 1.1s infinite ease-in-out;
}
.ember-full__typing span:nth-child(2) { animation-delay: 0.15s; }
.ember-full__typing span:nth-child(3) { animation-delay: 0.3s; }
.ember-full__listening {
  text-align: center; font-size: 0.82rem; color: var(--jade-deep); font-family: var(--font-mono);
  padding: 0.4rem 0; background: var(--paper);
}
.ember-full__chips {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  padding: 1rem 1.6rem; background: var(--paper);
  border-top: 1px solid var(--hairline-soft);
}
.ember-full__form {
  display: flex; gap: 0.7rem;
  padding: 1.2rem 1.6rem;
  background: var(--white);
  border-top: 1px solid var(--hairline-soft);
}
.ember-full__input {
  flex: 1;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.ember-full__input:focus { outline: none; border-color: var(--marigold); }
.ember-full__mic {
  background: var(--paper); color: var(--marigold-deep);
  border: 1px solid var(--hairline-soft); border-radius: var(--radius-sm);
  width: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.ember-full__mic svg { width: 19px; height: 19px; }
.ember-full__mic:hover { border-color: var(--marigold); }
.ember-full__mic.is-listening { background: var(--jade); color: var(--white); border-color: var(--jade); animation: mf-mic-pulse 1.3s infinite; }
.ember-full__mic[hidden] { display: none; }
.ember-full__send {
  background: var(--mahogany); color: var(--white); border: none;
  border-radius: var(--radius-sm); width: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.2s;
}
.ember-full__send:hover { background: var(--mahogany-mid); }
.ember-full__send svg { width: 19px; height: 19px; }
.ember-full__actions { padding: 1.2rem 1.6rem; background: var(--paper); border-top: 1px solid var(--hairline-soft); text-align: center; }
.ember-full__actions .btn[hidden] { display: none; }

@media (max-width: 640px) {
  .ember-full__messages { height: 62vh; padding: 1.1rem; }
  .ember-full__msg { max-width: 90%; font-size: 0.95rem; }
  .ember-full__form, .ember-full__chips, .ember-full__actions { padding: 1rem; }
}
