/* ============================================================
   layout.css — container, header/nav, hero, sections, footer
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------- Header / nav ---------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--c-white);
}
.brand-mark { font-size: 1.35em; line-height: 1; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
}
.nav-menu > a {
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.3rem 0;
  position: relative;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
/* Keep the CTA pill from shrinking / clipping its label on tight widths. */
.nav-cta { flex: none; white-space: nowrap; }
/* Header sits over the hero video (transparent) -> white text with a soft
   shadow; once scrolled it gains a solid sand bg -> switch back to dark ink.
   The CTA keeps its own coral/white styling from .btn-primary. */
.brand,
.nav-menu > a:not(.nav-cta) {
  color: var(--c-white);
  text-shadow: 0 1px 12px rgba(3, 20, 28, 0.4);
}
.site-header.is-scrolled .brand,
.site-header.is-scrolled .nav-menu > a:not(.nav-cta) {
  color: var(--heading);
  text-shadow: none;
}
.nav-menu > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--dur) var(--ease);
}
.nav-menu > a:not(.nav-cta):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.site-header.is-scrolled .nav-toggle span { background: var(--heading); }

/* ---------------- Brand logo ---------------- */
/* One monochrome asset: shown white (knockout) over the hero video and in
   dark theme; shown in its native navy on the light scrolled header. */
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter var(--dur) var(--ease);
}
.site-header.is-scrolled .brand-logo { filter: none; }
:root[data-theme="dark"] .site-header.is-scrolled .brand-logo {
  filter: brightness(0) invert(1);
}
.footer-logo { height: 54px; width: auto; filter: brightness(0) invert(1); }

/* ---------------- Theme toggle ---------------- */
.theme-toggle {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--c-line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 1.15rem;
  line-height: 1;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-toggle:hover { border-color: var(--c-aqua); }
.theme-ico { display: none; }
.theme-ico-moon { display: block; }
:root[data-theme="dark"] .theme-ico-moon { display: none; }
:root[data-theme="dark"] .theme-ico-sun { display: block; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
  color: var(--c-white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  /* Gradient shows while the video loads and as a graceful fallback. */
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 194, 75, 0.35), transparent 60%),
    linear-gradient(160deg, var(--c-aqua) 0%, var(--c-ocean) 45%, var(--c-deep) 100%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
/* Darkens the footage under the (left-aligned) copy and CTAs so
   the white text stays legible over the bright ocean footage. */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    /* top scrim keeps the (white) header legible over any footage */
    linear-gradient(180deg, rgba(3, 20, 28, 0.5) 0, rgba(3, 20, 28, 0) 140px),
    linear-gradient(180deg, rgba(6, 58, 70, 0.28) 0%, rgba(6, 40, 52, 0.30) 45%, rgba(4, 26, 36, 0.74) 100%),
    linear-gradient(90deg, rgba(4, 26, 36, 0.62) 0%, rgba(4, 26, 36, 0.14) 55%, transparent 100%);
}
.hero-inner { max-width: 720px; }
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-aqua-soft);
  margin-bottom: 0.9rem;
}
.hero-title {
  font-size: var(--fs-hero);
  color: var(--c-white);
  margin-bottom: 1.1rem;
}
.hero-subtitle {
  font-size: var(--fs-lg);
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------------- Sections ---------------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-ocean);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: var(--fs-3xl);
  margin-bottom: 0.8rem;
}
.section-lead {
  max-width: 60ch;
  color: var(--text-muted);
  font-size: var(--fs-lg);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
  margin-top: 2.2rem;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--c-deep);
  color: rgba(255, 255, 255, 0.85);
  padding-block: 3rem 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: start;
}
.footer-brand .brand-name { color: var(--c-white); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); }
.footer-tagline { margin-top: 0.4rem; color: var(--c-aqua-soft); font-size: var(--fs-sm); }
.footer-social { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: flex-end; }
.footer-social a { font-weight: 600; transition: color var(--dur) var(--ease); }
.footer-social a:hover { color: var(--c-sun); }
.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.4rem;
  margin-top: 0.6rem;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
}
