/* webots.academy: the website's layer over the Spes Robotics Design System (tokens.css, components.css in this folder).
   Shared by the static pages (landing/) and the backend's rendered pages (backend/app/public/templates/), which the site
   service serves from the same origin, so every page loads /assets/design/*.css (landing/README.md, "Design").
   Values come from the tokens only: no colours, radii or shadows of its own. Layout: a 1200px grid with 24px gutters (16px
   on phones), full-bleed bands each wholly in one theme (data-theme + .sr-tone), sections padded space-24 (space-16). */

html { scroll-behavior: smooth; background: var(--neutral-975); }
body { margin: 0; font-family: var(--font-text); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
::selection { background: var(--blue-a40); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* ---------- Grid and bands ---------- */
.wa-container { box-sizing: border-box; width: 100%; max-width: calc(1200px + 2 * var(--space-6)); margin-inline: auto; padding-inline: var(--space-6); }
.wa-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-6); row-gap: var(--space-8); }
.wa-section { padding-block: var(--space-24); }
.wa-band { position: relative; }
/* Two dark bands in a row: black, then dark grey, divided by a hairline. */
.wa-band--subtle { background: var(--bg-subtle); }
/* The devices band rises over the hero's bottom (its negative top margin): see-through, so the hero's scrim fades to black
   behind the laptop instead of being cut off by this band's ground. The page's own ground is the same black. */
.wa-band--clear { background: transparent; }
.wa-rule { border-top: 1px solid var(--border); }
@media (max-width: 640px) {
    .wa-container { padding-inline: var(--space-4); }
    .wa-grid { column-gap: var(--space-4); }
    .wa-section { padding-block: var(--space-16); }
}

/* ---------- Type: Geist 600 headlines (never under 22px), Geist 400 text at 60–75 characters ---------- */
.wa-display { margin: 0; font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(40px, 7vw, 88px); line-height: .95; letter-spacing: -.02em; color: var(--fg); }
.wa-h1 { margin: 0; font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -.01em; color: var(--fg); }
.wa-h2 { margin: 0; font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(30px, 4vw, 48px); line-height: 1.04; color: var(--fg); }
.wa-h3 { margin: 0; font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; color: var(--fg); }
.wa-h4 { margin: 0; font-family: var(--font-text); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--fg); }
.wa-lead { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.6; color: var(--fg-muted); }
.wa-text { max-width: 70ch; font-size: 16px; line-height: 1.6; color: var(--fg-muted); }
.wa-small { font-size: 14px; line-height: 1.55; color: var(--fg-muted); }
.wa-meta { font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: .04em; color: var(--fg-subtle); }
.wa-label { font-family: var(--font-mono); font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-subtle); }
.wa-num { font-family: var(--font-mono); font-weight: 400; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.wa-section-head { display: grid; gap: var(--space-4); max-width: 720px; margin-bottom: var(--space-12); }
@media (max-width: 640px) { .wa-section-head { margin-bottom: var(--space-8); } .wa-lead { font-size: 17px; } }

/* Links: blue in running text, colour-only hover. */
.wa-link { color: var(--fg-accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--fg-accent) 40%, transparent); text-underline-offset: 3px; transition: color .2s ease, text-decoration-color .2s ease; }
.wa-link:hover { color: var(--fg); text-decoration-color: currentColor; }
.wa-arrow { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-accent); text-decoration: none; transition: color .2s ease; }
.wa-arrow:hover { color: var(--fg); }
.wa-arrow .sr-icon { width: 16px; height: 16px; }

/* A ruled list: a small blue square for each item (lists of facts, plan features). */
.wa-list { display: grid; align-content: start; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.wa-list > li { position: relative; padding-left: var(--space-6); }
.wa-list > li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; background: var(--primary); }
.wa-list strong { color: var(--fg); font-weight: 600; }

/* Numbered steps: quiet mono numbers on a hairline, "01". */
.wa-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: wa-step; border-top: 1px solid var(--border); }
.wa-steps > li { counter-increment: wa-step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-5) 0; border-bottom: 1px solid var(--border); }
.wa-steps > li::before { content: counter(wa-step, decimal-leading-zero); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--fg-subtle); }
.wa-steps strong { display: block; color: var(--fg); font-weight: 600; }
.wa-steps span { color: var(--fg-muted); }

/* ---------- Navbar: sticky glass; below 900px the links move into a sheet ---------- */
.wa-header { position: sticky; top: 0; z-index: 40; }
.wa-header .sr-nav { height: 64px; padding: 0; gap: var(--space-6); }
/* The first band slides under the sticky bar, so the bar is glass over the footage from the start (the owner, 2026-11-12:
   "the menu should have glass effect"; above the hero it only had the plain black page behind it). */
