/* ============================================================
   hAIve design system — tokens per the extracted style reference
   ============================================================ */
:root {
  /* Colors */
  --color-void: #000000;
  --color-bone-white: #ffffff;
  --color-ash-gray: #9a9a9a;
  --color-silver-mist: #bdbdbd;
  --color-electric-iris: #8052ff;
  --color-saffron-spark: #ffb829;
  --color-deep-verdant: #15846e;

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --text-caption: 12px;   --leading-caption: 1.5;
  --text-nav-label: 14px; --leading-nav-label: 1.2; --tracking-nav-label: 0.35px;
  --text-body: 18px;      --leading-body: 1.5;
  --text-heading-xs: 27px;    --leading-heading-xs: 1;
  --text-heading-sm: 42px;    --leading-heading-sm: 1.2;
  --text-heading: 48px;       --leading-heading: 1.1;
  --text-heading-lg: 78px;    --leading-heading-lg: 1.1;
  --text-display: 113px;      --leading-display: 1.1;

  /* Spacing (6px base) */
  --spacing-6: 6px;  --spacing-12: 12px; --spacing-18: 18px;
  --spacing-24: 24px; --spacing-30: 30px; --spacing-36: 36px;
  --spacing-60: 60px; --spacing-96: 96px; --spacing-120: 120px;

  /* Layout & shape */
  --page-max-width: 1280px;
  --radius-cards: 24px;
  --radius-buttons: 24px;
  --radius-full: 9999px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-void);
  color: var(--color-bone-white);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 200;
  line-height: var(--leading-body);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* the hidden attribute must always win, even over display:flex rules */
[hidden] { display: none !important; }

main, .footer {
  position: relative;
  z-index: 1;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--spacing-36);
}

/* The one persistent particle field */
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============ type roles ============ */
.display {
  font-size: clamp(56px, 8.2vw, var(--text-display));
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: -0.04em;
}

.heading-lg {
  font-size: clamp(44px, 6vw, var(--text-heading-lg));
  font-weight: 400;
  line-height: var(--leading-heading-lg);
  letter-spacing: -0.04em;
}

.heading {
  font-size: clamp(34px, 4vw, var(--text-heading));
  font-weight: 400;
  line-height: var(--leading-heading);
  letter-spacing: -0.04em;
}

.heading-sm {
  font-size: clamp(30px, 3.4vw, var(--text-heading-sm));
  font-weight: 400;
  line-height: var(--leading-heading-sm);
  letter-spacing: -0.04em;
}

.body-copy {
  font-size: var(--text-body);
  font-weight: 200;
  line-height: var(--leading-body);
  color: var(--color-bone-white);
  max-width: 480px;
}

.label {
  font-size: var(--text-nav-label);
  font-weight: 600;
  letter-spacing: var(--tracking-nav-label);
  text-transform: uppercase;
  color: var(--color-saffron-spark);
}

/* ============ buttons & links ============ */
.btn--primary {
  display: inline-block;
  background: var(--color-electric-iris);
  color: var(--color-bone-white);
  font-size: var(--text-nav-label);
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  line-height: 1;
  padding: 14.4px 16px;
  border-radius: 22.5px;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.btn--primary:hover { filter: brightness(1.12); transform: translateY(-1px); }

.ghost-link {
  font-size: var(--text-nav-label);
  font-weight: 400;
  color: var(--color-bone-white);
  border-bottom: 1px solid var(--color-ash-gray);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ghost-link:hover { color: var(--color-saffron-spark); border-color: var(--color-saffron-spark); }
.ghost-link--muted { color: var(--color-ash-gray); border-bottom: none; }
.ghost-link--muted:hover { color: var(--color-bone-white); }

/* ============ nav ============ */
.nav {
  position: relative;
  z-index: 2;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--spacing-36);
  display: flex;
  align-items: center;
  gap: var(--spacing-36);
  padding-block: var(--spacing-24);
}

.nav__logo { display: flex; align-items: center; gap: var(--spacing-12); }
.nav__mark { width: 28px; height: 28px; }
.nav__wordmark { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }

/* the brand word always carries the logo colors: violet to amber on "AI" */
.nav__wordmark em, .brand em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-electric-iris), var(--color-saffron-spark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand em { font-weight: 400; }

.nav__links {
  display: flex;
  gap: var(--spacing-30);
  margin-left: auto;
}
.nav__links a {
  font-size: var(--text-nav-label);
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--color-ash-gray);
  transition: color 0.2s ease;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--color-bone-white); }

/* ============ chapters ============ */
/* Each chapter is a tall scroll beat; the fixed particle field supplies
   the visual, so copy takes one column and the rest stays open. */
.chapter {
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  column-gap: var(--spacing-24);
  padding-block: var(--spacing-60);
}

.chapter__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-24);
}
.chapter__copy--left  { grid-column: 1 / 7; }
.chapter__copy--right { grid-column: 8 / 13; }

.ch-hero { min-height: calc(100vh - 91px); }
.ch-remember { min-height: 130vh; }
.ch-hive { min-height: 140vh; }

/* ============ manifesto ============ */
.ch-manifesto {
  display: block;
  min-height: auto;
  padding-block: 14vh 18vh;
  text-align: center;
}
.manifesto-line {
  max-width: 820px;
  margin-inline: auto;
  font-size: clamp(28px, 3.3vw, var(--text-heading-sm));
  font-weight: 400;
  line-height: var(--leading-heading-sm);
  letter-spacing: -0.04em;
  color: var(--color-bone-white);
}
.manifesto-line + .manifesto-line { margin-top: 16vh; }
.manifesto-line:nth-child(3) { color: var(--color-saffron-spark); }

