/* ==========================================================================
   CELESTRA LIFE — RECRUITING SITE
   Production stylesheet. Fluid type, fluid spacing, full responsive coverage.
   Brand palette: Celestra primary (White, Blue, Purple, Black) + Cool Gray.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  /* Primary palette (Brand Guidelines §Color Usage) */
  --celestra-white:      #FFFFFF;
  --celestra-blue:       #008FD7;
  --celestra-blue-hover: #0079b7;
  --celestra-purple:     #8939D8;
  --celestra-black:      #000000;

  /* Secondary */
  --celestra-cool-gray:  #D4D6E3;
  --celestra-silver:     #B2B2B2;

  /* Tints */
  --blue-20:  #CCE9F7;
  --blue-30:  #B3DFF3;
  --blue-50:  #80C7EB;
  --blue-90:  #1A9BDB;
  --gray-25:  #F0F0F4;
  --gray-50:  #D9D9D9;
  --gray-75:  #BFBFBF;

  /* Surface roles */
  --bg-dark:        var(--celestra-black);
  --bg-light:       #F7F2FC;
  --bg-card-dark:   rgba(255, 255, 255, 0.04);
  --bg-card-light:  var(--gray-25);
  --border-dark:    rgba(0, 143, 215, 0.18);
  --border-light:   var(--celestra-cool-gray);
  --text-dim-dark:  var(--celestra-cool-gray);
  --text-dim-light: #4a4a55;

  /* Brand font stack — Celestra spec: SF UI Display, Arial fallback */
  --font-brand: 'SF Pro Display', 'SF UI Display', -apple-system, BlinkMacSystemFont,
                'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Fluid type scale (clamp(min, preferred, max)) */
  --fs-h1:      clamp(2rem, 1.35rem + 3.1vw, 4.25rem);
  --fs-h2:      clamp(1.625rem, 1.2rem + 2vw, 2.8rem);
  --fs-h3:      clamp(1.125rem, 0.97rem + 0.75vw, 1.625rem);
  --fs-h4:      clamp(1rem, 0.92rem + 0.4vw, 1.25rem);
  --fs-body:    clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem);
  --fs-lead:    clamp(1rem, 0.92rem + 0.45vw, 1.1875rem);
  --fs-small:   clamp(0.8125rem, 0.78rem + 0.15vw, 0.9375rem);
  --fs-eyebrow: clamp(0.75rem, 0.72rem + 0.15vw, 0.875rem);
  --fs-quote:   clamp(1.0625rem, 0.9rem + 1.3vw, 1.625rem);
  --fs-btn:     clamp(0.8125rem, 0.78rem + 0.15vw, 0.9375rem);
  --fs-nav:     clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);

  /* Fluid spacing scale */
  --space-3xs: clamp(0.25rem, 0.22rem + 0.12vw, 0.375rem);
  --space-2xs: clamp(0.375rem, 0.32rem + 0.25vw, 0.5rem);
  --space-xs:  clamp(0.5rem, 0.42rem + 0.4vw, 0.75rem);
  --space-sm:  clamp(0.75rem, 0.62rem + 0.6vw, 1.125rem);
  --space-md:  clamp(1rem, 0.78rem + 1vw, 1.5rem);
  --space-lg:  clamp(1.5rem, 1.1rem + 1.85vw, 2.75rem);
  --space-xl:  clamp(2rem, 1.4rem + 2.8vw, 4.25rem);
  --space-2xl: clamp(3rem, 2.05rem + 4.5vw, 6.5rem);
  --space-3xl: clamp(3.5rem, 2.3rem + 5.6vw, 8rem);

  /* Layout */
  --max-width: 1200px;
  --max-width-wide: 1440px;
  --max-width-narrow: 720px;
  --gutter: clamp(1.125rem, 0.5rem + 2.5vw, 2.25rem);
  --header-height: clamp(88px, 8vw, 124px);

  /* Effects */
  --transition-fast: 0.18s ease;
  --transition-base: 0.32s ease;
  --transition-slow: 0.55s ease;
  --easing-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ring: 0 0 0 3px rgba(0, 143, 215, 0.4);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

