/* Learnt public site (E111 Phase 2): the shared header, footer and hero for learnt.tech pages.
   Loads after css/learnt-system.css on pages with class="l-system l-site" on <html>.
   Scoped to html:not(.gg) like the system, so Goalie Guide pages can never pick it up.
   Pages keep their own layout rules inline; the old variable names below map onto the system
   tokens, so those rules take the new colors and type without being rewritten. */

html:not(.gg).l-site {
  --bg: var(--l-surface); --surface: var(--l-page); --dark: var(--l-ink); --accent: var(--l-indigo);
  --accent-l: var(--l-indigo-tint); --muted: var(--l-muted); --border: var(--l-line);
  --font: var(--l-font-text);
  /* Pages used the mono face for small labels; labels take the text face. Real code uses --l-font-mono. */
  --font-mono: var(--l-font-text);
}
html:not(.gg).l-site body { background: var(--l-surface); }
/* Links to #anchors land below the sticky header. */
html:not(.gg).l-site { scroll-padding-top: 84px; }

/* ── Header: sticky; turns to frosted glass once the page scrolls (CSS scroll timeline,
   and simply glass from the start where scroll timelines aren't supported) ── */
html:not(.gg) .l-sitenav { position: sticky; top: 0; z-index: 20; isolation: isolate; }
html:not(.gg) .l-sitenav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--l-glass-bg); border-bottom: 1px solid var(--l-line);
  -webkit-backdrop-filter: blur(var(--l-glass-blur)) saturate(160%); backdrop-filter: blur(var(--l-glass-blur)) saturate(160%);
  animation: l-nav-glass linear both; animation-timeline: scroll(root); animation-range: 0 96px;
}
@keyframes l-nav-glass { from { opacity: 0; } to { opacity: 1; } }
html:not(.gg) .l-sitenav nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1120px; margin: 0 auto; padding: 14px 48px; }
/* The wordmark is 1.35rem tall; padding makes it a 44px tap target without moving it. */
html:not(.gg) .l-sitenav .l-wordmark { padding: 11px 0; margin: -11px 0; }
html:not(.gg) .l-navlinks { display: flex; align-items: center; gap: 28px; }
html:not(.gg) .l-navlink { font: 500 var(--l-text-sm)/1 var(--l-font-text); color: var(--l-muted); text-decoration: none; transition: color var(--l-fast) var(--l-ease); }
html:not(.gg) .l-navlink:hover, html:not(.gg) .l-navlink[aria-current="page"] { color: var(--l-ink); }

/* ── Footer ── */
html:not(.gg) .l-sitefoot { background: var(--l-page); border-top: 1px solid var(--l-line); padding: 36px 48px; }
html:not(.gg) .l-sitefoot > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1120px; margin: 0 auto; }
html:not(.gg) .l-footlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
html:not(.gg) .l-footlinks a, html:not(.gg) .l-copyright { font-size: var(--l-text-sm); color: var(--l-muted); text-decoration: none; }
html:not(.gg) .l-footlinks a:hover { color: var(--l-ink); }

/* ── Forms on public pages: the old .input class takes the field look ── */
html:not(.gg).l-site .input {
  font: 400 1rem/1.4 var(--l-font-text); color: var(--l-ink); background: var(--l-surface);
  border: 1px solid var(--l-line); border-radius: var(--l-r-md); padding: 11px 14px; min-height: 44px; box-sizing: border-box;
  transition: border-color var(--l-fast) var(--l-ease), box-shadow var(--l-fast) var(--l-ease);
}
html:not(.gg).l-site .input:focus { outline: none; border-color: var(--l-indigo); box-shadow: 0 0 0 4px color-mix(in srgb, var(--l-indigo) 18%, transparent); }
html:not(.gg) .l-btn--lg { min-height: 52px; padding: 0 var(--l-s6); font-size: var(--l-text-md); }

/* ── Hero: a frosted panel over the slow color field ── */
html:not(.gg) .l-hero { position: relative; isolation: isolate; overflow: hidden; padding: 56px 24px 88px; }
/* Inset, so the blur fades out inside the hero instead of being cut off at its edge. */
html:not(.gg) .l-hero .l-aura { inset: 4% 6% 16%; opacity: 0.32; filter: blur(80px) saturate(110%); }
html:not(.gg) .l-hero-panel { position: relative; max-width: 780px; margin: 0 auto; padding: 48px 56px; text-align: center; }

/* ── Phones ── */
@media (max-width: 720px) {
  html:not(.gg) .l-sitenav nav { padding: 10px 16px; }
  html:not(.gg) .l-navlinks { gap: 8px; }
  html:not(.gg) .l-navlinks .hide-mobile { display: none; }
  /* Tier 2 #11: header and footer links tall enough to tap. */
  html:not(.gg) :is(.l-navlink, .l-footlinks a) { display: inline-block; padding: 12px 6px; }
  html:not(.gg) .l-sitefoot { padding: 28px 16px; }
  html:not(.gg) .l-sitefoot > div { flex-direction: column; text-align: center; }
  html:not(.gg) .l-hero { padding: 24px 16px 48px; }
  html:not(.gg) .l-hero-panel { padding: 32px 20px; }
}

/* ── Fallbacks ── */
@media (prefers-reduced-transparency: reduce) {
  html:not(.gg) .l-sitenav::before { background: var(--l-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.gg) .l-sitenav::before { animation: none; }
}
html:not(.gg)[data-l-motion="off"] .l-sitenav::before { animation: none; }
