:root {
  color-scheme: light dark;
  --surface: #f3f5f7;
  --surface-raised: #e8ecf0;
  --surface-soft: #dfe5ea;
  --ink: #12171c;
  --ink-soft: #56616b;
  --line: #cbd2d8;
  --accent: #0c443c;
  --accent-hover: #083730;
  --accent-ink: #f2faf8;
  --header: rgb(243 245 247 / 0.88);
  --image-scrim: rgb(10 19 29 / 0.08);
  --hero-text: #f6f8f7;
  --max-width: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --font-display: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* The site is light-locked for now; the dark token set was removed
   while the light direction is being evaluated. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Layer scale: header 10, skip link 20.
   Transparent over the hero; frosted once scrolled past it. */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 240ms ease, border-color 240ms ease;
}

.site-header.scrolled {
  background: var(--header);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  border-bottom-color: var(--line);
}

/* while transparent, the header sits on the hero's pale sky in both themes,
   so it uses fixed ink values until it scrolls onto its frosted background */
.site-header:not(.scrolled) .wordmark,
.site-header:not(.scrolled) .nav-cta {
  color: #12171c;
}

.site-header:not(.scrolled) .nav-cta {
  border-color: rgb(18 23 28 / 0.4);
}

.site-header:not(.scrolled) .mark-solid {
  fill: #0c443c;
}

.header-inner {
  width: min(100%, var(--max-width));
  height: 72px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.13rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
}

.mark-solid {
  fill: var(--accent);
}

.mark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  font-size: 0.9rem;
  font-weight: 500;
}

.primary-nav a {
  text-decoration: none;
}

.primary-nav > a:not(.nav-cta) {
  color: var(--ink-soft);
  transition: color 180ms ease;
}

.primary-nav > a:not(.nav-cta):hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  transition: border-color 180ms ease, background 180ms ease, transform 100ms ease;
}

.nav-cta:hover {
  border-color: var(--ink);
  background: var(--surface-raised);
}

.nav-cta:active,
.button:active {
  transform: translateY(1px);
}

/* ---------- hero: full-bleed looping video ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(10 16 22 / 0.6) 0%, rgb(10 16 22 / 0.22) 40%, rgb(10 16 22 / 0) 64%),
    linear-gradient(to right, rgb(10 16 22 / 0.26) 0%, rgb(10 16 22 / 0) 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: 128px var(--gutter) clamp(4rem, 10vh, 7.5rem);
}

.hero h1 {
  max-width: 14ch;
  color: var(--hero-text);
  font-size: clamp(3.2rem, 6vw, 5.6rem);
}

.hero-summary {
  max-width: 38rem;
  margin-top: 2rem;
  color: rgb(246 248 247 / 0.86);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

/* the hero button keeps the light-theme accent in both modes,
   since it always sits on the dark video */
.hero .button-primary {
  background: #0c443c;
  color: #f2faf8;
}

.hero .button-primary:hover {
  background: #083730;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 100ms ease;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: var(--accent-hover);
}

/* ---------- principles ---------- */

.principles {
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

.section-intro {
  max-width: 42rem;
}

.section-intro h2 {
  font-size: clamp(2.6rem, 4.5vw, 4.75rem);
}

.section-intro p {
  max-width: 30rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.principle-list {
  margin-top: clamp(1.75rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--line);
}

.principle {
  padding-block: clamp(1.5rem, 2.5vw, 2.25rem);
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.geo-img {
  width: 100%;
  height: auto;
}

.principle h3 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.principle > p {
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- foundation ---------- */

.foundation {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.foundation-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  align-items: end;
}

.foundation-media {
  min-height: 440px;
  overflow: hidden;
  background: var(--surface-raised);
}

.foundation-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.foundation-copy {
  position: relative;
  margin: 0 0 -3rem -4rem;
  padding: clamp(2.5rem, 5vw, 5rem);
  background: var(--surface-soft);
}

.foundation-copy h2 {
  font-size: clamp(2.4rem, 4vw, 4rem);
}

.foundation-copy > p {
  max-width: 30rem;
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

/* ---------- contact ---------- */

.contact {
  background: var(--accent);
  color: var(--accent-ink);
}

.contact-inner {
  min-height: 0;
  padding-block: clamp(4rem, 8vw, 6.5rem);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr);
  gap: clamp(3rem, 10vw, 9rem);
  align-items: end;
}

.contact-kicker {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.contact h2 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 6vw, 6.4rem);
}

.button-light {
  background: var(--accent-ink);
  color: var(--accent-hover);
}

.button-light:hover {
  background: color-mix(in srgb, var(--accent-ink) 88%, transparent);
}

/* ---------- footer ---------- */

.site-footer {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: 2rem var(--gutter) 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.footer-mark {
  color: var(--ink);
}

/* ---------- motion ---------- */

.motion .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 760ms cubic-bezier(0.16, 1, 0.3, 1), transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

.motion .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.motion .hero-copy > * {
  animation: hero-copy-in 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motion .hero-copy > :nth-child(2) {
  animation-delay: 90ms;
}

.motion .hero-copy > :nth-child(3) {
  animation-delay: 180ms;
}

@media (max-width: 960px) {
  .hero h1 {
    font-size: clamp(3.2rem, 6.4vw, 4.6rem);
  }

  .foundation-copy {
    margin-left: -2rem;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > p:first-of-type {
    display: none;
  }
}

@media (max-width: 767px) {
  .header-inner {
    height: 64px;
  }

  .nav-cta {
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
  }

  .hero-inner {
    padding-top: 112px;
    padding-bottom: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 13vw, 4.4rem);
  }

  .hero-summary {
    max-width: 31rem;
    margin-top: 1.5rem;
  }

  .hero-actions {
    margin-top: 2rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .principles {
    padding-block: 4rem;
  }

  .principle {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1.25rem;
  }

  .principle .geo-img {
    grid-row: 1 / 3;
  }

  .principle > p {
    grid-column: 2;
  }

  .foundation {
    padding-bottom: 5.5rem;
  }

  .foundation-grid {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .foundation-media {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

  .foundation-copy {
    margin: -2rem var(--gutter) 0;
    padding: 2rem;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    min-height: 620px;
    gap: 3.5rem;
    align-content: space-between;
  }

  .contact h2 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