body {
  font-family: var(--font-brand);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--celestra-white);
  background-color: var(--celestra-black);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  /* Safe area for notch devices */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img { font-style: italic; } /* alt text styling if image fails */

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul,
ol { list-style: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea,
select,
button {
  font-family: inherit;
}

/* Accessible focus ring — works on keyboard nav, suppressed for mouse */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--celestra-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Selection */
::selection {
  background: var(--celestra-blue);
  color: var(--celestra-white);
}

/* Skip link (screen reader/keyboard accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--celestra-blue);
  color: var(--celestra-white);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}
.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-brand);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.06;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.12;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.18;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.25;
}

p {
  max-width: 68ch;
  margin-bottom: 1.25rem;
  font-size: var(--fs-body);
  line-height: 1.65;
  text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

/* Editorial body justification — disabled on narrow viewports for legibility */
@media (min-width: 720px) {
  .section p,
  .hero-sub,
  .founder-text p,
  .final-cta p {
    text-align: justify;
    text-align-last: start;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

/* Exceptions: never justify */
.text-center,
.text-center p,
.section-intro.text-center,
.card p,
.candidate-list,
.faq-answer p,
.form-note,
.footer-copy,
.stat-label,
blockquote,
blockquote cite {
  text-align: initial;
  text-align-last: auto;
  hyphens: manual;
}

.text-center,
.text-center p,
.section-intro.text-center {
  text-align: center;
}

.eyebrow {
  font-family: var(--font-brand);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--celestra-blue);
  margin-bottom: var(--space-sm);
  display: block;
}

.section-headline {
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.section-intro {
  font-size: var(--fs-lead);
  color: var(--celestra-cool-gray);
  margin-bottom: var(--space-lg);
  max-width: 60ch;
}

/* Blockquotes / pull quotes */
blockquote {
  font-family: var(--font-brand);
  font-size: var(--fs-quote);
  font-style: italic;
  font-weight: 300;
  color: var(--celestra-white);
  border-left: 2px solid var(--celestra-purple);
  padding-left: clamp(0.875rem, 0.5rem + 1vw, 1.5rem);
  margin: var(--space-lg) 0;
  max-width: 640px;
  line-height: 1.45;
  text-wrap: pretty;
}

blockquote cite {
  display: block;
  font-family: var(--font-brand);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 500;
  color: var(--celestra-silver);
  margin-top: var(--space-xs);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px; /* touch target */
  font-family: var(--font-brand);
  font-size: var(--fs-btn);
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 0.875rem 1.875rem;
  border: 0;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base);
  text-align: center;
  text-decoration: none;
  will-change: transform;
}

.btn:focus-visible {
  outline: 2px solid var(--celestra-blue);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--celestra-blue);
  color: var(--celestra-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--celestra-blue-hover);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary[disabled],
.btn-primary[aria-busy="true"] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--celestra-white);
  border: 1px solid var(--celestra-silver);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--celestra-blue);
  color: var(--celestra-blue);
}

.section-light .btn-secondary {
  color: var(--celestra-black);
  border-color: var(--celestra-silver);
}

.section-light .btn-secondary:hover,
.section-light .btn-secondary:focus-visible {
  border-color: var(--celestra-blue);
  color: var(--celestra-blue);
}

/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

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

.section {
  padding: var(--space-3xl) 0;
}

.section-dark {
  background-color: var(--celestra-black);
  color: var(--celestra-white);
}

.section-light {
  background-color: var(--bg-light);
  color: var(--celestra-black);
}

.section-light .eyebrow         { color: var(--celestra-purple); }
.section-light blockquote        { color: var(--celestra-black); }
.section-light blockquote cite   { color: var(--text-dim-light); }
.section-light .section-intro    { color: var(--text-dim-light); }

.section-graphite {
  background-color: var(--celestra-black);
  color: var(--celestra-white);
}

.section-forest {
  background-color: var(--celestra-cool-gray);
  color: var(--celestra-black);
}

.section-forest .eyebrow       { color: var(--celestra-purple); }
.section-forest blockquote      { color: var(--celestra-black); }
.section-forest blockquote cite { color: var(--gray-75); }

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.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;
}

