/* The 4am Club — base styles */
:root {
  --bg: #0a0a0a;
  --bg-1: #0f0f0f;
  --bg-2: #141414;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --ink: #e8e4d8;
  --ink-2: #c8c3b6;
  --mute: #8a8578;
  --mute-2: #5e5a52;
  --accent: #d4a853;     /* amber */
  --accent-soft: #d4a85322;
  --warn: #c4704a;
  --serif: "Newsreader", "Times New Roman", serif;
  --sans:  "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain + vignette overlays */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1000;
  background:
    radial-gradient(1200px 800px at 50% -10%, #1a160e22, transparent 60%),
    radial-gradient(1200px 900px at 100% 110%, #0a0a0a 0%, transparent 50%);
  mix-blend-mode: screen;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1001;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--accent); color: #0a0a0a; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.01em; }
.serif { font-family: var(--serif); font-weight: 300; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}

/* layout */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.divider { height: 1px; background: var(--line); width: 100%; }
.section { position: relative; padding: 120px 0; border-top: 1px solid var(--line); }
.section-head {
  display: grid; grid-template-columns: 200px 1fr 1fr; gap: 48px;
  margin-bottom: 64px; align-items: baseline;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 0; color: var(--ink);
}
.section-head h2 em { font-style: italic; color: var(--ink-2); }
.section-head .lede { color: var(--mute); max-width: 36ch; font-size: 15px; }

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
  .container { padding: 0 20px; }
}

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,10,10,0.55);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(10,10,10,0.78); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; max-width: 1280px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
}
.nav-logo .glyph {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--accent);
  position: relative; display: inline-block;
}
.nav-logo .glyph::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 270deg, var(--accent) 0deg, var(--accent) 60deg, transparent 60deg);
  opacity: .9;
  mask: radial-gradient(circle, transparent 35%, #000 36%);
  -webkit-mask: radial-gradient(circle, transparent 35%, #000 36%);
}
.nav-links {
  display: flex; gap: 28px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  letter-spacing: 0.02em;
}
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--line-2); padding: 9px 14px;
  border-radius: 999px; transition: all .25s ease;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.nav-cta .arrow { transition: transform .25s ease; }
.nav-cta:hover .arrow { transform: translateX(3px); }

@media (max-width: 760px) { .nav-links { display: none; } .nav-inner { padding: 14px 20px; } }

/* clock chip used in nav */
.clock-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--mute);
  padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 999px;
}
.clock-chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.clock-chip.is-4am .dot { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }

/* reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: all .25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent); color: #0a0a0a;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent; color: var(--accent);
  box-shadow: 0 0 32px -8px var(--accent);
}
.btn-ghost {
  border-color: var(--line-2); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink-2); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* tweaks panel */
.tweaks {
  position: fixed; right: 24px; bottom: 24px; z-index: 200;
  width: 280px;
  background: rgba(15,15,15,.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px;
  font-family: var(--mono); font-size: 12px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,.6);
}
.tweaks h4 {
  margin: 0 0 12px; font-size: 11px; color: var(--mute);
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500;
}
.tweaks .row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tweaks .row:last-child { margin-bottom: 0; }
.tweaks label { color: var(--ink-2); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.tweaks .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks .opt {
  padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--ink-2); cursor: pointer; transition: all .2s ease;
  font-size: 11px;
}
.tweaks .opt:hover { border-color: var(--ink-2); color: var(--ink); }
.tweaks .opt.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }


