/* ---------- tokens ---------- */
:root {
  --bg: #120d16;
  --bg-alt: #1a1420;
  --panel: #1f1826;
  --panel-line: #332a3d;
  --purple: #5a2657;
  --purple-bright: #8b3f80;
  --peach: #ecb797;
  --peach-dim: #c99a7d;
  --text: #f3ede7;
  --text-dim: #a99cae;
  --text-faint: #6f6478;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* background glow layer, fixed */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(90, 38, 87, 0.45), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 20%, rgba(236, 183, 151, 0.08), transparent 60%),
    var(--bg);
  animation: glow-breathe 16s ease-in-out infinite alternate;
}

@keyframes glow-breathe {
  0%   { background-position: 0% 0%, 0% 0%; filter: brightness(1); }
  100% { background-position: 4% 3%, -3% -2%; filter: brightness(1.08); }
}

/* scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple-bright), var(--peach));
  z-index: 100;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px 0 rgba(236, 183, 151, 0.5);
}

/* ---------- nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(18, 13, 22, 0.75);
  border-bottom: 1px solid var(--panel-line);
}

nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--peach); }

.nav-cta {
  border: 1px solid var(--peach-dim);
  padding: 8px 18px;
  border-radius: 100px;
  color: var(--peach) !important;
  transition: all 0.2s var(--ease);
}
.nav-cta:hover {
  background: var(--peach);
  color: var(--bg) !important;
  border-color: var(--peach);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--peach);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--peach);
  box-shadow: 0 0 12px 2px var(--peach);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5.4vw, 3.8rem);
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 820px;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--peach);
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 0 40px;
}

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

.btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  padding: 14px 26px;
  border-radius: 100px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn-primary {
  background: var(--peach);
  color: #1a1216;
}
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(236, 183, 151, 0.55); }

.btn-ghost {
  border: 1px solid var(--panel-line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--peach-dim); }

.btn-magnetic {
  will-change: transform;
}

/* network graph behind hero */
.hero-mark {
  position: absolute;
  right: -20px;
  top: 50%;
  width: 440px;
  height: 440px;
  opacity: 0.65;
  pointer-events: none;
  will-change: transform;
  transform: translateY(-50%);
}
.hero-mark .net-graph {
  width: 100%;
  height: 100%;
}
.hero-mark .net-nodes .hub {
  filter: drop-shadow(0 0 7px var(--peach));
}
.hero-mark .net-pulses circle {
  filter: drop-shadow(0 0 5px var(--peach));
}

/* ---------- section shared ---------- */
section { padding: 90px 0; }

.section-head {
  margin-bottom: 52px;
  max-width: 620px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--peach);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-dim);
  margin: 0;
}

/* ---------- about ---------- */
.about {
  border-top: 1px solid var(--panel-line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.stat .num {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--peach);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat .label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 6px;
}

.about-copy p {
  color: var(--text-dim);
  margin: 0 0 18px;
}
.about-copy p:last-child { margin-bottom: 0; }
.about-copy strong { color: var(--text); font-weight: 600; }

/* ---------- services ---------- */
.services {
  background: var(--bg-alt);
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  perspective: 1200px;
}

.service-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 16px;
  padding: 32px;
  overflow: hidden;
  transform: translateZ(0);
  transition: border-color 0.25s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(236, 183, 151, 0.13), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.service-card:hover {
  border-color: var(--peach-dim);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}
.service-card:hover::before {
  opacity: 1;
}

.service-index {
  font-family: var(--mono);
  color: var(--purple-bright);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: block;
  position: relative;
}

.service-card h3, .service-card p { position: relative; }

.service-card h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.service-card p {
  color: var(--text-dim);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- work / trust ---------- */
.work-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--panel-line);
}

.work-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--panel-line);
}

.work-row .period {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-faint);
}

.work-row .desc h4 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
}
.work-row .desc p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.work-row .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 220px;
  justify-content: flex-end;
}
.work-row .tags span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--peach-dim);
  border: 1px solid var(--panel-line);
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ---------- contact ---------- */
.contact {
  text-align: center;
  border-top: 1px solid var(--panel-line);
}

.contact .tag { justify-content: center; display: block; text-align: center; }

.contact h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 600;
  max-width: 720px;
  margin: 0 auto 20px;
  letter-spacing: -0.01em;
}

.contact p.lead {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 40px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.contact-meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--panel-line);
  padding: 32px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-row .brand-name { font-size: 0.9rem; }

footer .fine {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .bg-glow { animation: none; }
  .service-card, .btn-magnetic, .hero-mark { transition: none; }
  .hero-mark .net-pulses { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stat-list { flex-direction: row; flex-wrap: wrap; gap: 32px; }
  .service-grid { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; gap: 8px; }
  .work-row .tags { justify-content: flex-start; max-width: none; }
  .hero-mark { width: 300px; height: 300px; opacity: 0.4; right: -10px; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  header.open .nav-links {
    display: flex;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 24px 28px;
    border-bottom: 1px solid var(--panel-line);
    gap: 20px;
  }
  .hero { padding: 70px 0 70px; }
  .hero-mark { display: none; }
  section { padding: 64px 0; }
}