/* --------------------------------------------------------------------------
   6. HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--border-dark);
  transition: background-color var(--transition-base);
  padding-top: env(safe-area-inset-top);
}

.site-header::before {
  content: '';
  position: absolute;
  top: env(safe-area-inset-top);
  inset-inline: 0;
  height: 2px;
  background: var(--celestra-blue);
  opacity: 0.85;
}

.site-header.is-scrolled {
  background-color: rgba(0, 0, 0, 0.97);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem var(--gutter);
  gap: var(--space-sm);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.site-logo img {
  height: clamp(60px, 5.5vw, 88px);
  width: auto;
  display: block;
  transition: opacity var(--transition-fast);
}

/* Mobile menu open: hide logo so the back arrow / X has room (optional polish) */
@media (max-width: 480px) {
  .site-logo img { height: 52px; }
}

.site-logo:hover img,
.site-logo:focus-visible img { opacity: 0.85; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.5vw, 2.25rem);
}

.nav-links a {
  font-family: var(--font-brand);
  font-size: var(--fs-nav);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--celestra-cool-gray);
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--celestra-blue);
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active { color: var(--celestra-white); }

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after { width: 100%; }

.header-cta {
  margin-left: clamp(0.5rem, 1vw, 1.5rem);
}

.header-cta .btn {
  min-height: 38px;
  padding: 0.55rem 1.25rem;
  font-size: 0.75rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1100;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--celestra-white);
  transition: transform var(--transition-base), opacity var(--transition-fast);
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  /* Use svh for mobile to avoid the URL-bar 100vh problem; fall back to vh */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + var(--space-md));
  padding-bottom: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: var(--space-md);
  color: var(--celestra-white);
}

.hero-sub {
  font-size: var(--fs-lead);
  line-height: 1.6;
  font-weight: 300;
  color: var(--celestra-cool-gray);
  margin-bottom: var(--space-lg);
  max-width: 58ch;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero blockquote {
  font-size: var(--fs-quote);
  border-left-color: var(--celestra-purple);
}

/* Sub-page hero (shorter) */
.hero-sub-page {
  min-height: auto;
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-xl);
  display: flex;
  align-items: center;
}

.hero-sub-page.section-dark + .section-dark { padding-top: 0; }

.hero-sub-page .hero-content { max-width: 680px; }

/* --------------------------------------------------------------------------
   8. DIVIDERS & RULES
   -------------------------------------------------------------------------- */
.divider {
  width: 60px;
  height: 1px;
  background-color: var(--celestra-blue);
  margin: var(--space-lg) 0;
  opacity: 0.7;
  border: 0;
}

.divider-center {
  margin-left: auto;
  margin-right: auto;
}

.bronze-rule {
  width: 100%;
  height: 1px;
  background: var(--celestra-blue);
  opacity: 0.3;
  border: 0;
}

/* --------------------------------------------------------------------------
   9. CARDS
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  grid-auto-rows: 1fr;          /* equal-height rows across the grid */
  gap: var(--space-md);
  align-items: stretch;
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;                  /* fill the row's allocated height */
  background-color: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  padding: var(--space-lg);
  transition: transform var(--transition-base),
              border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--celestra-blue);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover,
.card:focus-within {
  border-color: var(--celestra-blue);
  transform: translateY(-3px);
}

.card:hover::before,
.card:focus-within::before { opacity: 1; }

.card h3 {
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--celestra-white);
}

.card p {
  font-size: var(--fs-small);
  color: var(--celestra-silver);
  line-height: 1.65;
}

.section-light .card {
  background-color: var(--bg-card-light);
  border-color: var(--celestra-cool-gray);
}

