/* Roote Shule public density: the school website, onboarding and the
   parent home on the web. Loaded after tokens, base and components. */

.site { font-size: var(--p-body); line-height: 1.6; background: var(--ground); }
.wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--s-6); }
@media (max-width: 48rem) { .wrap { padding: 0 var(--s-4); } }

.site h1, .site h2, .site h3.serif { font-family: var(--font-serif); font-optical-sizing: auto; font-weight: 600; letter-spacing: -0.03em; }
.site h1 { font-size: var(--p-h1); line-height: 1.02; }
.site h2 { font-size: var(--p-h2); line-height: 1.05; }
.site h3 { font-size: var(--p-h3); line-height: 1.2; letter-spacing: -0.015em; }
.lead { font-size: var(--p-lead); line-height: 1.5; color: var(--ink-2); max-width: 36ch; }
.prose { color: var(--ink-2); max-width: 60ch; }

/* The school motto line: the margin rule, then the words. */
.motto { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-serif); font-style: italic; font-size: var(--p-lead); color: var(--ink-2); }
.motto::before { content: ""; width: 2.25rem; height: 3px; border-radius: 3px; background: var(--accent); }

/* Floating island navigation (house rule). */
.island {
  position: sticky; top: var(--s-3); z-index: var(--z-nav);
  margin: var(--s-3) auto 0; width: calc(100% - 2 * var(--s-4)); max-width: calc(var(--content-max) - 2 * var(--s-4));
  display: flex; align-items: center; gap: var(--s-4);
  padding: 0.4rem 0.4rem 0.4rem var(--s-4);
  border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
@supports not (backdrop-filter: blur(1px)) { .island { background: var(--surface); } }
.island .brand { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-serif); font-weight: 650; font-size: 1.125rem; letter-spacing: -0.02em; white-space: nowrap; }
.island nav { display: flex; gap: var(--s-1); margin-left: auto; }
.island nav a { padding: 0.45rem 0.8rem; border-radius: var(--r-pill); font-size: 0.9375rem; font-weight: 550; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .island nav a:hover { color: var(--ink); background: var(--ground); } }
.island .menu { display: none; }
@media (max-width: 64rem) {
  .island nav { display: none; }
  .island .menu { display: inline-flex; margin-left: auto; }
  .island .apply-full { display: none; }
}

/* Primary public button: pill with its arrow in a circle. */
.cta {
  display: inline-flex; align-items: center; gap: var(--s-3);
  height: 3rem; padding: 0 0.35rem 0 1.4rem; border-radius: var(--r-pill);
  background: var(--brand); color: var(--on-brand); font-weight: 650; font-size: 1rem; white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-quick) ease;
}
.cta .cta-dot { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--on-brand) 16%, transparent); transition: transform var(--t-quick) var(--ease-out); }
.cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .cta:hover { background: var(--brand-strong); } .cta:hover .cta-dot { transform: translateX(3px); } }
.cta-sm { height: 2.5rem; font-size: 0.9375rem; padding-left: 1.1rem; }
.cta-sm .cta-dot { width: 1.9rem; height: 1.9rem; }
.cta-quiet { display: inline-flex; align-items: center; gap: var(--s-2); height: 3rem; padding: 0 1.3rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-weight: 600; background: var(--surface); transition: transform var(--t-press) var(--ease-out); }
.cta-quiet:active { transform: scale(0.97); }

/* Double bezel: a tray with a hairline and 8px of padding, the picture inside. */
.tray { padding: 0.5rem; border-radius: var(--r-tray); background: color-mix(in oklab, var(--surface) 70%, var(--ground)); border: 1px solid var(--line); }
.tray > img, .tray > .tray-in { display: block; width: 100%; border-radius: var(--r-tray-in); object-fit: cover; }
.tray-in { background: var(--surface); }

.band { padding-block: clamp(4rem, 3rem + 4vw, 7rem); }
.band-tight { padding-block: clamp(3rem, 2.4rem + 2vw, 4.5rem); }
.rule-top { border-top: 1px solid var(--line); }

/* Reveal once on scroll (IntersectionObserver adds .in). */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(1.25rem); filter: blur(6px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out); }
  .reveal.in { opacity: 1; transform: none; filter: none; }
}

/* ---- Sign-in and account pages (school-branded) ---- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--ground); }
.auth-brand { position: relative; overflow: hidden; background: var(--brand); color: var(--on-brand); padding: clamp(2rem, 1rem + 3vw, 4rem); display: flex; flex-direction: column; }
.auth-brand::after { content: ""; position: absolute; inset: auto -20% -35% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--on-brand) 14%, transparent); pointer-events: none; }
.auth-brand .crest { width: 3.25rem; height: 3.25rem; font-size: 1.5rem; border-radius: 0.9rem; background: color-mix(in oklab, var(--on-brand) 14%, transparent); color: var(--on-brand); }
.auth-brand h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); letter-spacing: -0.035em; line-height: 1.02; margin: auto 0 var(--s-5); max-width: 13ch; }
.auth-brand .motto { color: color-mix(in oklab, var(--on-brand) 82%, transparent); }
.auth-brand .powered { margin-top: var(--s-10); display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8125rem; color: color-mix(in oklab, var(--on-brand) 70%, transparent); }
.auth-brand .powered img { width: 1.5rem; filter: brightness(0) invert(1); opacity: 0.85; }
.auth-main { display: flex; flex-direction: column; padding: clamp(1.5rem, 1rem + 2vw, 3rem); }
.auth-top { display: flex; justify-content: flex-end; gap: var(--s-2); align-items: center; }
.auth-card { width: 100%; max-width: 25rem; margin: auto; display: grid; gap: var(--s-5); padding: var(--s-8) 0; }
.auth-card h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.auth-card .lead-sm { color: var(--ink-2); margin-top: var(--s-2); font-size: 0.9375rem; }
.auth-card form { display: grid; gap: var(--s-4); }
.auth-card .input, .auth-card .select { height: 2.875rem; font-size: 1rem; }
.auth-card .btn-lg { height: 3rem; }
.auth-help { font-size: 0.875rem; color: var(--ink-3); text-align: center; }
.check { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 0.9375rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
@media (max-width: 52rem) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { padding: var(--s-6) var(--s-5) var(--s-8); }
  .auth-brand h1 { margin-top: var(--s-8); font-size: 2.1rem; }
  .auth-brand .powered { display: none; }
}

/* Demo sign-in (demo schools only) */
.demo-note { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3); border-radius: var(--r-ctl); background: var(--sim-bg); color: var(--sim); font-size: 0.875rem; line-height: 1.45; }
.demo-note .i { flex: none; margin-top: 2px; }
.demo-roles { display: grid; gap: var(--s-2); list-style: none; padding: 0; margin: 0; }
.demo-roles form { display: block; }
.demo-role { width: 100%; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
.demo-role:hover { border-color: var(--school-brand); }
.demo-role:active { transform: scale(.99); }
.demo-role:focus-visible { outline: 2px solid var(--school-brand); outline-offset: 2px; }
.demo-role-icon { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--r-ctl); background: var(--brand-tint, var(--ground-2)); color: var(--school-brand); }
.demo-role-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.demo-role-text b { font-size: 0.9375rem; }
.demo-role-who { font-size: 0.8125rem; color: var(--ink-2); }
.demo-role-about { font-size: 0.8125rem; color: var(--ink-3); }
.demo-role-go { flex: none; color: var(--ink-3); }
.demo-quick { display: grid; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.demo-quick p { display: flex; gap: var(--s-2); align-items: center; color: var(--sim); font-size: 0.875rem; font-weight: 600; }
