/* ═══════════════════════════════════════════════════════════
   ILIUM HOLDINGS
   Mobile-first. Breakpoints: 640px, 768px, 1024px
═══════════════════════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Tokens ─── */
:root {
  --bg:           #F8F7F3;
  --bg-alt:       #F0EEE9;
  --bg-dark:      #0C1322;
  --bg-hero:      #161D2E;   /* midnight blue — between cream and the deep navy */
  --text:         #1A1A2E;
  --text-muted:   #78787E;
  --text-light:   #E4E0D8;
  --text-dimmer:  #9A968E;
  --text-hero:    #F3ECDB;   /* warm cream — headline on dark hero */
  --text-hero-sub:#9DA5BC;   /* muted blue-gray — subtext on dark hero */
  --accent:       #B8882A;
  --accent-glow:  #D4A14A;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale — keep to these tiers */
  --fs-display:    clamp(40px, 5.6vw, 76px);  /* hero only */
  --fs-heading:    clamp(30px, 3.6vw, 48px);  /* section headings */
  --fs-subheading: clamp(22px, 2.3vw, 30px);  /* content headings: belief lead, member name */
  --fs-body:       clamp(15px, 1.4vw, 17px);  /* body text */
  --fs-eyebrow:    13px;                       /* uppercase meta labels */
  --fs-ui:         12px;                       /* nav / footer chrome */

  --max-w:    1200px;
  --px:       clamp(24px, 6vw, 96px);
  --header-h: 72px;
}

/* ─── Base ─── */
html {
  scroll-behavior: smooth;
}

/* Anchor links land below the fixed header */
section[id] {
  scroll-margin-top: var(--header-h);
}

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-sans);
  font-size:   16px;
  line-height: 1.7;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ═══════════════════════
   HEADER
═══════════════════════ */
#site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height:  var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--px);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* Default (over the dark hero): transparent bg, light text */
#site-header .logo-text       { color: var(--text-hero); }
#site-header .desktop-nav a   { color: var(--text-hero-sub); }
#site-header .desktop-nav a:hover { color: var(--text-hero); }
#site-header .hamburger span  { background: var(--text-hero); }

/* Scrolled past hero: cream bg, dark text */
#site-header.scrolled {
  background:  rgba(248, 247, 243, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:  0 1px 0 rgba(26, 26, 46, 0.07);
}

#site-header.scrolled .logo-text       { color: var(--text); }
#site-header.scrolled .desktop-nav a   { color: var(--text-muted); }
#site-header.scrolled .desktop-nav a:hover { color: var(--text); }
#site-header.scrolled .hamburger span  { background: var(--text); }

.header-inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  width:      100%;
  max-width:  var(--max-w);
  margin:     0 auto;
}

/* Logo */
.logo {
  display:     flex;
  align-items: center;
  gap:         10px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  flex-shrink: 0;
}

.logo-text {
  font-family:  var(--font-sans);
  font-size:    var(--fs-ui);
  font-weight:  500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

/* Desktop nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 36px;
}

.desktop-nav a {
  position:  relative;
  font-family:  var(--font-sans);
  font-size:    var(--fs-ui);
  font-weight:  500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition:  color 0.3s ease;
}

.desktop-nav a::after {
  content:    '';
  position:   absolute;
  bottom:     -2px;
  left:       0;
  right:      0;
  height:     1px;
  background: var(--accent);
  transform:  scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.desktop-nav a:hover       { color: var(--text); }
.desktop-nav a:hover::after { transform: scaleX(1); }

/* Hamburger */
.hamburger {
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  gap:      5px;
  background: none;
  border:   none;
  cursor:   pointer;
  padding:  8px;
  margin:   -8px;
}

.hamburger span {
  display:       block;
  width:         22px;
  height:        1.5px;
  border-radius: 2px;
  transition:    transform 0.25s ease, opacity 0.25s ease, background 0.3s ease;
}

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .hamburger   { display: none; }
}

/* ═══════════════════════
   MOBILE NAV OVERLAY
═══════════════════════ */
.nav-overlay {
  position:   fixed;
  inset:      0;
  z-index:    200;
  background: var(--bg);
  display:    flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  opacity:    0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.overlay-brand {
  position: absolute;
  top:      24px;
  left:     var(--px);
  display:  flex;
  align-items: center;
  gap:      10px;
}

.overlay-brand-text {
  font-family:    var(--font-sans);
  font-size:      var(--fs-ui);
  font-weight:    500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--text);
}