.section-light .card:hover,
.section-light .card:focus-within {
  border-color: var(--celestra-blue);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.section-light .card h3 { color: var(--celestra-black); }
.section-light .card p  { color: var(--text-dim-light); }

/* --------------------------------------------------------------------------
   10. PROCESS STEPS
   -------------------------------------------------------------------------- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: var(--space-md);
  counter-reset: step-counter;
}

@media (min-width: 1024px) {
  .process-steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

.process-step {
  text-align: center;
  counter-increment: step-counter;
  position: relative;
  padding-top: var(--space-xl);
}

.process-step::before {
  content: counter(step-counter, decimal-leading-zero);
  font-family: var(--font-brand);
  font-size: clamp(2rem, 1.5rem + 1.3vw, 2.75rem);
  font-weight: 700;
  color: var(--celestra-purple);
  opacity: 0.55;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

.process-step h3 {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-xs);
  font-weight: 600;
  color: var(--celestra-white);
}

.process-step p {
  font-size: var(--fs-small);
  color: var(--celestra-cool-gray);
  margin: 0 auto;
  max-width: 24ch;
  text-align: center;
}

/* --------------------------------------------------------------------------
   11. CANDIDATE LIST
   -------------------------------------------------------------------------- */
.candidate-list {
  max-width: 640px;
  margin-top: var(--space-md);
}

.candidate-list li {
  padding: 0.875rem 0 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border-dark);
  font-size: var(--fs-body);
  color: var(--celestra-white);
  position: relative;
  line-height: 1.5;
}

.candidate-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.25em;
  width: 8px;
  height: 1px;
  background-color: var(--celestra-blue);
}

.section-light .candidate-list li {
  color: var(--celestra-black);
  border-bottom-color: var(--border-light);
}

/* --------------------------------------------------------------------------
   12. FOUNDER SECTION
   -------------------------------------------------------------------------- */
.founder-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 900px) {
  .founder-section {
    grid-template-columns: minmax(260px, 1.15fr) minmax(0, 1.85fr);
  }
}

.founder-portrait {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  background-color: var(--celestra-black);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7),
              0 0 30px rgba(0, 143, 215, 0.08);
  overflow: hidden;
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.founder-text h2 { margin-bottom: var(--space-md); }
.founder-text p  { color: var(--celestra-cool-gray); margin-bottom: var(--space-sm); }

/* --------------------------------------------------------------------------
   13. FINAL CTA
   -------------------------------------------------------------------------- */
.final-cta {
  text-align: center;
  padding: var(--space-3xl) 0;
  background-color: var(--celestra-black);
  color: var(--celestra-white);
}

.final-cta h2 {
  margin-bottom: var(--space-md);
  max-width: 22ch;
  margin-inline: auto;
}

.final-cta p {
  max-width: 60ch;
  margin: 0 auto var(--space-lg);
  color: var(--celestra-cool-gray);
  text-align: center;
}

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--celestra-black);
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid var(--border-dark);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.footer-logo img {
  height: clamp(56px, 5vw, 80px);
  width: auto;
  display: block;
}

.footer-copy {
  font-family: var(--font-brand);
  font-size: 0.8125rem;
  color: var(--celestra-silver);
  letter-spacing: 0.01em;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-brand);
  font-size: 0.8125rem;
  color: var(--celestra-silver);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links a:hover,
.footer-links a:focus-visible { color: var(--celestra-blue); }

/* --------------------------------------------------------------------------
   15. FORMS
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-family: var(--font-brand);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2xs);
  color: var(--celestra-cool-gray);
}

.form-group label .req {
  color: var(--celestra-blue);
  margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  min-height: 48px;
  font-family: var(--font-brand);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--celestra-white);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 143, 215, 0.3);
  border-radius: 2px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--celestra-silver);
  opacity: 0.7;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--celestra-blue);
  box-shadow: 0 0 0 3px rgba(0, 143, 215, 0.18);
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: #e3556a;
  box-shadow: 0 0 0 3px rgba(227, 85, 106, 0.16);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23B2B2B2'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-note {
  font-family: var(--font-brand);
  font-size: 0.8125rem;
  color: var(--celestra-silver);
  margin-top: var(--space-sm);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.form-error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #ff8a99;
  min-height: 1.1em;
}

/* Honeypot — visually & assistively hidden but in DOM */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Light section forms */
.section-light .form-group label { color: var(--celestra-black); }
.section-light .form-group input,
.section-light .form-group select,
.section-light .form-group textarea {
  background-color: var(--celestra-white);
  color: var(--celestra-black);
  border-color: var(--celestra-cool-gray);
}
.section-light .form-group input::placeholder,
.section-light .form-group textarea::placeholder {
  color: #7a7a85;
}
.section-light .form-group input:focus,
.section-light .form-group select:focus,
.section-light .form-group textarea:focus {
  border-color: var(--celestra-blue);
}