/* ========== HERO A: TERMINAL ========== */
.hero { position: relative; overflow: hidden; }
.hero-a {
  min-height: 100vh; padding: 140px 0 80px;
  background:
    radial-gradient(900px 600px at 85% 20%, #1a160e, transparent 60%),
    radial-gradient(700px 500px at 10% 80%, #0f1618, transparent 60%),
    #0a0a0a;
}
.hero-a__grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px;
  align-items: center; min-height: calc(100vh - 220px);
  position: relative; z-index: 2;
}
.hero-a__left { display: flex; flex-direction: column; gap: 28px; }
.hero-a__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(56px, 7vw, 108px); line-height: 0.98;
  letter-spacing: -0.035em; margin: 8px 0 0; color: var(--ink);
}
.hero-a__title em {
  font-style: italic; color: var(--accent); font-weight: 300;
  position: relative;
}
.hero-a__title em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--accent); opacity: 0.3;
}
.hero-a__lede {
  font-family: var(--sans); color: var(--ink-2); max-width: 44ch;
  font-size: 17px; line-height: 1.6; margin: 0;
}
.hero-a__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-a__meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--line-2);
}
.hero-a__meta > div { display: flex; flex-direction: column; gap: 6px; }
.meta-k { font-size: 10px; color: var(--mute); letter-spacing: 0.14em; text-transform: uppercase; }
.meta-v { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); animation: pulse 1.8s ease-in-out infinite;
}

