/* Landing and pricing pages (F7, 2026-11-11): the school at night as a fixed background, the page
   scrolls over it in glass panels; a sticky top bar with the navigation. */

body.landing {
  background: var(--c-midnight) url('/assets/bg/bg_landing.webp') center top / cover fixed no-repeat;
  min-height: 100vh;
}
/* The picture darkens as the page scrolls (--scroll set by landing.js, 0 … 1). */
body.landing::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--c-midnight) 70%, transparent) 70%, var(--c-midnight) 100%);
  opacity: calc(0.35 + var(--scroll, 0) * 0.65);
  pointer-events: none;
  z-index: 0;
}
.landing main, .landing footer { position: relative; z-index: 1; }

/* ---- top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--c-midnight) 72%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--c-ink);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--c-lantern) 35%, transparent);
}
.topbar .brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.topbar .brand img { height: 40px; display: block; }
.topbar .brand .word { height: 34px; }
.topbar nav { display: flex; gap: 0.25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topbar nav a {
  color: var(--c-bone);
  text-decoration: none;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.topbar nav a:hover, .topbar nav a:focus-visible, .topbar nav a[aria-current="page"] { background: var(--c-plum); color: var(--c-lantern); outline: none; }
.topbar .cta { display: flex; gap: 0.5rem; }
.btn-sm { font-size: 1rem; padding: 0.4rem 1rem; border-radius: 12px; }
.btn-alt { background: var(--c-lantern); color: var(--c-ink); }
.btn-alt:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--c-ink), 0 0 14px var(--c-lantern); }
a.btn { display: inline-block; text-decoration: none; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 0.5rem; }
  .topbar .brand .word { display: none; }
  .topbar nav { order: 3; width: 100%; margin-left: 0; }
  .topbar .cta { margin-left: auto; }
}

/* ---- hero ---- */
/* The hero sits low, on the road in front of the gate, so the school stays in view above it. */
.hero {
  min-height: calc(100svh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 2rem 1rem 2.5rem;
  text-align: center;
}
.hero .logo { width: min(520px, 80vw); filter: drop-shadow(0 6px 18px var(--c-ink)); animation: rise var(--t-phase) ease both; }
.hero .tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  max-width: 40ch;
  margin: 0;
  text-shadow: 0 2px 6px var(--c-ink), 0 0 2px var(--c-ink);
  animation: rise var(--t-phase) ease 0.2s both;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; animation: rise var(--t-phase) ease 0.4s both; }
.hero .scroll-hint { color: var(--c-parchment); text-decoration: none; font-weight: 700; opacity: 0.8; animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(6px); } }

/* ---- sections ---- */
.section { max-width: 1100px; margin: 0 auto; padding: 5rem 1rem; scroll-margin-top: 80px; }
.section > h2, .page-head h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--c-lantern);
  text-align: center;
  text-shadow: 0 3px 0 var(--c-ink);
  margin-bottom: 0.5rem;
}
.section > .lead { text-align: center; max-width: 60ch; margin: 0 auto 2.5rem; font-size: 1.15rem; color: var(--c-parchment); }
.glass {
  background: color-mix(in srgb, var(--c-midnight) 82%, transparent);
  backdrop-filter: blur(8px);
  border: var(--line) solid var(--c-plum);
  border-radius: 20px;
  box-shadow: 0 0 0 3px var(--c-ink), 0 12px 30px color-mix(in srgb, var(--c-ink) 60%, transparent);
  padding: 1.5rem;
}
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card h3, .phase h3, .staff h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--c-lantern); margin: 0.25rem 0 0.5rem; }
.card p { margin: 0; }
.step-no {
  display: inline-grid; place-items: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--c-lantern); color: var(--c-ink); font-weight: 900; font-size: 1.2rem;
  border: 3px solid var(--c-ink);
}
.card svg.icon { width: 56px; height: 56px; display: block; margin-bottom: 0.5rem; }
.icon .ln { fill: none; stroke: var(--c-lantern); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.icon .fl { fill: var(--c-plum); stroke: var(--c-ink); stroke-width: 4; }

/* the night: three phases with their pictures */
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.phase { overflow: hidden; padding: 0; }
.phase img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-bottom: 4px solid var(--c-ink); }
.phase .txt { padding: 1rem 1.25rem 1.25rem; }
.phase .kicker { font-weight: 900; color: var(--c-toxic); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; }

