/* ============================================================
   GLB Group — bright, white-space-first design system
   Tokens synthesized from Linear / Mercury / Amplemarket /
   Air / Wispr Flow via styles.refero.design
   ============================================================ */

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --ink: #12151c;
  --ink-2: #4a5265;
  --ink-3: #6d7488; /* darkened from #8a91a3 for WCAG AA small-text contrast on --bg */
  --accent: #2f5bff;
  --accent-deep: #1e3fd8;
  --accent-soft: #e8eeff;
  --border: #e6e9f0;
  --border-strong: #d3d8e4;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Sora", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-card: 0 1px 2px rgba(18, 21, 28, 0.04), 0 8px 24px rgba(18, 21, 28, 0.06);
  --shadow-elevated: 0 1px 1px rgba(18, 21, 28, 0.03), 0 6px 12px -3px rgba(18, 21, 28, 0.06), 0 24px 60px -12px rgba(18, 21, 28, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

em { font-style: normal; color: var(--accent); }

.grad {
  background: linear-gradient(90deg, #2f5bff, #8aa4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.mono { font-family: var(--font-mono); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ NAV — floating pill ============ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(1080px, calc(100vw - 32px));
  height: 60px;
  padding: 0 10px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(18, 21, 28, 0.06);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.logo span { color: var(--accent); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 150ms var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.btn-nav { padding: 10px 20px; font-size: 14px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: background 150ms var(--ease), border-color 150ms var(--ease),
              color 150ms var(--ease), transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-lg { padding: 16px 34px; font-size: 16px; }

/* ============ EYEBROWS / SECTION HEADS ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.section-head { margin-bottom: 48px; }
.section-head .eyebrow { color: var(--ink-2); }
.hairline {
  border: none;
  border-top: 1px solid var(--border);
  margin-top: 14px;
}

/* ============ STAGE (hero + morph) ============ */
.stage-wrap {
  height: 560vh;               /* scroll runway for the morph */
  position: relative;
}
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: transparent;
  z-index: 2;
}
.stage-bleed {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 85% -20%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.stage-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(50% 60% at 68% 50%, rgba(0,0,0,0.5), transparent 75%);
  mask-image: radial-gradient(50% 60% at 68% 50%, rgba(0,0,0,0.5), transparent 75%);
  pointer-events: none;
}

/* -- the persistent morph background, fixed behind the whole page -- */
#morph {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
/* keeps the copy readable over the video */
.stage-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(251, 251, 253, 0.88) 28%, rgba(251, 251, 253, 0) 58%);
  pointer-events: none;
}
.morph-status {
  position: fixed;
  z-index: 60;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fb96a;
  transition: background 250ms var(--ease);
}
.status-text { font-weight: 500; color: var(--ink); }
.status-pct { color: var(--ink-3); }

/* -- slides: copy that fades through the morph -- */
.slide {
  position: absolute;
  top: 50%;
  left: max(32px, calc((100vw - 1200px) / 2 + 32px));
  transform: translateY(-50%);
  width: min(460px, 38vw);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.slide h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 20px 0 22px;
}
.slide h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-weight: 600;
  margin: 16px 0 16px;
}
.slide p { color: var(--ink-2); font-size: 16px; }
.slide .lede { font-size: 18px; line-height: 1.65; }
.slide .btn { margin-top: 26px; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 650ms var(--ease);
}
.scroll-line {
  width: 1.5px;
  height: 40px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  animation: scrollPulse 1.8s var(--ease) infinite;
}
@keyframes scrollPulse {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ============ SECTIONS ============ */
/* translucent so the morphing figure ghosts through behind the content */
.section { padding: 128px 0; position: relative; z-index: 2; background: rgba(251, 251, 253, 0.86); }
.section-tint { background: rgba(243, 245, 249, 0.88); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.8vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 20px;
}
.section-sub {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.65;
  max-width: 560px;
}

/* cards — 1px border by default, shadow earned on hover */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), border-color 150ms var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-strong);
}
.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.card-icon svg { width: 30px; height: 30px; }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-size: 28px;
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
}
.card p { color: var(--ink-2); font-size: 16px; margin-bottom: 22px; }
.card-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* numbers */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.number-value, .number-suffix {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 4.2vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.number-suffix { color: var(--accent); }
.number p { color: var(--ink-2); margin-top: 8px; font-size: 14px; }

/* ethos */
.ethos-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}
.ethos-copy p { color: var(--ink-2); margin-bottom: 18px; max-width: 520px; font-size: 16px; }
.ethos-list { list-style: none; margin-top: 32px; }
.ethos-list li {
  padding: 16px 0 16px 30px;
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  position: relative;
  font-size: 15px;
}
.ethos-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 25px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.ethos-list strong { color: var(--ink); }

