/* ─── EMOTIONS RESEARCH // SHARED DESIGN SYSTEM ─────────────── */

/* TOKENS */
:root {
  --bg:       #0B0B0D;
  --bg-panel: #121217;
  --line:     #23232B;
  --ink:      #F2F2EC;
  --muted:    #8B8B94;
  --amber:    #FFA51E;
  --blue:     #37C9FF;
  --sodium:   #FFCE6B;
  --maxw:     1240px;
  --nav-h:    60px;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  min-height: 100vh;
}

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

img, svg { display: block; }

/* FOCUS */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* CANVAS LAYER — fixed behind all page content */
.signal-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* CONTENT ABOVE CANVAS */
main {
  position: relative;
  z-index: 1;
}

/* ─── NAV ────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: var(--nav-h);
  gap: 32px;
}

.nav__brand {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__brand span {
  color: var(--amber);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.70rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav__links a:hover {
  color: var(--ink);
  border-bottom-color: var(--blue);
}

.nav__links a[aria-current="page"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.foot__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.foot__mark {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 0.80rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.foot__meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot__links {
  gap: 24px;
  justify-content: flex-start;
}

.foot__links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.foot__links a:hover { color: var(--ink); }

.foot__fine {
  justify-content: flex-start;
  gap: 32px;
}

.foot__fine span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--line);
}

/* ─── UTILITIES ──────────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 40px;
}

/* Mono eyebrow label with leading hairline tick */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  background: var(--muted);
  flex-shrink: 0;
}

/* Dark elevated panel */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: 40px;
}

/* Square CTA button */
.btn {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 16px 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn--amber {
  border-color: var(--amber);
  color: var(--amber);
}

.btn--amber:hover {
  background: var(--amber);
  color: var(--bg);
}

/* Accent color helpers */
.accent-amber  { color: var(--amber);  }
.accent-blue   { color: var(--blue);   }
.accent-sodium { color: var(--sodium); }

/* ─── REVEAL SYSTEM ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Boot log mono type-in area */
[data-boot] {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.06em;
  white-space: pre;
  margin-bottom: 36px;
  min-height: 5em;
  line-height: 1.55;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav   { padding: 0 24px; }
  .wrap  { padding-inline: 24px; }
  .foot  { padding: 32px 24px; }
  .panel { padding: 32px 24px; }
}

@media (max-width: 560px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 20px;
    gap: 10px;
  }

  .nav__links {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    width: 100%;
    gap: 20px;
    flex-shrink: 0;
  }

  .nav__links::-webkit-scrollbar { display: none; }

  .foot { padding: 28px 20px; }
  .wrap { padding-inline: 20px; }
  .panel { padding: 24px 16px; }

  .foot__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .foot__fine { gap: 16px; }
}

/* ─── REDUCED MOTION ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .nav__links a,
  .foot__links a {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOME
   ═══════════════════════════════════════════════════════════════ */

.hero {
  padding: 128px 0 96px;
}

.hero h1 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 40px;
  max-width: 15ch;
  overflow-wrap: break-word;
}

.hero__sub {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 48px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* MANIFESTO */
.manifesto {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.manifesto__body p {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.05rem);
  color: var(--muted);
  line-height: 1.75;
  max-width: 62ch;
}

.manifesto__body p + p { margin-top: 24px; }

/* RESEARCH GRID */
.research {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.research__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}

.research__card {
  padding: 40px 32px;
  background: var(--bg-panel);
  border: none;
  border-right: 1px solid var(--line);
}

.research__card:last-child { border-right: none; }

.research__card .eyebrow { margin-bottom: 16px; }

.research__card h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}

.research__card p {
  font-family: 'Archivo', sans-serif;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.65;
}

/* FLAGSHIP */
.flagship {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.flagship__panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.flagship__label { margin-bottom: 0; }

.flagship__name {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 9vw, 8rem);
  letter-spacing: -0.03em;
  line-height: 0.88;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.flagship__body {
  font-family: 'Archivo', sans-serif;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 54ch;
}

.flagship__teaser {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.80rem;
  color: var(--blue);
  letter-spacing: 0.05em;
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: var(--bg);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.flagship__note {
  font-size: 0.62rem;
  opacity: 0.5;
  margin-bottom: 0;
}

/* HOME RESPONSIVE */
@media (max-width: 900px) {
  .hero { padding: 80px 0 64px; }

  .research__grid { grid-template-columns: 1fr; }

  .research__card {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .research__card:last-child { border-bottom: none; }

  .manifesto,
  .research,
  .flagship { padding: 72px 0; }
}

@media (max-width: 560px) {
  .hero { padding: 56px 0 48px; }

  .hero h1 { font-size: clamp(2.6rem, 14vw, 4.5rem); }

  .manifesto,
  .research,
  .flagship { padding: 56px 0; }

  .flagship__panel { gap: 20px; }
}