.form-status {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
  min-height: 1.2em;
}

.form-status[data-state="error"] { color: #ff8a99; }
.form-status[data-state="success"] { color: var(--celestra-blue); }

/* --------------------------------------------------------------------------
   16. FAQ ACCORDION
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-dark);
}

.faq-question {
  width: 100%;
  background: none;
  border: 0;
  padding: 1.5rem 0;
  font-family: var(--font-brand);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  font-weight: 500;
  color: var(--celestra-white);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  transition: color var(--transition-fast);
}

.faq-question:hover,
.faq-question:focus-visible { color: var(--celestra-blue); }

.faq-question .icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--celestra-blue);
  transition: transform var(--transition-base);
  flex-shrink: 0;
  display: inline-block;
}

.faq-question[aria-expanded="true"] .icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) var(--easing-soft);
}

.faq-question[aria-expanded="true"] + .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding-bottom: 1.5rem;
}

.faq-answer p {
  font-size: var(--fs-body);
  color: var(--celestra-cool-gray);
  line-height: 1.65;
}

.section-light .faq-item        { border-bottom-color: var(--border-light); }
.section-light .faq-question    { color: var(--celestra-black); }
.section-light .faq-question:hover,
.section-light .faq-question:focus-visible { color: var(--celestra-blue); }
.section-light .faq-answer p    { color: var(--text-dim-light); }

/* --------------------------------------------------------------------------
   17. SCROLL ANIMATIONS
   -------------------------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s var(--easing-soft),
              transform 0.7s var(--easing-soft);
  will-change: opacity, transform;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Keep legacy class name for compatibility */
.fade-in.visible { opacity: 1; transform: translate3d(0, 0, 0); }

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   18. RESOURCES GRID
   -------------------------------------------------------------------------- */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-md);
}

.resource-card {
  background-color: var(--bg-card-light);
  border: 1px solid var(--border-light);
  padding: var(--space-lg);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.resource-card:hover,
.resource-card:focus-within {
  border-color: var(--celestra-blue);
  transform: translateY(-2px);
}

.resource-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-sm);
  color: var(--celestra-blue);
}

.resource-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--celestra-black);
  margin-bottom: var(--space-xs);
}

.resource-card p {
  font-size: var(--fs-small);
  color: var(--text-dim-light);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   19. MEDIA / VIDEO EMBEDS
   -------------------------------------------------------------------------- */
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(0, 143, 215, 0.18);
}

.media-frame iframe,
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media-frame--wide {
  max-width: 980px;
  margin-inline: auto;
  margin-top: var(--space-lg);
}

/* --- Cinematic image band (between sections) -------------------------- */
.image-band {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: clamp(280px, 38vw, 560px);
  overflow: hidden;
  background: #000;
}

.image-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);             /* subtle perimeter masking */
  filter: saturate(0.92) contrast(1.04);
}

.image-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(0, 0, 0, 0.25) 0%,
              rgba(0, 0, 0, 0.08) 45%,
              rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.image-band--tall { aspect-ratio: 16 / 9; max-height: 640px; }
.image-band--short { aspect-ratio: 32 / 9; max-height: 360px; }

/* Mobile: shorter, more square-ish */
@media (max-width: 720px) {
  .image-band { aspect-ratio: 4 / 3; max-height: 360px; }
  .image-band--short { aspect-ratio: 16 / 9; }
}

/* --- Cinematic hero (background video) ------------------------------- */
.hero-cinematic {
  position: relative;
  isolation: isolate;
  background-color: #000;
  color: var(--celestra-white);
}

.hero-cinematic .container { position: relative; z-index: 2; }

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

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

.hero-media img {
  filter: saturate(0.85) contrast(1.05);
}

.hero-media video {
  z-index: 1;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.85) 100%),
    radial-gradient(circle at 70% 30%, rgba(0,143,215,0.10), transparent 55%);
  pointer-events: none;
}