.nav-close {
  position:   absolute;
  top:        20px;
  right:      var(--px);
  background: none;
  border:     none;
  cursor:     pointer;
  color:      var(--text-muted);
  padding:    8px;
  transition: color 0.2s ease;
}

.nav-close:hover { color: var(--text); }

.overlay-nav {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            40px;
}

.overlay-link {
  font-family: var(--font-serif);
  font-size:   clamp(34px, 7vw, 52px);
  font-weight: 300;
  color:       var(--text);
  text-decoration: none;
  letter-spacing:  0.02em;
  transition:  color 0.2s ease;
}

.overlay-link:hover { color: var(--accent); }

/* ═══════════════════════
   HERO
═══════════════════════ */
.hero {
  position:    relative;
  min-height:  100vh;
  min-height:  100svh;
  display:     flex;
  align-items: stretch;
  padding:     calc(var(--header-h) + 40px) var(--px) clamp(64px, 9vh, 128px);
  overflow:    hidden;
  background:
    radial-gradient(ellipse at 88% 42%, rgba(70, 92, 140, 0.16), transparent 55%),
    var(--bg-hero);
}

/* Orbital SVG background */
.orbital-bg {
  position: absolute;
  inset:    0;
  pointer-events: none;
  overflow: hidden;
}

.orbital-bg svg {
  position: absolute;
  inset:    0;
  width:    100%;
  height:   100%;
}

/* Reduce orbital intensity on small screens */
@media (max-width: 767px) {
  .orbital-bg { opacity: 0.55; }
}

/* Alignment wrapper — matches max-width/margin pattern of all other sections */
.hero-wrapper {
  max-width:   var(--max-w);
  margin:      0 auto;
  width:       100%;
  display:     flex;
  align-items: flex-end;
}

/* Hero content */
.hero-content {
  max-width:  800px;
  position:   relative;
  z-index:    1;
  animation:  fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero-headline {
  font-family:  var(--font-serif);
  font-size:    var(--fs-display);
  font-weight:  300;
  line-height:  1.1;
  letter-spacing: -0.015em;
  color:        var(--text-hero);
  margin-bottom: 28px;
}

.hero-sub {
  font-family:  var(--font-sans);
  font-size:    var(--fs-body);
  font-weight:  300;
  line-height:  1.8;
  color:        var(--text-hero-sub);
  max-width:    540px;
}

/* ═══════════════════════
   WHAT WE BELIEVE (light)
═══════════════════════ */
.beliefs {
  background: var(--bg);
  padding:    clamp(80px, 11vw, 160px) var(--px);
}

.beliefs-inner {
  max-width: var(--max-w);
  margin:    0 auto;
}

.beliefs-list {
  list-style: none;
  display:    grid;
  gap:        clamp(48px, 6vw, 72px);
  max-width:  860px;
}

.belief {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: clamp(40px, 5vw, 56px);
  border-top:  1px solid rgba(26, 26, 46, 0.08);
}

.belief:first-child {
  padding-top: 0;
  border-top:  0;
}

@media (min-width: 768px) {
  .belief {
    grid-template-columns: 96px 1fr;
    gap: 32px;
    align-items: start;
  }
}

.belief-marker {
  font-family:  var(--font-serif);
  font-style:   italic;
  font-size:    clamp(22px, 2vw, 26px);
  font-weight:  400;
  color:        var(--accent);
  letter-spacing: 0.01em;
  line-height:  1;
  padding-top:  0.4em; /* optical alignment with belief-lead baseline */
}

.belief-body {
  max-width: 640px;
}

.belief-lead {
  font-family:  var(--font-serif);
  font-size:    var(--fs-subheading);
  font-weight:  400;
  line-height:  1.25;
  letter-spacing: -0.005em;
  color:        var(--text);
  margin-bottom: 14px;
}

.belief-detail {
  font-family:  var(--font-sans);
  font-size:    var(--fs-body);
  font-weight:  300;
  line-height:  1.8;
  color:        var(--text-muted);
}

/* ═══════════════════════
   SHARED SECTION STYLES
═══════════════════════ */
.section-inner {
  max-width: var(--max-w);
  margin:    0 auto;
}

.section-heading {
  font-family:   var(--font-serif);
  font-size:     var(--fs-heading);
  font-weight:   400;
  line-height:   1.15;
  letter-spacing: -0.01em;
  color:         var(--text);
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* ═══════════════════════
   TEAM (dark)
═══════════════════════ */
.team-section {
  padding:    clamp(80px, 10vw, 140px) var(--px);
  background: var(--bg-hero);
}

/* Shrink the dark band when there's only one member so it doesn't
   feel half-empty. Falls back gracefully on browsers without :has(). */
.team-section:has(.team-grid > .team-member:only-child) {
  padding-top:    clamp(64px, 7vw, 96px);
  padding-bottom: clamp(64px, 7vw, 96px);
}

/* Section heading override for dark bg */
.team-section .section-heading {
  color: var(--text-hero);
}

/* auto-fit so a single member doesn't get squeezed into a 1/3 column;
   capped per-member so bios never become a thin reading column */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 56px;
  justify-items: start;
}

.team-member {
  display:        flex;
  flex-direction: column;
  max-width:      640px;
}

.member-name {
  font-family:  var(--font-serif);
  font-size:    var(--fs-subheading);
  font-weight:  400;
  line-height:  1.25;
  letter-spacing: -0.005em;
  color:        var(--text-hero);
  margin-bottom: 6px;
}

.member-link {
  color:           inherit;
  text-decoration: none;
  transition:      color 0.2s ease;
}

.member-link:hover {
  color: var(--accent-glow);
}

.member-title {
  font-family:    var(--font-sans);
  font-size:      var(--fs-eyebrow);
  font-weight:    500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--accent-glow);
  margin-bottom:  18px;
}

