:root {
  --ink: #243048;
  --ink-soft: #556174;
  --teal: #17645f;
  --teal-dark: #0f514d;
  --coral: #f56b61;
  --focus: #a45000;
  --gold: #ffd967;
  --mist: #eaf6f4;
  --paper: #fbfdfc;
  --paper-rgb: 251, 253, 252;
  --surface: #ffffff;
  --surface-soft: #f1f8f6;
  --hero-surface: rgba(255, 255, 255, 0.92);
  --intro-bg: #243048;
  --intro-text: rgba(255, 255, 255, 0.86);
  --control-bg: #ffffff;
  --button-border: #b8cbc7;
  --primary-button-text: #ffffff;
  --skip-bg: #243048;
  --skip-text: #ffffff;
  --line: #d8e7e4;
  --shadow: 0 18px 50px rgba(36, 48, 72, 0.12);
  --box-shadow: 0 10px 26px rgba(36, 48, 72, 0.08);
  --max: 1160px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #f4f8f7;
  --ink-soft: #c9d7d4;
  --teal: #5cc7bc;
  --teal-dark: #8be1d8;
  --coral: #ff8d84;
  --focus: #ffd967;
  --gold: #ffd967;
  --mist: #153b3a;
  --paper: #111827;
  --paper-rgb: 17, 24, 39;
  --surface: #172235;
  --surface-soft: #132d31;
  --hero-surface: rgba(23, 34, 53, 0.9);
  --intro-bg: #0b1220;
  --intro-text: rgba(255, 255, 255, 0.9);
  --control-bg: #172235;
  --button-border: #5d7773;
  --primary-button-text: #111827;
  --skip-bg: #0b1220;
  --skip-text: #ffffff;
  --line: #2b4250;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--skip-bg);
  color: var(--skip-text);
  padding: 0.7rem 1rem;
  border-radius: 6px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(var(--paper-rgb), 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(36, 48, 72, 0.08);
}

.nav {
  width: min(100% - 2rem, var(--max));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: clamp(190px, 28vw, 310px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-weight: 700;
}

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

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--teal-dark);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.theme-toggle,
.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--control-bg);
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  display: inline-flex;
  color: var(--teal-dark);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-soft);
}

.theme-icon {
  position: absolute;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: opacity 180ms ease, transform 180ms ease;
}

.tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  z-index: 30;
  width: max-content;
  max-width: min(220px, calc(100vw - 2rem));
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--skip-bg);
  color: var(--skip-text);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tooltip::before {
  content: "";
  position: absolute;
  right: 14px;
  top: -6px;
  width: 10px;
  height: 10px;
  background: var(--skip-bg);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover .tooltip,
  .theme-toggle:focus-visible .tooltip,
  .nav-toggle:hover .tooltip,
  .nav-toggle:focus-visible .tooltip {
    opacity: 1;
    transform: translateY(0);
  }
}

.sun-icon {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.moon-icon {
  opacity: 0;
  transform: translateY(18px) rotate(-30deg);
}

:root[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: translateY(-18px) rotate(45deg);
}

:root[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span:not(.visually-hidden) {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  width: min(100% - 2rem, var(--max));
  min-height: calc(100svh - 78px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
li,
.button {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 8.5vw, 6.1rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: 1.22rem;
  line-height: 1.25;
}

.hero-lede {
  max-width: 60ch;
  margin: 1.6rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.hero-actions,
.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0.82rem 1.05rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--primary-button-text);
  background: var(--teal);
  box-shadow: 0 12px 30px rgba(23, 100, 95, 0.22);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--teal-dark);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--button-border);
}

.hero-visual {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--hero-surface);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.intro-band {
  background: var(--intro-bg);
  color: var(--skip-text);
}

.intro-grid {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.intro-grid p {
  margin: 0;
  color: var(--intro-text);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.section,
.principles,
.split-section,
.join {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  min-height: 220px;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--box-shadow);
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.list-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-left: 6px solid var(--coral);
  background: var(--mist);
  box-shadow: var(--box-shadow);
}

.list-panel ul {
  margin: 0;
  padding-left: 1.2rem;
}

.list-panel li + li {
  margin-top: 0.8rem;
}

.muted {
  width: 100%;
  max-width: none;
  padding-inline: max(1rem, calc((100vw - var(--max)) / 2));
  background: var(--surface-soft);
}

.needs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.needs-grid div {
  min-height: 82px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--box-shadow);
}

.principle-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.principle-list p {
  min-height: 120px;
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 800;
  box-shadow: var(--box-shadow);
}

.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  border-top: 1px solid var(--line);
}

.join-copy {
  max-width: 700px;
}

.join-copy p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.site-footer {
  width: min(100% - 2rem, var(--max));
  min-height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 800;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand img {
  width: 48px;
}

.footer-brand p {
  margin: 0;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-socials a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--box-shadow);
  transition: transform 160ms ease, color 160ms ease, background 160ms ease;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  color: var(--teal-dark);
  background: var(--surface-soft);
  transform: translateY(-2px);
}

.footer-socials svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: 78px 0 auto;
    display: grid;
    gap: 0;
    padding: 1rem;
    background: rgba(var(--paper-rgb), 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 180ms ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
  }

  .nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .hero,
  .intro-grid,
  .split-section,
  .join {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 280px;
  }

  .hero-visual img {
    min-height: 280px;
  }

  .feature-grid,
  .principle-list {
    grid-template-columns: 1fr;
  }

  .needs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .join-actions {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .brand {
    width: 190px;
  }

  .nav {
    width: min(100% - 1rem, var(--max));
  }

  .hero,
  .section,
  .principles,
  .split-section,
  .join,
  .intro-grid,
  .site-footer {
    width: min(100% - 1.25rem, var(--max));
  }

  .button {
    width: 100%;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 3.8rem);
  }

  .hero-visual {
    min-height: 230px;
  }

  .hero-visual img {
    min-height: 230px;
  }

  .needs-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 1.5rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-brand {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