/* Terminal component */
.hero-term {
  background: #0c0c0c;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), 0 0 0 1px var(--line) inset;
  font-family: var(--mono);
}
.hero-term__chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: #0a0a0a;
}
.hero-term__chrome .tl {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.tl-r { background: #3a2a2a; }
.tl-y { background: #3a332a; }
.tl-g { background: #2a3a2a; }
.hero-term__title {
  font-size: 11px; color: var(--mute); margin-left: 12px;
  letter-spacing: 0.04em;
}
.hero-term__body {
  padding: 20px 22px;
  font-size: 13px;
  line-height: 1.8;
  min-height: 360px;
  max-height: 460px;
  overflow: hidden;
}
.term-line { white-space: pre-wrap; }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

@media (max-width: 980px) {
  .hero-a__grid { grid-template-columns: 1fr; gap: 48px; min-height: auto; }
  .hero-a__meta { grid-template-columns: 1fr 1fr; }
}

/* ========== HERO B: CONSTELLATION ========== */
.hero-b {
  min-height: 100vh; display: flex; align-items: center;
  padding: 140px 0 80px; position: relative;
  background: radial-gradient(1000px 700px at 50% 40%, #141006, #0a0a0a 60%);
}
.hero-b__clock-ring {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.hero-b__ring {
  width: min(90vh, 900px); height: min(90vh, 900px);
  opacity: 0.8;
  animation: slow-rotate 180s linear infinite;
}
@keyframes slow-rotate { to { transform: rotate(360deg); } }
.hero-b__content {
  position: relative; z-index: 3; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.hero-b__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(58px, 8.2vw, 132px); line-height: 0.98;
  letter-spacing: -0.035em; margin: 12px 0 4px;
  max-width: 16ch;
}
.hero-b__title em { font-style: italic; color: var(--accent); }
.hero-b__lede {
  max-width: 52ch; color: var(--ink-2); font-size: 17px; line-height: 1.65;
  margin: 0;
}
.hero-b__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.hero-b__badges {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
  font-size: 11px; color: var(--mute); margin-top: 32px;
  letter-spacing: 0.16em;
}

/* ========== HERO C: TIMECARD ========== */
.hero-c { min-height: 100vh; padding: 100px 0 40px; background: #0a0a0a; }
.hero-c__grid {
  display: grid; grid-template-columns: 340px 1fr; gap: 64px;
  min-height: calc(100vh - 140px); align-items: stretch;
  padding-top: 60px;
}
.hero-c__rail {
  border-right: 1px solid var(--line);
  padding-right: 48px;
  display: flex; flex-direction: column; gap: 28px;
}
.rail-k { font-size: 10px; color: var(--mute); letter-spacing: 0.2em; text-transform: uppercase; }
.rail-clock {
  display: flex; align-items: baseline; gap: 4px;
  font-size: 140px; font-family: var(--serif); font-weight: 300;
  line-height: 0.9; color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.rail-clock .colon { color: var(--ink-2); animation: pulse 1.4s ease-in-out infinite; }
.rail-sub { font-size: 11px; color: var(--mute); letter-spacing: 0.2em; }
.rail-log {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 11px;
  border-top: 1px dashed var(--line-2);
  padding-top: 20px;
}
.rail-log__row { display: grid; grid-template-columns: 42px 60px 1fr; gap: 10px; }
.rail-log__t { color: var(--accent); }
.rail-log__w { color: var(--ink-2); }
.rail-log__m { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero-c__main {
  display: flex; flex-direction: column; gap: 22px;
  justify-content: center;
}
.hero-c__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(56px, 7.2vw, 120px); line-height: 0.98;
  letter-spacing: -0.035em; margin: 8px 0 0;
}
.hero-c__title em { font-style: italic; color: var(--accent); }
.hero-c__lede { color: var(--ink-2); font-size: 17px; max-width: 44ch; margin: 0; }
.hero-c__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-c__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 40px 0 0; padding: 28px 0 0;
  border-top: 1px dashed var(--line-2);
}
.hero-c__stats > div { display: flex; flex-direction: column; gap: 4px; }
.hero-c__stats dt {
  font-family: var(--serif); font-weight: 300;
  font-size: 44px; line-height: 1; letter-spacing: -0.03em; color: var(--ink);
  margin: 0;
}
.hero-c__stats dd {
  margin: 0; font-family: var(--mono); font-size: 10px; color: var(--mute);
  letter-spacing: 0.14em; text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero-c__grid { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .hero-c__rail { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 32px; }
  .rail-clock { font-size: 100px; }
  .hero-c__stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ========== SERVICES ========== */
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.svc-card {
  background: var(--bg-1);
  padding: 40px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 280px;
  transition: background .3s ease;
  position: relative;
}
.svc-card:hover { background: #131313; }
.svc-card__top {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.svc-code {
  font-size: 10px; color: var(--mute); letter-spacing: 0.2em;
}
.svc-plus {
  color: var(--accent); font-size: 22px; font-weight: 300;
  transition: transform .3s ease;
}
.svc-card:hover .svc-plus { transform: rotate(45deg); }
.svc-title {
  font-size: 32px; font-weight: 300; line-height: 1.1;
  letter-spacing: -0.02em; margin: 0; color: var(--ink);
}
.svc-body { color: var(--ink-2); font-size: 15px; margin: 0; max-width: 44ch; }
.svc-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }
.svc-tag {
  font-size: 10px; letter-spacing: 0.12em;
  padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 4px;
  color: var(--mute); text-transform: uppercase;
}

@media (max-width: 820px) { .services-grid { grid-template-columns: 1fr; } }

/* ========== WORK ========== */
.work-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.work-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  cursor: none;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s ease;
}
.work-card:hover { border-color: var(--accent-soft); transform: translateY(-4px); }
.work-card__cursor {
  position: absolute; z-index: 5;
  transform: translate(-50%, -50%);
  padding: 10px 16px; border-radius: 999px; background: var(--accent); color: #0a0a0a;
  font-size: 11px; letter-spacing: 0.14em;
  display: inline-flex; align-items: center; gap: 8px;
  pointer-events: none; font-family: var(--mono);
  box-shadow: 0 12px 30px -6px rgba(212,168,83,.5);
}
.work-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; z-index: 2; }
.work-card__meta { display: flex; gap: 16px; font-size: 10px; color: var(--mute); letter-spacing: 0.14em; }
.work-card__metric { font-size: 11px; letter-spacing: 0.1em; color: var(--accent); }
.work-card__vis {
  position: absolute; inset: 0;
  opacity: 0.55; z-index: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.work-card:hover .work-card__vis { opacity: 0.9; }
.work-card__bottom {
  margin-top: auto; display: flex; flex-direction: column; gap: 10px;
  z-index: 2; position: relative;
}
.work-card__client {
  font-size: 10px; letter-spacing: 0.2em; color: var(--mute);
}
.work-card__title {
  font-size: 30px; font-weight: 300; line-height: 1.1; letter-spacing: -0.02em;
  margin: 0; color: var(--ink); max-width: 20ch;
}
.work-card__stack { display: flex; gap: 10px; flex-wrap: wrap; }
.work-card__stack span {
  font-size: 10px; letter-spacing: 0.12em; color: var(--mute-2);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px;
}

@media (max-width: 820px) { .work-grid { grid-template-columns: 1fr; } .work-card { aspect-ratio: auto; min-height: 380px; } }

/* ========== CLIENTS ========== */
.section--tight { padding: 80px 0; }
.clients-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.clients-count { font-size: 11px; color: var(--mute); letter-spacing: 0.16em; }
.clients-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.client-cell {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 28px 24px;
  font-size: 22px; font-weight: 300; letter-spacing: -0.01em;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
  transition: color .3s ease;
}
.client-cell:hover { color: var(--ink); }
.client-cell:hover::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); animation: underline-in .4s ease forwards;
}
@keyframes underline-in { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.client-cell:nth-child(4n) { border-right: 0; }
.client-index {
  font-size: 10px; color: var(--mute); letter-spacing: 0.16em;
}
@media (max-width: 820px) {
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .client-cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .client-cell:nth-child(2n) { border-right: 0; }
}

/* ========== PROCESS ========== */
.proc-grid { display: grid; grid-template-columns: 320px 1fr; gap: 64px; }
.proc-rail { position: relative; }
.proc-rail__inner {
  position: sticky; top: 120px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  background: #0d0d0d;
  display: flex; flex-direction: column; gap: 14px;
}
.proc-rail__label { font-size: 10px; color: var(--mute); letter-spacing: 0.2em; }
.proc-rail__time {
  font-size: 84px; line-height: 0.9; font-family: var(--serif); font-weight: 300;
  color: var(--accent); letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  display: flex; gap: 2px; align-items: baseline;
}
.proc-rail__time .colon { color: var(--ink-2); animation: pulse 1.4s ease-in-out infinite; }
.proc-rail__k {
  font-size: 11px; color: var(--ink-2); letter-spacing: 0.2em;
  padding-top: 8px;
}
.proc-rail__dots { display: flex; gap: 8px; margin-top: 8px; }
.dot-i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background .3s ease, transform .3s ease; }
.dot-i.is-past { background: var(--mute-2); }
.dot-i.is-active { background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: scale(1.2); }

.proc-rows { display: flex; flex-direction: column; }
.proc-row {
  display: grid; grid-template-columns: 80px 1fr; gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0.35; transition: opacity .5s ease;
}
.proc-row:last-child { border-bottom: 0; }
.proc-row.is-active { opacity: 1; }
.proc-row__t {
  font-size: 13px; color: var(--accent); letter-spacing: 0.1em;
  padding-top: 6px;
}
.proc-row__body h3 {
  margin: 0 0 12px; font-size: 36px; font-weight: 300; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ink);
}
.proc-row__body p {
  margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.65; max-width: 52ch;
}
@media (max-width: 820px) {
  .proc-grid { grid-template-columns: 1fr; gap: 28px; }
  .proc-rail__inner { position: static; }
  .proc-rail__time { font-size: 60px; }
  .proc-row { grid-template-columns: 60px 1fr; gap: 16px; }
  .proc-row__body h3 { font-size: 26px; }
}

/* ========== TEAM ========== */
.team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.team-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .3s ease, transform .4s cubic-bezier(.2,.7,.2,1);
}
.team-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.team-portrait { aspect-ratio: 5 / 6; background: #0d0d0d; }
.team-meta { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.team-index { font-size: 10px; color: var(--mute); letter-spacing: 0.2em; }
.team-meta h4 { margin: 0; font-size: 24px; font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.team-role { font-size: 11px; color: var(--accent); letter-spacing: 0.12em; }
.team-bio { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.team-loc { font-size: 11px; color: var(--mute); letter-spacing: 0.1em; display: flex; align-items: center; gap: 8px; margin-top: 6px; }

@media (max-width: 980px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

/* ========== TESTIMONIALS ========== */
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.test-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; margin: 0;
  background: var(--bg-1);
  transition: border-color .3s ease, background .3s ease;
}
.test-card:hover { border-color: var(--line-2); background: #141414; }
.test-mark {
  font-size: 80px; line-height: 0.5; color: var(--accent);
  position: absolute; top: 28px; right: 28px; opacity: 0.2;
}
.test-card blockquote {
  margin: 0; font-size: 22px; line-height: 1.35; font-weight: 300;
  letter-spacing: -0.01em; color: var(--ink);
}
.test-card figcaption { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.test-who { font-size: 12px; color: var(--ink); letter-spacing: 0.02em; }
.test-role { font-size: 11px; color: var(--mute); letter-spacing: 0.1em; margin-top: 4px; }

@media (max-width: 980px) { .test-grid { grid-template-columns: 1fr; } }

/* ========== CONTACT ========== */
.section--contact {
  background:
    radial-gradient(700px 500px at 90% 10%, #1a160e, transparent 60%),
    #0a0a0a;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; }
.contact-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 5vw, 72px); line-height: 1.04;
  letter-spacing: -0.03em; margin: 16px 0 16px;
}
.contact-title em { font-style: italic; color: var(--accent); }
.contact-lede { color: var(--ink-2); font-size: 16px; max-width: 44ch; margin: 0 0 32px; }
.contact-facts { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px dashed var(--line-2); }
.contact-facts > div {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 12px;
}
.contact-facts > div > span:first-child { color: var(--mute); letter-spacing: 0.12em; text-transform: uppercase; }
.contact-facts > div > span:last-child { color: var(--ink-2); }

/* Form */
.contact-form {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 32px;
  background: #0d0d0d;
  display: flex; flex-direction: column; gap: 20px;
}
.ff-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ff { display: flex; flex-direction: column; gap: 10px; position: relative; }
.ff-k { font-size: 10px; color: var(--mute); letter-spacing: 0.18em; text-transform: uppercase; }
.ff input, .ff textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  padding: 8px 0 10px;
  transition: border-color .25s ease;
  resize: vertical;
  outline: none;
}
.ff input::placeholder, .ff textarea::placeholder { color: var(--mute-2); }
.ff input:focus, .ff textarea:focus { border-bottom-color: var(--accent); }
.ff-err { font-size: 10px; color: var(--warn); letter-spacing: 0.1em; position: absolute; bottom: -16px; left: 0; }
.ff-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-chip {
  font-size: 11px; letter-spacing: 0.1em;
  padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); transition: all .2s ease;
}
.ff-chip:hover { border-color: var(--ink-2); }
.ff-chip.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ff-submit { align-self: flex-start; margin-top: 4px; }
.ff-submit:disabled { opacity: 0.6; cursor: wait; }

.contact-sent { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
.contact-sent__k { font-size: 11px; color: var(--accent); letter-spacing: 0.18em; display: inline-flex; align-items: center; gap: 10px; }
.contact-sent h3 { margin: 0; font-size: 40px; font-weight: 300; letter-spacing: -0.02em; }
.contact-sent p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 44ch; }

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .ff-row { grid-template-columns: 1fr; }
}

/* ========== FOOTER ========== */
.footer { border-top: 1px solid var(--line); padding: 80px 0 40px; background: #070707; }
.footer-top { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; margin-bottom: 60px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-tag { font-size: 24px; font-weight: 300; letter-spacing: -0.01em; color: var(--ink-2); margin: 0; max-width: 22ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols > div { display: flex; flex-direction: column; gap: 10px; }
.footer-h { font-size: 10px; color: var(--mute); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 4px; }
.footer-cols a, .footer-cols .mute {
  font-size: 14px; color: var(--ink-2); transition: color .2s ease;
}
.footer-cols a:hover { color: var(--accent); }
.footer-cols .mute { color: var(--mute-2); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 10px; color: var(--mute-2); letter-spacing: 0.14em;
  padding-top: 24px; border-top: 1px solid var(--line);
}
@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}


/* ========== LOADING SCREEN ========== */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #070707;
  color: var(--ink);
  display: flex; flex-direction: column;
  padding: 40px 48px;
  font-family: var(--mono);
  overflow: hidden;
  transition: opacity 1.1s cubic-bezier(.7,0,.3,1), transform 1.1s cubic-bezier(.7,0,.3,1), clip-path 1.1s cubic-bezier(.7,0,.3,1);
  clip-path: inset(0 0 0 0);
}
.loader--out {
  opacity: 0;
  transform: translateY(-4%);
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
}
.loader__scan {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(232,228,216,0.02) 0px,
    rgba(232,228,216,0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: .7;
}
.loader__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(1000px 700px at 50% 50%, transparent 0%, rgba(0,0,0,.6) 90%);
}
.loader__head {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 2;
}
.loader__meta {
  display: flex; gap: 12px; font-size: 11px; color: var(--mute);
  letter-spacing: 0.18em;
}
.loader__sep { color: var(--line-2); }

.loader__stage {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}

/* Boot log */
.loader__boot {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .45s ease, transform .45s ease;
}
.loader__boot.is-gone {
  opacity: 0; transform: scale(.96);
  pointer-events: none;
}
.loader__log {
  margin: 0; font-size: 13px; line-height: 2;
  color: var(--ink-2);
  max-width: 640px;
}
.loader__log-line {
  opacity: 0;
  animation: log-in .35s cubic-bezier(.2,.7,.2,1) forwards;
}
.loader__log-line--cur { color: var(--ink); }
.loader__ok { color: var(--accent); margin-right: 4px; }
@keyframes log-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}
.loader__spin {
  display: inline-block; width: 10px; height: 10px;
  border: 1px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -1px; margin-right: 6px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader__dots::after {
  content: ""; display: inline-block;
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } 100% { content: ""; }
}

/* Clock reveal */
.loader__clock {
  opacity: 0;
  transform: scale(.94);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1) .1s, transform .8s cubic-bezier(.2,.7,.2,1) .1s;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}
.loader__clock.is-live {
  opacity: 1; transform: none;
}
.loader__clock-k {
  font-size: 11px; color: var(--mute); letter-spacing: 0.3em;
}
.loader__clock-time {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(110px, 18vw, 240px);
  line-height: 0.9; color: var(--accent);
  display: flex; gap: 2px; align-items: baseline;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  text-shadow: 0 0 80px rgba(212,168,83,.35);
}
.loader__digit { display: inline-block; }
.loader__colon { color: var(--ink-2); animation: pulse 1.2s ease-in-out infinite; }
.loader__clock-sub {
  font-size: 11px; color: var(--ink-2); letter-spacing: 0.25em;
  margin-top: 6px;
}

/* Bottom progress */
.loader__foot {
  display: flex; flex-direction: column; gap: 10px;
  position: relative; z-index: 2;
}
.loader__pct {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; letter-spacing: 0.18em; color: var(--ink-2);
}
.loader__pct span:first-child {
  font-size: 13px; color: var(--accent);
}
.loader__pct-label { color: var(--mute); }
.loader__bar {
  position: relative; height: 2px;
  background: var(--line);
  overflow: hidden;
}
.loader__bar-fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width .4s cubic-bezier(.2,.7,.2,1);
}
.loader__bar-ticks {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(40, 1fr);
  pointer-events: none;
}
.loader__bar-ticks span {
  border-right: 1px solid rgba(0,0,0,.4);
}
.loader__hint {
  font-size: 10px; color: var(--mute-2); letter-spacing: 0.3em;
  text-align: right;
}

@media (max-width: 720px) {
  .loader { padding: 24px; }
  .loader__log { font-size: 11px; }
  .loader__meta { font-size: 10px; }
}