.member-bio {
  font-family: var(--font-sans);
  font-size:   var(--fs-body);
  font-weight: 300;
  line-height: 1.8;
  color:       var(--text-hero-sub);
}

.bio-link {
  color:           var(--text-hero);
  text-decoration: none;
  border-bottom:   1px solid rgba(212, 161, 74, 0.55);
  transition:      color 0.2s ease, border-color 0.2s ease;
}

.bio-link:hover {
  color:         var(--accent-glow);
  border-color:  var(--accent-glow);
}

/* Outbound link glyph — appears after links to external destinations */
.external-link::after {
  content:        '\2197'; /* ↗ */
  display:        inline-block;
  margin-inline-start: 0.25em;
  font-size:      0.78em;
  font-weight:    400;
  vertical-align: 0.08em;
  color:          var(--accent);
  transition:     transform 0.2s ease, color 0.2s ease;
}

.external-link:hover::after {
  transform: translate(2px, -2px);
  color:     var(--accent-glow);
}

/* ═══════════════════════
   CONTACT
═══════════════════════ */
.contact-section {
  padding:    clamp(80px, 10vw, 140px) var(--px);
}

.contact-body {
  font-family: var(--font-sans);
  font-size:   var(--fs-body);
  font-weight: 300;
  line-height: 1.8;
  color:       var(--text-muted);
  max-width:   540px;
  margin-bottom: 36px;
}

.email-link {
  display:        inline-block;
  font-family:    var(--font-sans);
  font-size:      var(--fs-body);
  font-weight:    400;
  letter-spacing: 0.01em;
  color:          var(--text);
  text-decoration: none;
  border-bottom:  1px solid var(--accent);
  padding-bottom: 3px;
  transition:     color 0.2s ease, border-color 0.2s ease;
}

.email-link:hover {
  color:        var(--accent);
  border-color: transparent;
}

/* ═══════════════════════
   FOOTER
═══════════════════════ */
footer {
  padding:      28px var(--px);
  border-top:   1px solid rgba(26, 26, 46, 0.07);
}

.footer-inner {
  max-width: var(--max-w);
  margin:    0 auto;
}

.footer-copy {
  font-family:    var(--font-sans);
  font-size:      var(--fs-ui);
  font-weight:    400;
  letter-spacing: 0.08em;
  color:          var(--text-dimmer);
}
