* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Scroll progress bar, spec section 3.3 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1100;
  background: transparent;
}

.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transform-origin: left;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress__bar {
    animation: grow-progress linear;
    animation-timeline: scroll(root);
    width: 100%;
    transform: scaleX(0);
  }
}

@keyframes grow-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Fixed site navigation, spec section 3.1 */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--nav-height);
  background: transparent;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.site-nav.is-scrolled {
  background: var(--inwo-gradient);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.site-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-on-dark);
}

.site-nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 700;
}

.site-nav__brand-main {
  font-size: 1.25rem;
}

.site-nav__brand-sub {
  font-size: 0.75rem;
  opacity: 0.8;
}

.site-nav__anchors ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__anchors a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav__anchors a[aria-current='true'] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: inherit;
  cursor: pointer;
}

/* Nav icon contrast tracks the section underneath, but only matters
   when that section actually renders light (color-mode 'light'): in
   the default dark color-mode every section ends up dark, so the icon
   stays light regardless of the section's own data-theme. */
:root[data-color-mode='light'] .site-nav[data-nav-theme='light'] .theme-toggle {
  color: var(--inwo-blue-1);
}

.theme-toggle__icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .theme-toggle__label {
    display: none;
  }
}

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

/* Hamburger, spec section 3.2 */
.hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-on-dark);
  transition: background 200ms ease;
}

:root[data-color-mode='light'] .site-nav[data-nav-theme='light'] .hamburger__bar {
  background: var(--inwo-blue-1);
}

/* Overlay menu */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--inwo-blue-2);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-menu[hidden] {
  display: none;
}

.overlay-menu__inner {
  text-align: center;
  position: relative;
}

.overlay-menu__inner ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.5rem;
}

.overlay-menu__inner a {
  color: var(--text-on-dark);
  text-decoration: none;
}

.overlay-menu__close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text-on-dark);
  font-size: 2rem;
  cursor: pointer;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section__intro,
.section--hero__intro,
.scene p,
.station p {
  max-width: var(--max-text-width);
}

.section--hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Longhand (not `background` shorthand) so this poster image layers
     under tokens.css's `[data-theme='dark'] { background: ... }` gradient
     rule instead of being overridden by it - keep both as longhands and
     keep this stylesheet loaded after tokens.css. */
  background-image: url('/public/img/hero-poster.jpg');
  background-size: cover;
  background-position: center;
}

/* Gradient overlay over the image/video for text readability, spec 2.3/5.1 */
.section--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--inwo-gradient);
  opacity: 0.78;
  z-index: 1;
}

.section--hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.section--hero__inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  opacity: 0.85;
}

.section--hero__subline {
  font-size: 1.25rem;
  opacity: 0.9;
}

.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

/* Footer, spec section 3.4 */
.site-footer {
  padding: 3rem 0 1.5rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer__col h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.site-footer__links ul {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
}

.site-footer__links a {
  color: var(--text-on-dark);
}

.site-footer__copyright {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .section {
    padding: 2.5rem 0;
  }
}