/* the staff */
.staff { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.staff .who { text-align: center; }
.staff .who img {
  width: 170px; height: 170px; border-radius: 50%; object-fit: cover;
  border: 6px solid var(--c-lantern); box-shadow: 0 0 0 4px var(--c-ink), 0 0 24px color-mix(in srgb, var(--c-lantern) 40%, transparent);
  transition: transform var(--t-max) ease;
}
.staff .who:hover img { transform: scale(1.05) rotate(-2deg); }
.staff .who[data-who="caretaker"] img { border-color: var(--c-toxic); }
.staff .who[data-who="headmistress"] img { border-color: var(--c-blood); }
.staff .role { color: var(--c-parchment); font-weight: 700; margin: 0.25rem 0 0.75rem; }
.staff blockquote { margin: 0; font-style: italic; color: var(--c-bone); }

/* for teachers */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.feature h3 { font-family: var(--font-body); font-weight: 900; font-size: 1.15rem; color: var(--c-lantern); margin: 0 0 0.35rem; }
.feature .tag { font-size: 0.75rem; font-weight: 900; color: var(--c-ink); background: var(--c-toxic); border-radius: 6px; padding: 0.1rem 0.4rem; margin-left: 0.35rem; vertical-align: middle; }
.cta-band { text-align: center; margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ---- pricing ---- */
.page-head { text-align: center; padding: 4rem 1rem 1rem; }
.page-head p { color: var(--c-parchment); font-size: 1.15rem; max-width: 55ch; margin: 0.5rem auto 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 900px; margin: 2rem auto 0; padding: 0 1rem; }
.plan h2 { font-size: 2.4rem; color: var(--c-lantern); }
.plan .price { font-family: var(--font-display); font-size: 2.6rem; color: var(--c-bone); margin: 0; line-height: 1.1; }
.plan .price span { font-family: var(--font-body); font-size: 1rem; color: var(--c-parchment); }
.plan .for { color: var(--c-parchment); margin: 0.25rem 0 1rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.55rem; }
.plan li { padding-left: 1.8rem; position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 1em; height: 1em; border-radius: 50%; background: var(--c-toxic); box-shadow: 0 0 0 3px var(--c-ink); }
.plan li.no { opacity: 0.55; }
.plan li.no::before { background: var(--c-plum); }
.plan.pro { border-color: var(--c-lantern); box-shadow: 0 0 0 3px var(--c-ink), 0 0 30px color-mix(in srgb, var(--c-lantern) 35%, transparent); }
.plan .badge { float: right; background: var(--c-lantern); color: var(--c-ink); font-weight: 900; border-radius: 8px; padding: 0.15rem 0.6rem; font-size: 0.85rem; }
.note { text-align: center; color: var(--c-parchment); max-width: 60ch; margin: 2rem auto 0; padding: 0 1rem; }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--t-max) ease, transform var(--t-max) ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .logo, .hero .tagline, .hero .actions, .hero .scroll-hint { animation: none; }
}

/* ---- sound button ---- */
.sound-btn {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 20;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-plum); border: var(--line) solid var(--c-lantern); box-shadow: 0 0 0 3px var(--c-ink);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.sound-btn svg { width: 28px; height: 28px; }
.sound-btn .ln { fill: none; stroke: var(--c-bone); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn .spk { fill: var(--c-bone); }
.sound-btn[aria-pressed="false"] .on, .sound-btn[aria-pressed="true"] .off { display: none; }
.sound-btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--c-ink), 0 0 16px var(--c-lantern); }

/* ---- footer ---- */
.site-foot { text-align: center; padding: 3rem 1rem 5rem; color: var(--c-parchment); font-size: 0.9rem; }
.site-foot a { color: var(--c-parchment); }
.site-foot .dev { margin-top: 1rem; }

/* Inner pages (pricing): the school stays dim behind the content. */
body.landing.solid::before { opacity: 0.9; }
@media (max-width: 600px) { .hero { padding-bottom: 5.5rem; } .sound-btn { width: 48px; height: 48px; } }
