/* ============ AiD Design — base system ============
   Duality: warm = human (ember/amber) · cool = machine (periwinkle/ice)
   Base stays black & white; hues appear only as atmosphere and accents. */

:root {
  --ink: #0d0c0b;
  --ink-soft: #55524e;
  --paper: #ffffff;
  --paper-warm: #faf8f5;
  --line: #e9e6e1;
  --warm: #c05b2e;
  --warm-soft: #e8a87c;
  --warm-deep: #9a4522; /* text-safe ember — 6.4:1 on paper; --warm is only 4.4:1 */
  --cool: #6d7cbe;
  --cool-soft: #aab8e8;
  --radius-l: 28px;
  --radius-m: 18px;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --pad-x: clamp(20px, 6vw, 96px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--cool-soft); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
:focus-visible { outline: 2px solid var(--cool); outline-offset: 3px; border-radius: 4px; }

/* Announced by screen readers, invisible on screen. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.eyebrow-center { text-align: center; }
.eyebrow-light { color: rgba(255,255,255,0.65); }
.section-title {
  font-size: clamp(34px, 4.6vw, 58px);
  margin-bottom: clamp(28px, 4vw, 56px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.22,.68,0,1.1), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { transform: translateY(-2px); background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn-big { padding: 18px 40px; font-size: 17px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--pad-x);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-logo { color: var(--ink); }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { position: relative; padding: 6px 0; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--warm-soft), var(--cool-soft));
  transition: right 0.3s cubic-bezier(.22,.68,0,1);
}
.nav-links a:hover::after { right: 0; }
.nav-cta { padding: 11px 22px; }

/* ---------- Hero lockup: small mark, typed thesis ---------- */
.hero-brand { display: flex; justify-content: center; color: var(--ink); margin-bottom: clamp(22px, 3.5vw, 40px); }
.hero-headline {
  font-size: clamp(34px, 5.4vw, 76px);
  font-weight: 550;
  letter-spacing: -0.028em;
  line-height: 1.06;
  margin: 0 auto;
  min-height: 2.12em; /* reserve both lines so typing doesn't reflow the page */
}
.type-caret {
  display: inline-block;
  width: 0.09em;
  height: 0.92em;
  margin-left: 0.06em;
  background: var(--warm);
  vertical-align: -0.08em;
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* Each typed character is its own cell so it can be lit on arrival and
   dissolved on the way out. inline-block is needed for transform; spaces stay
   as plain text nodes so the line still wraps normally. */
/* A word is one unbreakable unit, so the line can only turn at a real space.
   Without this, inline-block characters let the browser break mid-word. */
.hero-headline .wd { display: inline-block; white-space: nowrap; }
.hero-headline .ch {
  display: inline-block;
  white-space: pre;
  color: var(--ink);
  transition: color 620ms cubic-bezier(.22,.68,0,1),
              opacity 240ms ease,
              transform 240ms cubic-bezier(.4,0,1,1),
              filter 240ms ease;
}
/* the run: a letter lands hot, then cools to ink, so a short burning tail
   follows the caret rather than a single coloured letter */
.hero-headline .ch.lit {
  color: var(--cool);
  transition: color 90ms linear;
}
/* the wipe: lift, blur and go */
.hero-headline .ch.out {
  opacity: 0;
  transform: translateY(-0.34em) scale(0.86);
  filter: blur(3px);
}
@media (prefers-reduced-motion: reduce) {
  .hero-headline .ch { transition: none; }
}

/* ---------- Cursor particle field ---------- */
#cursor-aura {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  #cursor-aura { display: none; }
}

/* ---------- Footer ---------- */
.footer { padding: clamp(56px, 8vw, 110px) var(--pad-x) 32px; border-top: 1px solid var(--scroll-line, var(--line)); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  margin-bottom: clamp(48px, 7vw, 90px);
}
.footer-tag { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; line-height: 1.25; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-soft); }
.footer-col h4 { font-family: var(--font-body); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.footer-col a:hover { color: var(--ink); }
.footer-word {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(64px, 13.5vw, 220px);
  letter-spacing: -0.045em;
  line-height: 0.9;
  white-space: nowrap;
  text-align: center;
  background: linear-gradient(100deg, var(--ink) 55%, #3c3a37 78%, var(--ink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.footer-ack {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.footer-copy { margin-top: 16px; }

/* Industry index in the footer. Lives here rather than project.css because
   every page carries the footer, and the home page does not load project.css. */
.footer-industries {
  max-width: 940px;
  margin: 0 auto clamp(32px, 4.2vw, 54px);
  padding-bottom: clamp(28px, 3.4vw, 40px);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
  font-size: 14px;
}
.fi-label {
  flex: 0 0 100%;
  text-align: center;
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.footer-industries a {
  color: var(--ink-soft);
  transition: color 0.25s;
}
.footer-industries a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .footer-industries { gap: 14px 0; }
  .footer-industries a { flex: 0 0 50%; text-align: center; }
}

/* ---------- Menu toggle (mobile only) ---------- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.1), background 0.18s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { transform: translateY(-5.5px); }
.nav-toggle span::after { transform: translateY(5.5px); }
.nav[data-menu="open"] .nav-toggle span { background: transparent; }
.nav[data-menu="open"] .nav-toggle span::before { transform: rotate(45deg); }
.nav[data-menu="open"] .nav-toggle span::after { transform: rotate(-45deg); }

@media (max-width: 760px) {
  .nav { justify-content: flex-start; gap: 12px; }
  .nav-cta { margin-left: auto; }
  .nav-toggle { display: inline-flex; }

  /* The links become a panel under the header rather than disappearing. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 6px var(--pad-x) 18px;
    background: var(--paper); /* opaque — display type behind stays legible through blur */
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px -28px rgba(13, 12, 11, 0.4);
    font-size: 19px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.24s, transform 0.28s cubic-bezier(.22,.68,0,1.1), visibility 0.24s;
  }
  .nav[data-menu="open"] .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .nav-links a { padding: 14px 0; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a::after { display: none; } /* the hover underline is a pointer affordance */

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-tag { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