/* twin portraits — the Higgsfield pair */
.ethos-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 420px;
}
.twin {
  position: absolute;
  width: 62%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: var(--surface);
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), z-index 0s;
}
.twin img { display: block; width: 100%; height: auto; }
.twin figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.twin-human { top: 0; left: 0; transform: rotate(-3deg); z-index: 1; }
.twin-android { bottom: 0; right: 0; transform: rotate(3deg); z-index: 2; }
.twin:hover { transform: rotate(0deg) scale(1.03); box-shadow: var(--shadow-elevated); z-index: 3; }

/* contact */
.section-contact {
  background:
    radial-gradient(55% 60% at 50% 115%, var(--accent-soft) 0%, transparent 65%),
    rgba(251, 251, 253, 0.82);
  text-align: center;
  padding: 170px 0;
}
.contact-inner .eyebrow { justify-content: center; }
.contact-inner .section-sub { margin: 0 auto; }
.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 44px;
  flex-wrap: wrap;
}

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--surface);
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer p { color: var(--ink-3); font-size: 14px; }
.footer-links { display: flex; gap: 26px; }
.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  transition: color 150ms var(--ease);
}
.footer-links a:hover { color: var(--ink); }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-social svg { width: 15px; height: 15px; }

/* ============ REVEALS ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
/* 80ms sibling stagger */
.cards .card:nth-child(2), .numbers-grid .number:nth-child(2) { transition-delay: 80ms; }
.cards .card:nth-child(3), .numbers-grid .number:nth-child(3) { transition-delay: 160ms; }
.numbers-grid .number:nth-child(4) { transition-delay: 240ms; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .nav { padding: 0 8px 0 20px; }
  .nav-links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .ethos-grid { grid-template-columns: 1fr; gap: 56px; }
  .ethos-visual { min-height: 380px; }
  .twin { width: 58%; }
  .stage-wrap { height: 520vh; }

  /* face fills the top, copy anchored below on small screens */
  .stage-scrim {
    background: linear-gradient(0deg, var(--bg) 6%, rgba(251, 251, 253, 0.85) 32%, rgba(251, 251, 253, 0) 62%);
  }
  .morph-status {
    right: 16px;
    bottom: auto;
    top: 88px;
  }
  .slide {
    left: 24px;
    right: 24px;
    top: auto;
    bottom: max(28px, 4vh);
    bottom: max(28px, 4svh);
    transform: none;
    width: auto;
    text-align: center;
  }
  .slide h1 { font-size: clamp(2.1rem, 9vw, 3rem); margin: 12px 0 14px; }
  .slide h2 { font-size: clamp(1.5rem, 6.4vw, 2.1rem); margin: 10px 0 10px; }
  .slide h2 br { display: none; }
  .slide p { font-size: 14.5px; }
  .slide .lede { font-size: 15px; line-height: 1.55; }
  .slide .btn { margin-top: 14px; }
  .hero-actions { justify-content: center; margin-top: 20px; }
  .eyebrow { justify-content: center; }
  .eyebrow .dot { display: none; }
  .scroll-hint { display: none; }
  .stage-grid { -webkit-mask-image: radial-gradient(60% 40% at 50% 32%, rgba(0,0,0,0.5), transparent 75%); mask-image: radial-gradient(60% 40% at 50% 32%, rgba(0,0,0,0.5), transparent 75%); }
  .stage-bleed { background: radial-gradient(80% 45% at 50% -15%, var(--accent-soft) 0%, transparent 60%); }
  .section { padding: 96px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .scroll-line::after { animation: none; }
  .btn, .card, .twin { transition: none; }
}
