/*
 * Copyright © 2026 Tallinn 21. Kool. All rights reserved.
 * Unauthorized reuse of this project-specific stylesheet is prohibited
 * except where permitted by applicable law or third-party rights.
 */

/* Design tokens */
:root {
    --color-navy: #061f4d;
    --color-blue: #0768d7;
    --color-blue-dark: #0457b7;
    --color-blue-light: #eaf5ff;
    --color-text: #112747;
    --color-muted: #4b6485;
    --color-surface: #ffffff;
    --color-surface-blue: #f2f8ff;
    --color-border: #dce8f5;
    --color-white: #ffffff;
    --shadow-soft: 0 10px 35px rgba(18, 61, 109, .09);
    --shadow-card: 0 4px 14px rgba(16, 59, 108, .055);
    --radius-small: .65rem;
    --radius-medium: 1rem;
    --radius-large: 1.35rem;
    --content-width: 1240px;
    --header-height: 76px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); }
body { margin: 0; color: var(--color-text); background: var(--color-white); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 1rem; line-height: 1.5; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--color-navy); line-height: 1.12; }
h2 { margin-bottom: .3rem; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.035em; }
h3 { margin-bottom: .3rem; font-size: 1rem; }
.container { width: min(calc(100% - 3rem), var(--content-width)); margin-inline: auto; }
.section { padding: clamp(3.1rem, 5.5vw, 4.6rem) 0; scroll-margin-top: calc(var(--header-height) + 1rem); }
.section-blue { background: linear-gradient(105deg, #f7fbff 0%, #eaf5ff 100%); }
.section-heading { margin-bottom: 1.75rem; }
.section-heading p { margin: 0; color: var(--color-muted); font-size: 1.05rem; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Accessibility */
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 1000; padding: .75rem 1rem; color: white; background: var(--color-navy); border-radius: .5rem; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
:focus-visible { outline: 3px solid #ffb703; outline-offset: 3px; }

/* Header and navigation */
.header-sentinel { position: absolute; top: 0; height: 1px; }
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-height); background: rgba(255,255,255,.96); border-bottom: 1px solid transparent; transition: box-shadow .2s ease, border-color .2s ease; backdrop-filter: blur(12px); }
.site-header.is-scrolled { border-bottom-color: var(--color-border); box-shadow: 0 6px 22px rgba(18, 61, 109, .07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 2rem; }
.site-brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; min-width: max-content; }
.site-brand img { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; }
.site-brand span { display: flex; flex-direction: column; }
.site-brand strong { color: var(--color-navy); font-size: 1rem; font-weight: 800; line-height: 1.15; }
.site-brand small { color: var(--color-blue); font-size: .75rem; font-weight: 650; line-height: 1.25; }
.primary-navigation { display: flex; align-items: center; gap: clamp(1.2rem, 2.5vw, 2.2rem); }
.primary-navigation > a:not(.button) { position: relative; color: #2e4667; font-size: .9rem; font-weight: 650; text-decoration: none; transition: color .18s ease; }
.primary-navigation > a:not(.button)::after { position: absolute; right: 0; bottom: -.45rem; left: 0; height: 2px; content: ""; background: var(--color-blue); border-radius: 2px; transform: scaleX(0); transform-origin: center; transition: transform .18s ease; }
.primary-navigation > a:not(.button):hover { color: var(--color-blue); }
.primary-navigation > a:not(.button):hover::after, .primary-navigation > a:not(.button):focus-visible::after, .primary-navigation > a:not(.button).is-active::after { transform: scaleX(1); }
.primary-navigation > a:not(.button).is-active { color: var(--color-blue-dark); }
.mobile-menu-button { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: .5rem; color: var(--color-blue); background: transparent; }
.mobile-menu-button span { display: block; height: 2px; margin: 5px 0; background: currentColor; transition: transform .2s ease, opacity .2s ease; }

/* Buttons */
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: .55rem; padding: .72rem 1.35rem; border: 1.5px solid transparent; border-radius: .65rem; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: linear-gradient(135deg, var(--color-blue), var(--color-blue-dark)); box-shadow: 0 7px 17px rgba(7,104,215,.2); }
.button-primary:hover { box-shadow: 0 10px 22px rgba(7,104,215,.28); }
.button-secondary { color: var(--color-blue-dark); background: rgba(255,255,255,.85); border-color: var(--color-blue); }
.button-secondary:hover { background: var(--color-blue-light); }
.button.is-pending { cursor: pointer; }
.navigation-cta { min-height: 42px; padding: .6rem 1.1rem; font-size: .9rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 6vw, 5.2rem) 0 2.25rem; background: linear-gradient(110deg, #f8fbff 0%, #eff7ff 48%, #f8fbff 100%); }
.hero::before { position: absolute; inset: 0; content: ""; background: radial-gradient(circle at 12% 20%, rgba(255,255,255,.95), transparent 32%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.eyebrow { margin-bottom: .8rem; color: var(--color-blue); font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero h1 { margin-bottom: .8rem; font-size: clamp(3rem, 5vw, 4.7rem); line-height: 1.06; letter-spacing: -.055em; }
.hero-lead { margin-bottom: .45rem; color: var(--color-navy); font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 750; }
.hero-copy { max-width: 560px; margin-bottom: 1.55rem; color: var(--color-muted); font-size: 1.05rem; }
.registration-badge { display: inline-flex; align-items: center; margin: 0 0 .75rem; padding: .35rem .7rem; color: var(--color-blue-dark); background: var(--color-blue-light); border: 1px solid #c6e0f8; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .01em; }
.hero-actions { display: flex; gap: .8rem; }
.hero .button-primary[data-registration-link], .final-cta .button-primary[data-registration-link] { box-shadow: 0 9px 22px rgba(7,104,215,.27); }
.hero .button-primary[data-registration-link]:hover, .final-cta .button-primary[data-registration-link]:hover { box-shadow: 0 12px 27px rgba(7,104,215,.34); }
.hero-media { position: relative; min-height: 390px; overflow: hidden; border-radius: var(--radius-large); box-shadow: var(--shadow-soft); }
.hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.quick-facts { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 2.5rem; }
.quick-fact { display: flex; min-height: 72px; align-items: center; gap: .85rem; padding: 1rem 1.2rem; background: rgba(255,255,255,.94); border: 1px solid rgba(220,232,245,.75); border-radius: var(--radius-small); box-shadow: var(--shadow-card); font-weight: 750; }
.quick-fact svg { width: 29px; height: 29px; flex: 0 0 auto; color: var(--color-blue); }

/* Principles */
.principles { position: relative; overflow: hidden; }
.principles-watermark { position: absolute; top: 52%; left: 62%; z-index: 0; width: clamp(400px, 42vw, 580px); height: auto; opacity: .018; filter: grayscale(1) contrast(.8); pointer-events: none; user-select: none; transform: translate(-50%, -50%); }
.principles > .container { position: relative; z-index: 1; }
.principles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.principle { display: flex; align-items: center; gap: .9rem; padding: 1.25rem; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-small); box-shadow: var(--shadow-card); }
.principle svg { width: 34px; height: 34px; flex: 0 0 auto; color: var(--color-blue); }
.principle h3, .principle p { margin-bottom: 0; }
.principle p { color: var(--color-muted); font-size: .85rem; }

/* Activities */
.activities-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.activity { min-height: 205px; padding: 1.35rem 1.15rem; overflow: hidden; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-medium); box-shadow: var(--shadow-card); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.activity:hover { border-color: #b8d7f4; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(18, 61, 109, .08); }
.activity svg { width: 52px; height: 52px; margin-bottom: 2rem; padding: .65rem; color: var(--color-blue); background: var(--color-blue-light); border-radius: .75rem; }
.activity p { margin-bottom: 0; color: var(--color-muted); font-size: .88rem; }

/* How it works */
.workflow-facts { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.workflow-facts > div { display: flex; min-height: 126px; align-items: center; justify-content: center; flex-direction: column; gap: .75rem; padding: 1rem .75rem; text-align: center; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-small); font-size: .9rem; font-weight: 700; }
.workflow-facts svg { width: 35px; height: 35px; color: var(--color-blue); }
.workflow-note { margin: 1.25rem 0 0; color: var(--color-muted); }
.schedule-info { display: flex; max-width: 680px; align-items: flex-start; gap: .85rem; margin-top: 1.2rem; padding: 1rem 1.1rem; background: rgba(255,255,255,.72); border: 1px solid var(--color-border); border-radius: var(--radius-small); }
.schedule-info > svg { width: 28px; height: 28px; flex: 0 0 auto; color: var(--color-blue); }
.schedule-info h3 { margin-bottom: .15rem; }
.schedule-info p { margin-bottom: .35rem; color: var(--color-muted); font-size: .9rem; }
.schedule-info a { display: inline-flex; align-items: center; gap: .3rem; color: var(--color-blue-dark); font-size: .9rem; font-weight: 750; text-decoration: none; }
.schedule-info a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* Competition */
.competition-layout { display: grid; grid-template-columns: 1fr 270px; gap: 1.5rem; align-items: stretch; }
.competition-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: stages; }
.competition-progress li { position: relative; padding: .4rem .7rem; text-align: center; }
.competition-progress li:not(:last-child)::after { position: absolute; top: 23px; right: -10px; content: "→"; color: var(--color-blue); font-size: 1.35rem; }
.competition-progress svg { width: 38px; height: 38px; margin-bottom: .55rem; color: var(--color-blue); }
.competition-progress h3 { margin-bottom: .35rem; }
.competition-progress p { margin: 0; color: var(--color-muted); font-size: .8rem; line-height: 1.35; }
.competition-callout { display: flex; justify-content: center; flex-direction: column; padding: 1.4rem 1.6rem; background: linear-gradient(135deg, var(--color-blue-light), #dceeff); border: 1px solid #cfe4f8; border-radius: var(--radius-medium); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.competition-callout:hover { border-color: #9bc9f1; box-shadow: 0 7px 20px rgba(7,104,215,.1); transform: translateY(-2px); }
.competition-callout:hover .external-link-icon, .competition-callout:focus-visible .external-link-icon { transform: translate(1px, -1px); }
.competition-callout small { margin-bottom: .6rem; color: var(--color-muted); }
.competition-callout strong, .competition-callout span { color: var(--color-navy); font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.competition-callout strong { display: flex; align-items: center; gap: .35rem; }
.external-link-icon { width: 16px; height: 16px; color: var(--color-blue); transition: transform .18s ease; }

/* RoboMission */
.robomission-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(480px, 1.2fr); align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.robomission-copy .section-heading { margin-bottom: 1.15rem; }
.robomission-copy > p { max-width: 580px; margin-bottom: .65rem; color: var(--color-muted); }
.robomission-links { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-top: 1.3rem; }
.robomission-links a, .video-fallback { display: inline-flex; align-items: center; gap: .35rem; color: var(--color-blue-dark); font-weight: 750; text-decoration: none; }
.robomission-links a:hover, .video-fallback:hover { text-decoration: underline; text-underline-offset: .2em; }
.robomission-links svg { width: 15px; height: 15px; }
.video-card { min-width: 0; }
.video-placeholder, .video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-large); }
.video-placeholder { position: relative; display: block; padding: 0; overflow: hidden; color: white; background: var(--color-navy); box-shadow: var(--shadow-soft); cursor: pointer; }
.video-placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,31,77,.08), rgba(6,31,77,.68)); transition: background-color .2s ease; }
.video-placeholder:hover .video-overlay { background-color: rgba(6,31,77,.1); }
.video-play { position: absolute; top: 50%; left: 50%; display: grid; width: 64px; height: 64px; place-items: center; color: white; background: var(--color-blue); border-radius: 50%; box-shadow: 0 8px 24px rgba(6,31,77,.28); transform: translate(-50%, -50%); transition: transform .2s ease, background-color .2s ease; }
.video-placeholder:hover .video-play { background: var(--color-blue-dark); transform: translate(-50%, -50%) scale(1.04); }
.video-play svg { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.video-label { position: absolute; right: 1.25rem; bottom: 1.1rem; left: 1.25rem; display: flex; flex-direction: column; text-align: left; }
.video-label strong { color: white; font-size: 1.15rem; }
.video-label small { color: rgba(255,255,255,.82); }
.video-card iframe { display: block; background: var(--color-navy); box-shadow: var(--shadow-soft); }
.video-fallback { margin-top: .65rem; font-size: .85rem; }
.video-language { display: block; margin-top: .3rem; color: var(--color-muted); }

/* Floating controls and mobile sheet */
.scroll-top-button, .mobile-scroll-top, .floating-menu-button { display: grid; place-items: center; border: 1px solid var(--color-border); box-shadow: 0 8px 24px rgba(18,61,109,.16); cursor: pointer; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(.5rem) scale(.96); transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .2s ease; }
.scroll-top-button, .mobile-scroll-top { width: 46px; height: 46px; color: var(--color-blue-dark); background: rgba(255,255,255,.96); border-radius: 50%; }
.scroll-top-button svg, .mobile-scroll-top svg { width: 22px; height: 22px; }
.desktop-scroll-top { position: fixed; right: calc(1.5rem + env(safe-area-inset-right)); bottom: calc(1.5rem + env(safe-area-inset-bottom)); z-index: 210; }
.scroll-top-button.is-visible, .mobile-scroll-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.mobile-floating-controls { position: fixed; right: calc(1rem + env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 210; display: none; align-items: flex-end; flex-direction: column; gap: 10px; pointer-events: none; }
.mobile-scroll-top, .floating-menu-button { position: relative; z-index: 210; }
.floating-menu-button { width: 57px; height: 57px; padding: 16px 14px; color: white; background: var(--color-blue); border-color: transparent; border-radius: 1rem; }
.floating-menu-button span { display: block; width: 25px; height: 2px; margin: 3px 0; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.floating-menu-button.is-open span:nth-child(1), .mobile-menu-button.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.floating-menu-button.is-open span:nth-child(2), .mobile-menu-button.is-open span:nth-child(2) { opacity: 0; }
.floating-menu-button.is-open span:nth-child(3), .mobile-menu-button.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 220; background: rgba(6,31,77,.25); opacity: 0; transition: opacity .2s ease; }
.sheet-backdrop.is-open { opacity: 1; }
.mobile-navigation-sheet { position: fixed; right: 0; bottom: 0; left: 0; z-index: 230; display: flex; max-height: min(60vh, 520px); overflow-y: auto; flex-direction: column; gap: .2rem; padding: 1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); background: #fafdff; border: 1px solid var(--color-border); border-bottom: 0; border-radius: 1.35rem 1.35rem 0 0; box-shadow: 0 -12px 36px rgba(18,61,109,.16); opacity: 0; transform: translateY(100%); transition: opacity .2s ease, transform .2s ease; }
.mobile-navigation-sheet.is-open { opacity: 1; transform: translateY(0); }
.mobile-navigation-sheet > a:not(.button) { display: flex; min-height: 50px; align-items: center; padding: .7rem .85rem; color: var(--color-navy); border-radius: var(--radius-small); font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.mobile-navigation-sheet > a:not(.button).is-active { color: var(--color-blue-dark); background: var(--color-blue-light); }
.mobile-navigation-sheet .button { width: 100%; margin-top: .55rem; }

/* Equipment */
.equipment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: end; }
.equipment-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .65rem; }
.equipment-grid > div { display: flex; min-height: 92px; align-items: center; justify-content: center; flex-direction: column; gap: .55rem; padding: .75rem; text-align: center; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-small); font-size: .82rem; font-weight: 750; }
.equipment-grid svg { width: 34px; height: 34px; color: var(--color-blue); }
.equipment-notes { padding: 1.2rem; color: var(--color-muted); background: rgba(255,255,255,.65); border-radius: var(--radius-medium); }
.equipment-notes p { display: flex; gap: .65rem; margin-bottom: .7rem; font-size: .9rem; }
.equipment-notes p:last-child { margin-bottom: 0; }
.equipment-notes span { color: var(--color-blue); font-weight: 900; }

/* Final CTA */
.final-cta { position: relative; padding: 2.4rem 0; background: linear-gradient(100deg, #e3f1ff, #f7fbff); border-top: 1px solid #d3e6f8; }
.final-cta-inner { display: grid; grid-template-columns: minmax(260px, .9fr) auto minmax(360px, 1.15fr); align-items: center; gap: clamp(1.5rem, 3vw, 2.6rem); }
.final-cta h2 { margin-bottom: .2rem; font-size: 1.8rem; }
.final-cta p { margin-bottom: 0; color: var(--color-muted); }
.final-cta > .final-cta-inner > .button-primary[data-registration-link] { padding-inline: 1.55rem; }
.cta-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; color: var(--color-muted); }
.cta-fact { display: flex; align-items: flex-start; gap: .55rem; font-size: .875rem; line-height: 1.4; }
.cta-fact svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--color-blue); }
.cta-fact span { display: flex; flex-direction: column; }
.cta-fact strong { color: var(--color-text); }
.cta-fact small { margin-top: .2rem; color: var(--color-muted); font-size: .8rem; line-height: 1.4; }
.parent-note, .registration-status { grid-column: 1 / -1; font-size: .82rem; line-height: 1.4; }
.registration-status { font-weight: 700; color: var(--color-blue-dark) !important; }
.cta-contact { display: flex; grid-column: 1 / -1; align-items: baseline; flex-wrap: wrap; gap: .15rem .5rem; padding-top: .65rem; border-top: 1px solid rgba(18,61,109,.12); font-size: .86rem; line-height: 1.4; }
.cta-contact strong, .cta-contact span { color: var(--color-text); }
.cta-contact small { color: var(--color-muted); font-size: .8rem; }
.cta-contact a { color: var(--color-blue-dark); font-weight: 750; overflow-wrap: anywhere; text-decoration: none; }
.cta-contact a:hover { text-decoration: underline; text-underline-offset: .2em; }
.registration-toast { position: fixed; top: calc(var(--header-height) + .75rem); left: 50%; z-index: 200; width: max-content; max-width: min(420px, calc(100vw - 2rem)); margin: 0; padding: .8rem 1rem; color: var(--color-navy); background: rgba(247,251,255,.98); border: 1px solid #c6e0f8; border-radius: var(--radius-small); box-shadow: 0 10px 28px rgba(6,31,77,.16); font-size: .9rem; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, -.5rem); transition: opacity .18s ease, transform .18s ease; }
.registration-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.site-footer { padding: 1.5rem 0; background: white; border-top: 1px solid var(--color-border); }
.footer-inner { display: flex; align-items: center; gap: 1.5rem; }
.site-footer .site-brand { gap: .7rem; }
.site-footer .site-brand img { width: 48px; height: 48px; }
.site-footer .site-brand strong { font-size: .95rem; }
.site-footer .site-brand small { font-size: .72rem; }

/* Responsive */
@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: 1fr .9fr; gap: 2.5rem; }
    .hero-media { min-height: 350px; }
    .principle { align-items: flex-start; flex-direction: column; }
    .activities-grid { grid-template-columns: repeat(3, 1fr); }
    .activity:nth-last-child(-n+2) { min-height: 180px; }
    .workflow-facts { grid-template-columns: repeat(3, 1fr); }
    .equipment-layout { grid-template-columns: 1fr; }
    .equipment-notes { display: flex; gap: 2rem; }
    .equipment-grid { grid-template-columns: repeat(4, 1fr); }
    .final-cta-inner { grid-template-columns: 1fr auto; }
    .cta-details { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    :root { --header-height: 68px; }
    .container { width: min(calc(100% - 2rem), var(--content-width)); }
    .primary-navigation { gap: .85rem; }
    .primary-navigation > a:not(.button) { font-size: .82rem; }
    .navigation-cta { padding-inline: .8rem; }
    .hero-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .hero h1 { font-size: clamp(2.5rem, 6vw, 3.5rem); }
    .hero-media { min-height: 315px; }
    .quick-facts { grid-template-columns: repeat(2, 1fr); }
    .competition-layout { grid-template-columns: 1fr; }
    .competition-callout { align-items: baseline; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: .25rem .55rem; }
    .competition-callout small { flex-basis: 100%; margin-bottom: .15rem; }
    .robomission-layout { grid-template-columns: 1fr 1.1fr; gap: 1.5rem; }
    .equipment-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
    html { scroll-padding-top: 1rem; }
    .section { scroll-margin-top: 1rem; }
    .site-header { position: relative; backdrop-filter: none; }
    .site-header.is-scrolled { border-bottom-color: transparent; box-shadow: none; }
    .mobile-menu-button { display: block; }
    .primary-navigation { display: none; }
    .desktop-scroll-top { display: none; }
    .mobile-floating-controls { display: flex; }
    .mobile-floating-controls { pointer-events: auto; }
    .floating-menu-button { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
    body.menu-open .mobile-scroll-top { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(.5rem) scale(.96); }
    body.menu-open .mobile-floating-controls { z-index: 240; }
    .robomission-layout { display: flex; align-items: stretch; flex-direction: column; gap: 1.4rem; }
    .robomission-copy { display: contents; }
    .robomission-copy .section-heading { order: 1; margin-bottom: -.35rem; }
    .robomission-copy > p { order: 2; margin-bottom: -.75rem; }
    .video-card { order: 3; }
    .robomission-links { order: 4; margin-top: -.25rem; flex-direction: column; }
    .video-language { margin-top: .35rem; }
    .final-cta { padding-bottom: calc(2.4rem + env(safe-area-inset-bottom)); }
    .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

@media (max-width: 680px) {
    .section { padding: 2.35rem 0; }
    .site-brand { gap: .55rem; }
    .site-brand img { width: 40px; height: 40px; }
    .site-brand strong { font-size: .92rem; }
    .site-brand small { font-size: .68rem; }
    .hero { padding: 2.2rem 0 1.6rem; }
    .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 1.4rem; }
    .hero h1 { margin-bottom: .55rem; font-size: clamp(2.45rem, 12vw, 3.35rem); }
    .hero-copy { margin-bottom: 1.2rem; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .hero-actions .button { padding-inline: .65rem; font-size: .88rem; }
    .hero-media { min-height: 245px; margin-inline: -.25rem; }
    .hero-media > img { object-position: 61% center; }
    .quick-facts { gap: .55rem; margin-top: 1.25rem; }
    .quick-fact { min-height: 72px; justify-content: center; flex-direction: column; gap: .25rem; padding: .65rem .3rem; text-align: center; font-size: .78rem; line-height: 1.25; }
    .quick-fact svg { width: 24px; height: 24px; }
    h2 { font-size: 1.75rem; }
    .section-heading { margin-bottom: 1.25rem; }
    .section-heading p { font-size: .95rem; }
    .principles-grid { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
    .principle { min-height: 120px; gap: .45rem; padding: .9rem; }
    .principle svg { width: 29px; height: 29px; }
    .principle h3 { font-size: .88rem; }
    .principle p { display: none; }
    .activities-grid { display: flex; flex-direction: column; gap: .45rem; }
    .activity, .activity:nth-last-child(-n+2) { display: flex; min-height: 72px; align-items: center; gap: .85rem; padding: .75rem; }
    .activity svg { width: 48px; height: 48px; flex: 0 0 auto; margin: 0; }
    .activity h3 { margin: 0; font-size: .95rem; }
    .activity p { font-size: .78rem; }
    .workflow-facts { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
    .workflow-facts > div { min-height: 105px; padding: .75rem .45rem; font-size: .82rem; }
    .workflow-facts svg { width: 30px; height: 30px; }
    .workflow-note { font-size: .9rem; }
    .schedule-info { padding: .9rem; text-align: left; }
    .competition-progress { grid-template-columns: repeat(3, 1fr); row-gap: 1.15rem; }
    .competition-progress li { padding: .25rem .45rem; }
    .competition-progress li:nth-child(3)::after { display: none; }
    .competition-progress svg { width: 31px; height: 31px; }
    .competition-progress h3 { font-size: .85rem; }
    .competition-progress p { display: none; }
    .competition-callout strong, .competition-callout span { font-size: 1.05rem; }
    .equipment-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
    .equipment-grid > div:last-child { grid-column: 1 / -1; width: calc(50% - .25rem); justify-self: center; }
    .equipment-grid > div { min-height: 82px; padding: .55rem .2rem; font-size: .75rem; }
    .equipment-notes { display: block; padding: 1rem; }
    .final-cta { text-align: center; }
    .final-cta-inner { display: flex; align-items: stretch; flex-direction: column; gap: 1rem; }
    .final-cta .button { width: min(100%, 290px); align-self: center; }
    .cta-details { display: flex; align-items: stretch; flex-direction: column; gap: .75rem; text-align: left; }
    .cta-fact, .parent-note, .registration-status { width: min(100%, 380px); align-self: center; }
    .cta-contact { width: min(100%, 380px); align-self: center; align-items: flex-start; flex-direction: column; gap: .1rem; margin-top: .2rem; text-align: left; }
    .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 360px) {
    .container { width: min(calc(100% - 1.25rem), var(--content-width)); }
    .site-brand { gap: .4rem; }
    .site-brand img { width: 38px; height: 38px; }
    .site-brand strong { font-size: .84rem; }
    .site-brand small { display: block; font-size: .61rem; }
    .hero h1 { font-size: 2.35rem; }
    .hero-lead, .hero-copy { font-size: .94rem; }
    .hero-media { min-height: 210px; }
    .quick-fact { font-size: .72rem; }
    .principle { min-height: 105px; padding: .75rem; }
    .equipment-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 430px) {
    .hero-actions { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .principles-watermark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