.wa-under-nav { margin-top: -64px; padding-top: 64px; }
.wa-header .sr-nav > .wa-container { display: flex; align-items: center; gap: var(--space-6); height: 100%; }
.wa-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: var(--fg); font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.wa-brand img { width: 28px; height: 28px; display: block; object-fit: contain; }
.wa-brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wa-header .sr-nav__links { margin-left: var(--space-4); }
.wa-header .sr-nav__actions { align-items: center; gap: var(--space-4); }
.wa-nav-text { font-size: 15px; font-weight: 500; color: var(--fg-muted); text-decoration: none; transition: color .2s ease; white-space: nowrap; }
.wa-nav-text:hover { color: var(--fg); }
.wa-menu { display: none; }
.wa-menu > summary { list-style: none; }
.wa-menu > summary::-webkit-details-marker { display: none; }
/* The sheet covers the page below the bar: glass like the bar (the owner, 2026-11-12), but a dense fill and a strong
   blur, since a light glass over the hero's headline left two layers of large type on top of each other. */
/* (Top 64px and an explicit height: while the bar had a backdrop-filter it was the containing block of this fixed sheet.) */
.wa-menu .sr-sheet { position: fixed; inset: 64px 0 auto 0; height: calc(100dvh - 64px); box-sizing: border-box; overflow-y: auto; border-width: 1px 0 0; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4); }
/* A backdrop blur nested in another one has nothing to blur: while the sheet is open the bar drops its own, so the
   sheet's glass frosts the page instead of showing it sharp. */
.wa-header:has(.wa-menu[open]) .sr-nav { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 78%, transparent); }
.wa-menu .sr-sheet__link { font-size: 26px; }
.wa-menu[open] .wa-menu__open, .wa-menu:not([open]) .wa-menu__close { display: none; }
@media (max-width: 899px) {
    .wa-header .sr-nav__links, .wa-header .wa-wide { display: none; }
    .wa-menu { display: block; }
}
@media (max-width: 419px) { .wa-header .wa-roomy { display: none; } }

/* ---------- Footer ---------- */
.wa-footer.sr-footer { padding-inline: 0; }
.wa-footer .sr-footer__grid, .wa-footer .sr-footer__bottom { max-width: none; }
.wa-footer .sr-footer__brand img { height: 32px; width: auto; display: block; }
.wa-footer .sr-footer__brand p { max-width: 40ch; }

/* ---------- Cards and panels ---------- */
.wa-card-link { text-decoration: none; color: inherit; }
.sr-lab.wa-card-link:hover, .sr-card.wa-card-link:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.sr-lab.wa-card-link:hover .sr-lab__title, .sr-card.wa-card-link:hover .sr-card__title { color: var(--fg-accent); }
.sr-lab.wa-card-link:focus-visible, .sr-card.wa-card-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.sr-lab__title { transition: color .2s ease; }
.sr-lab__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--fg-muted); }
.sr-lab__foot .wa-arrow { font-size: 12px; }
.wa-card-title { margin: 0; font-family: var(--font-text); font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--fg); transition: color .2s ease; }
.wa-price { font-family: var(--font-display); font-weight: var(--font-display-weight); font-size: 48px; line-height: 1; color: var(--fg); }
.wa-price small { margin-left: 4px; font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: .02em; color: var(--fg-subtle); }
/* The readiness label (LES-18) is a plain mono badge; Preview gets a dashed edge, Beta a solid one. */
.wa-readiness { cursor: help; }
.wa-readiness[data-readiness="preview"] { border: 1px dashed var(--border-strong); background: transparent; }
.wa-readiness[data-readiness="beta"] { border-color: var(--border-strong); background: transparent; }
.wa-tip { position: relative; display: inline-flex; }
.wa-tip__note { position: absolute; left: 0; top: calc(100% + 8px); z-index: 10; width: 16rem; max-width: calc(100vw - 2rem); padding: var(--space-3); border-radius: var(--radius-md);
    background: var(--bg-glass); border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    font-family: var(--font-text); font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: 0; text-transform: none; color: var(--fg-muted);
    display: none; pointer-events: none; }
/* Shown only while wanted (display, not opacity: a hidden note mustn't widen a phone's page). */
.wa-tip:hover .wa-tip__note, .wa-tip:focus-within .wa-tip__note, .wa-tip:focus .wa-tip__note { display: block; }

/* Filters: segmented chips; the selected one carries the blue edge. */
.wa-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 var(--space-4); flex: none; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: transparent;
    font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.wa-chip:hover { color: var(--fg); border-color: var(--fg-subtle); }
