:root {
  --ink: #060d18;
  --ink-2: #0a1424;
  --ink-3: #101e33;
  --line: rgba(220, 228, 240, 0.07);
  --line-2: rgba(220, 228, 240, 0.14);
  --paper: #f5f5f7;
  --paper-2: #e5e5ea;
  --mute: rgba(220, 228, 240, 0.58);
  --mute-2: rgba(220, 228, 240, 0.38);
  --accent: #00b8e6;
  --accent-2: #b89460;
  --accent-3: #ff5c2b;
  --ok: #00b8e6;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--ink); }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* tag — small monospace metadata pill */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute);
}
.tag::before {
  content: ""; width: 6px; height: 6px; background: var(--accent);
  display: inline-block; box-shadow: 0 0 8px var(--accent);
}
.tag.no-dot::before { display: none; }

/* numeric label */
.idx {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--mute-2);
}

/* section scaffold */
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 56px; }
@media (max-width: 720px) { .wrap { padding: 0 24px; } }

.section {
  position: relative;
  padding: 60px 0;
  border-top: 1px solid var(--line);
}
.section.first { border-top: 0; padding-top: 0; }
.section.tight { padding: 60px 0; }

.section-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: 48px;
  align-items: end; margin-bottom: 64px;
}
.section-head > * { min-width: 0; }
.section-head h2 {
  text-align: right;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .section-head h2 { text-align: left; }
}

/* big display type */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.18s ease;
}
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px color-mix(in oklab, var(--accent) 30%, transparent); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--paper); }
.btn .arr { display: inline-block; transition: transform 0.18s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* card grid */
.card {
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: var(--line-2); background: var(--ink-3); }

/* metrics strip */
.metrics-strip-outer {
  display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start;
}
.metrics-strip-grid {
  display: grid; grid-template-columns: repeat(var(--metric-count, 4), 1fr); gap: 40px;
}
.metrics-col {
  display: flex; flex-direction: column; gap: 16px;
  padding-right: 24px; border-right: 1px solid rgba(10,11,14,0.15);
}
.metrics-col:last-child {
  padding-right: 0; border-right: none;
}
.metrics-value {
  font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.02em; font-weight: 500; line-height: 1;
}
.metrics-label {
  font-size: 11px; color: rgba(10,11,14,0.6); line-height: 1.5; letter-spacing: 0.06em; text-transform: uppercase;
}

@media (max-width: 900px) {
  .metrics-strip-outer { grid-template-columns: 1fr; gap: 24px; }
  .metrics-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-col { align-items: center; text-align: center; }
  .metrics-col:nth-child(even) { padding-right: 0; border-right: none; }
}
@media (max-width: 500px) {
  .metrics-strip-grid { grid-template-columns: 1fr; gap: 24px; }
  .metrics-col { padding-right: 0; border-right: none; }
}

/* paper section (light flip) */
.paper-section {
  background: var(--paper); color: var(--ink);
  padding: 60px 0;
}
.paper-section .tag { color: rgba(10,11,14,0.6); }
.paper-section .tag::before { background: var(--ink); box-shadow: none; }

/* divider line */
.hr {
  height: 1px; width: 100%;
  background: var(--line);
  border: 0; margin: 0;
}
.paper-section .hr { background: rgba(10,11,14,0.1); }

/* pixel-face SVG defaults */
.pf { display: block; }
.pf rect { shape-rendering: crispEdges; }

/* blinking cursor */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.cursor { display: inline-block; width: 0.5ch; height: 1em; background: currentColor; vertical-align: -0.15em; animation: blink 1s steps(2) infinite; margin-left: 2px; }

/* subtle scan/grid overlay for hero */
.grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
}

/* fadeup animation */
@keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fadeup { animation: fadeup 0.7s ease-out both; }

/* word swap animation for rotating dyad */
@keyframes wordIn {
  0%   { transform: translateY(0.55em) skewY(6deg); filter: blur(6px); }
  60%  { transform: translateY(0) skewY(0); filter: blur(0); }
  100% { transform: translateY(0) skewY(0); filter: blur(0); }
}
.rot-word {
  display: inline-block;
  opacity: 1;
  animation: wordIn 0.55s cubic-bezier(.2,.8,.2,1);
  will-change: transform, opacity, filter;
}
.rot-wrap {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  vertical-align: baseline;
}