/* ============ inline example ============ */
.example {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
}
.example__line {
  font-size: 15px;
  font-weight: 200;
  line-height: var(--leading-body);
  color: var(--color-silver-mist);
  max-width: 440px;
}
.example__time {
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-saffron-spark);
  margin-right: var(--spacing-12);
}

/* ============ connectors ============ */
.ch-connectors { min-height: 120vh; }

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
}
.step { display: flex; gap: var(--spacing-18); align-items: baseline; }
.step__num {
  font-size: var(--text-nav-label);
  font-weight: 600;
  letter-spacing: var(--tracking-nav-label);
  color: var(--color-saffron-spark);
}
.step .body-copy { max-width: 440px; }

.how-block, .connectors-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-24);
}
.connectors-block { margin-top: var(--spacing-60); }

.heading-2xs {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.connectors-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-18) var(--spacing-36);
  max-width: 560px;
}
.connectors-grid li { display: flex; flex-direction: column; gap: 2px; }
.connector__name {
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-bone-white);
}
.connector__desc {
  font-size: 15px;
  font-weight: 200;
  color: var(--color-silver-mist);
}

/* ============ team (scattered entries, heading right) ============ */
.ch-team { min-height: 110vh; }

.team-scatter {
  grid-column: 1 / 8;
  position: relative;
  min-height: 62vh;
}

.team-entry {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--spacing-24);
}
.team-entry--laurens { top: 10%; left: 2%; }
.team-entry--chris   { top: 56%; left: 34%; }

/* The glyph boxes only reserve space — the particle field forms the
   hexagons in that spot when the team section scrolls into view. */
.team-entry__glyph { width: 108px; height: 108px; flex: none; visibility: hidden; }

.team-entry__name {
  font-size: clamp(34px, 3.4vw, var(--text-heading-sm));
  font-weight: 400;
  line-height: var(--leading-heading-sm);
  letter-spacing: -0.04em;
}
.team-entry__role {
  margin-top: var(--spacing-6);
  font-size: var(--text-nav-label);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ash-gray);
}

.team-heading {
  grid-column: 8 / 13;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-24);
}

/* ============ cta ============ */
.ch-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--spacing-30);
  min-height: 130vh;
  /* keep the content block above the plume bloom at the section's base */
  padding-bottom: 34vh;
}

/* ============ swarm tease + story mode ============ */
.swarm-tease {
  position: absolute;
  top: 78%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--spacing-12);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-nav-label);
  font-weight: 600;
  letter-spacing: var(--tracking-nav-label);
  text-transform: uppercase;
  color: var(--color-saffron-spark);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.swarm-tease:hover { opacity: 1; }
.swarm-tease__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-saffron-spark);
  animation: teasePulse 2s ease-in-out infinite;
}
@keyframes teasePulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.8); opacity: 1; }
}

/* while the story plays, the site recedes so the field owns the stage */
main, .nav, .footer { transition: opacity 0.6s ease; }
body.story-active main,
body.story-active .nav,
body.story-active .footer {
  opacity: 0.05;
  pointer-events: none;
}

.story-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.story-caption {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 86vw);
  text-align: center;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-bone-white);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.story-caption.visible { opacity: 1; }
.story-skip {
  position: absolute;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-ash-gray);
  padding: 0 0 2px;
  cursor: pointer;
  font-family: var(--font-sans);
}

.story-panel {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-24);
  text-align: center;
  padding-inline: var(--spacing-36);
  background: rgba(0, 0, 0, 0.6);
}
.story-panel .body-copy { max-width: 440px; }
.story-panel .story-close {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
}
.story-panel .story-close:hover { color: var(--color-bone-white); }

@media (prefers-reduced-motion: reduce) {
  .swarm-tease__dot { animation: none; }
  .story-caption { transition: none; }
  main, .nav, .footer { transition: none; }
}
.cta__copy { max-width: 480px; }

.access-form {
  display: flex;
  align-items: center;
  gap: var(--spacing-18);
}
.access-form__input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-ash-gray);
  color: var(--color-bone-white);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 200;
  padding: var(--spacing-6) var(--spacing-6) var(--spacing-6) 0;
  min-width: 260px;
  outline: none;
  transition: border-color 0.2s ease;
}
.access-form__input::placeholder { color: var(--color-ash-gray); }
.access-form__input:focus { border-color: var(--color-saffron-spark); }
.access-form .btn--primary { border: none; cursor: pointer; font-family: var(--font-sans); }

/* ============ footer ============ */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-36);
  padding-block: var(--spacing-60);
}
.footer__brand { display: flex; align-items: center; gap: var(--spacing-12); }
.footer__links { display: flex; gap: var(--spacing-24); margin-left: auto; }
.footer__fine {
  font-size: var(--text-caption);
  font-weight: 200;
  color: var(--color-ash-gray);
  flex-basis: 100%;
}

/* ============ responsive ============ */
@media (max-width: 900px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter__copy--left, .chapter__copy--right { grid-column: 1 / -1; }
  .ch-hero { align-content: end; padding-bottom: var(--spacing-96); }
  .team-scatter { grid-column: 1 / -1; min-height: 0; }
  .team-entry { position: static; }
  .team-entry + .team-entry { margin-top: var(--spacing-30); }
  .team-heading { grid-column: 1 / -1; margin-top: var(--spacing-60); }
  .access-form { flex-wrap: wrap; }
  .nav__links { display: none; }
  .manifesto-line + .manifesto-line { margin-top: 30vh; }
}