/* Hide background video on mobile to save bandwidth — poster image only */
@media (max-width: 880px) {
  .hero-media video { display: none; }
}

/* Respect reduced motion: no autoplay video */
@media (prefers-reduced-motion: reduce) {
  .hero-media video { display: none; }
}

/* --- Section: founder video (YouTube) -------------------------------- */
.video-section {
  text-align: center;
}

.video-section .section-headline { margin-bottom: var(--space-sm); }
.video-section .section-intro {
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  text-align: center;
}

/* --------------------------------------------------------------------------
   20. SUCCESS / STATUS PANELS
   -------------------------------------------------------------------------- */
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  margin-top: var(--space-md);
}

.form-success.is-visible { display: block; }
.form-success.show { display: block; }  /* legacy */

.form-success h3 {
  margin-bottom: var(--space-sm);
  color: var(--celestra-blue);
}

.form-success p {
  color: var(--celestra-cool-gray);
  margin: 0 auto;
  max-width: 50ch;
}

/* --------------------------------------------------------------------------
   21. RESPONSIVE — BREAKPOINTS
   Mobile-first up to ≥1920px ultrawide
   -------------------------------------------------------------------------- */

/* ≤ 360px — small Android */
@media (max-width: 360px) {
  :root { --gutter: 1rem; }
  .header-cta { display: none; }
  .hero-ctas .btn { width: 100%; }
}

/* ≤ 480px — mobile */
@media (max-width: 480px) {
  .header-inner { padding-block: 0.75rem; }
  .site-logo img { height: 30px; }
  .hero-ctas { flex-direction: column; gap: 0.75rem; }
  .hero-ctas .btn { width: 100%; }
  blockquote {
    margin-block: var(--space-md);
    padding-left: 1rem;
  }
  .candidate-list li { padding-block: 0.75rem; font-size: 0.9375rem; }
  .process-step { padding-top: var(--space-lg); }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-links { justify-content: center; }
}

/* ≤ 640px */
@media (max-width: 640px) {
  .hero { min-height: 88vh; min-height: 88svh; }
  .form-row { grid-template-columns: 1fr; }
  .container,
  .container-narrow { padding-inline: 1.125rem; }
}

/* ≤ 880px — tablet portrait & smaller: mobile menu */
@media (max-width: 880px) {
  .menu-toggle { display: inline-flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: min(86%, 360px);
    height: 100dvh;
    height: 100vh;
    background-color: var(--celestra-black);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-lg) var(--space-xl);
    gap: 1.5rem;
    overflow-y: auto;
    transition: transform var(--transition-base) var(--easing-soft);
    border-left: 1px solid var(--border-dark);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
  }

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

  .nav-links a {
    font-size: 1rem;
    width: 100%;
    padding: 0.75rem 0;
  }

  .header-cta {
    width: 100%;
    margin-left: 0;
    margin-top: var(--space-md);
  }

  .header-cta .btn {
    width: 100%;
    min-height: 48px;
    padding-block: 0.875rem;
  }
}

/* ≤ 1024px — laptop / tablet landscape */
@media (max-width: 1024px) {
  .founder-section { gap: var(--space-lg); }
  .founder-portrait { max-width: 360px; }
}

/* ≥ 1600px — large desktop */
@media (min-width: 1600px) {
  :root {
    --max-width: 1320px;
  }
}

/* ≥ 1920px — full HD desktop and beyond */
@media (min-width: 1920px) {
  :root {
    --max-width: 1440px;
    --gutter: 2.5rem;
  }
}

/* ≥ 2400px — ultrawide */
@media (min-width: 2400px) {
  :root {
    --max-width: 1600px;
  }
  html { font-size: 17px; }
}

/* --------------------------------------------------------------------------
   22. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .nav-overlay,
  .menu-toggle,
  .hero-ctas,
  .final-cta {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .section { padding: 1rem 0; }
  blockquote { color: #000; border-left-color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* --------------------------------------------------------------------------
   23. UTILITIES
   -------------------------------------------------------------------------- */
.no-scroll { overflow: hidden !important; }
.no-wrap { white-space: nowrap; }