/* hero line rotation — full-line swap, cinematic */
@keyframes heroSwap {
  0%   { transform: translateY(0.32em); filter: blur(8px); }
  55%  { transform: translateY(0); filter: blur(0); }
  100% { transform: translateY(0); filter: blur(0); }
}
.hero-line {
  display: block;
  opacity: 1;
  animation: heroSwap 0.8s cubic-bezier(.2,.85,.2,1);
  will-change: transform, opacity, filter;
}

/* hero rotation progress strip */
.pace-bar {
  display: flex; gap: 6px;
  margin-top: 20px;
}
.pace-tick {
  flex: 1;
  height: 2px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
  max-width: 56px;
}
.pace-tick.active::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  animation: paceFill var(--pace-ms, 4500ms) linear;
}
.pace-tick.done { background: var(--accent); opacity: 0.5; }
@keyframes paceFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* marquee strip */
.marquee {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  position: relative;
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 56px;
  padding: 22px 28px;
  animation: marquee 42s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 28px;
}
.marquee-dot {
  width: 14px; height: 14px;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 16px var(--accent);
}

/* breathing pulse for live indicators */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.7; }
}
.pulse { animation: pulse 1.8s ease-in-out infinite; }

/* drift for constellation faces */
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(6px, -8px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.drift { animation: drift 9s ease-in-out infinite; will-change: transform; }

/* glow utility */
.glow { filter: drop-shadow(0 0 24px color-mix(in oklab, var(--accent) 60%, transparent)); }

/* respect motion=off */
[data-motion="off"] .marquee-track,
[data-motion="off"] .drift,
[data-motion="off"] .pulse,
[data-motion="off"] .rot-word,
[data-motion="off"] .hero-line,
[data-motion="off"] .pace-tick.active::after { animation: none !important; }

#app { min-height: 100vh; }

/* reset some defaults */
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklab, var(--ink) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--mute); text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--paper); }
@media (max-width: 720px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding-top: 14px; gap: 14px; }
  .nav-links { order: 3; width: 100%; display: flex; flex-wrap: wrap; gap: 12px 20px; padding-bottom: 14px; }
}

@media (max-width: 720px) { .nav-hide-mobile { display: none !important; } }

/* nav dropdown */
.nav-dd-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dd-trigger {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease;
  cursor: pointer;
}
.nav-dd-trigger:hover { color: var(--paper); }
.nav-dd-arrow {
  font-size: 9px;
  opacity: 0.6;
  transition: transform 0.15s ease;
}
.nav-dd-wrap:hover .nav-dd-arrow { transform: rotate(180deg); }
.nav-dd-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px;
  min-width: 220px;
  z-index: 100;
}
.nav-dd-panel-inner {
  background: color-mix(in oklab, var(--ink-2) 96%, transparent);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dd-wrap:hover .nav-dd-panel { display: block; }
.nav-dd-item {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--mute);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.nav-dd-item:hover {
  background: var(--line-2);
  color: var(--paper);
}

/* contact page layout */
.contact-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-layout-grid > * { min-width: 0; }
@media (max-width: 900px) {
  .contact-layout-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* contact locations grid */
.contact-locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-locations-grid > * { min-width: 0; }
@media (max-width: 600px) {
  .contact-locations-grid { grid-template-columns: 1fr; }
}

/* about hero stats */
.about-stats {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .about-stats { grid-template-columns: 1fr; }
}

/* services hero */
.services-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
}
.services-stat-strip {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .services-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .services-stat-strip { grid-template-columns: 1fr; }
}

/* hero responsive */
.hero-main {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 72px;
  align-items: end;
  margin-bottom: 96px;
}
.hero-main > div { min-width: 0; }
@media (max-width: 980px) {
  .hero-main { grid-template-columns: 1fr !important; gap: 48px !important; align-items: start !important; }
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 15px; letter-spacing: 0.18em;
}