.wa-chip.filter-active { color: var(--fg-accent); border-color: var(--border-brand); background: var(--bg-brand-subtle); }
.wa-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Media ---------- */
.wa-media { border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; background: var(--bg-subtle); }
.wa-media img, .wa-media video { display: block; width: 100%; height: auto; }
.wa-video-toggle { position: absolute; z-index: 20; display: none; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--white) 24%, transparent); background: var(--black-a60); color: var(--white); cursor: pointer;
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: background-color .2s ease; }
.wa-video-toggle.is-ready { display: grid; }
.wa-video-toggle:hover { background: var(--neutral-900); }
.wa-video-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wa-video-toggle svg { width: 16px; height: 16px; }
.wa-video-toggle[data-state="playing"] .icon-play, .wa-video-toggle:not([data-state="playing"]) .icon-pause { display: none; }

/* Swipe rows on phones (videos, lessons, plans): a column of minmax(0, 1fr) keeps the page from sliding sideways. */
.wa-swipe { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); }
.wa-swipe::-webkit-scrollbar { display: none; }
.wa-swipe > * { flex: 0 0 82%; scroll-snap-align: center; }

/* ---------- Forms ---------- */
.wa-form-row { display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 640px) { .wa-form-row { flex-direction: row; } }

/* ---------- Lesson theory (Tailwind Typography, driven by the tokens) ---------- */
.wa-prose { --tw-prose-body: var(--fg-muted); --tw-prose-headings: var(--fg); --tw-prose-lead: var(--fg-muted); --tw-prose-links: var(--fg-accent);
    --tw-prose-bold: var(--fg); --tw-prose-counters: var(--fg-subtle); --tw-prose-bullets: var(--primary); --tw-prose-hr: var(--border);
    --tw-prose-quotes: var(--fg); --tw-prose-quote-borders: var(--border); --tw-prose-captions: var(--fg-subtle); --tw-prose-code: var(--fg);
    --tw-prose-pre-code: var(--neutral-200); --tw-prose-pre-bg: var(--neutral-950); --tw-prose-th-borders: var(--border-strong); --tw-prose-td-borders: var(--border);
    font-size: 17px; line-height: 1.7; }
.wa-prose :where(h2, h3, h4):not(:where(.not-prose *)) { font-family: var(--font-display); font-weight: var(--font-display-weight); letter-spacing: -.005em; }
.wa-prose :where(h2):not(:where(.not-prose *)) { font-size: 28px; line-height: 1.15; }
.wa-prose :where(h3):not(:where(.not-prose *)) { font-size: 22px; line-height: 1.2; }
.wa-prose :where(h4):not(:where(.not-prose *)) { font-family: var(--font-text); font-size: 18px; }
.wa-prose :where(code):not(:where(pre *, .not-prose *)) { font-family: var(--font-mono); font-size: .88em; font-weight: 400; padding: 1px 5px; border-radius: var(--radius-xs); background: var(--bg-muted); }
.wa-prose :where(code):not(:where(pre *, .not-prose *))::before, .wa-prose :where(code):not(:where(pre *, .not-prose *))::after { content: none; }
.wa-prose :where(pre):not(:where(.not-prose *)) { font-family: var(--font-mono); border: 1px solid var(--border); border-radius: var(--radius-md); }
.wa-prose :where(img):not(:where(.not-prose *)) { border-radius: var(--radius-lg); }
.wa-prose :where(a):not(:where(.not-prose *)) { text-underline-offset: 3px; }
.wa-prose :where(a):not(:where(.not-prose *)):hover { color: var(--fg); }

/* Anchors land below the sticky navbar. */
[id] { scroll-margin-top: 80px; }
.wa-header { color: var(--fg); }
/* Scrim over the hero footage: lighter at the top (the footage shows), darker behind the type, and fading into the
   band's own ground at the bottom so the video flows into the devices band below without a seam. A deliberate exception
   to the system's no-gradient rule (the owner, 2026-11-12: the flat black-a60 left a hard edge and dimmed the footage);
   it ends on --bg, so it reads as the footage's edge, not as a colour gradient. */
/* Solid --bg over the last stretch, and the scrim reaches a pixel past the hero (clipped by its overflow): the hero ends
   on a fractional pixel, and the separately composited video otherwise showed through as a hairline at the edge. */
.wa-scrim { inset: 0 0 -2px 0; background: linear-gradient(to bottom, rgba(0,0,0,.38) 0%, rgba(0,0,0,.66) 55%, var(--bg) 94%, var(--bg) 100%); }
/* The narrowest phones (320px): a long button label wraps instead of widening the page. */
@media (max-width: 379px) { .sr-btn { max-width: 100%; height: auto; min-height: 44px; padding-block: var(--space-3); white-space: normal; text-align: center; line-height: 1.3; } }
