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

:root {
  --bg:       #080808;
  --text:     #e8e8e8;
  --muted:    #686868;
  --dim:      #3a3a3a;
  --rule:     #1c1c1c;
  --silver:   #b8b8b8;
  --white:    #f5f5f5;
  --serif:    'Instrument Serif', Georgia, serif;
  --sans:     'Inter', system-ui, sans-serif;
  --max-w:    1160px;
}

html { scroll-behavior: auto; } /* Lenis handles smooth scroll */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

/* ── Text Selection ── */
::selection {
  background: var(--white);
  color: var(--bg);
}
::-moz-selection {
  background: var(--white);
  color: var(--bg);
}

/* ── Grain ── */
.grain {
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.5s steps(1) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(3%, 1%); }
  30%  { transform: translate(-1%, 4%); }
  40%  { transform: translate(4%, -2%); }
  50%  { transform: translate(-3%, 3%); }
  60%  { transform: translate(2%, -4%); }
  70%  { transform: translate(-4%, 1%); }
  80%  { transform: translate(3%, -1%); }
  90%  { transform: translate(-1%, -3%); }
}

/* ── Custom Cursor ── */
.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.2s, height 0.2s, border-color 0.2s;
}
.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor.hovering {
  width: 52px;
  height: 52px;
  border-color: rgba(255,255,255,0.5);
}
a, button { cursor: none; }

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) { .container { padding: 0 24px; } }

/* ── Horizontal rule shared ── */
.h-rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
}

/* ── Section index ── */
.section-index {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 64px;
  padding-top: 80px;
  border-top: 1px solid var(--rule);
}

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ────────────────── NAV ────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  transition: padding 0.4s ease, background 0.4s ease, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 18px 48px;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--rule);
}
.nav-logo {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--white);
  text-decoration: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-link {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-link--cta {
  color: var(--text);
  border-bottom: 1px solid var(--dim);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}
.nav-link--cta:hover { border-color: var(--silver); color: var(--white); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
}
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 768px) {
  .nav { padding: 20px 24px; }
  .nav.scrolled { padding: 14px 24px; }
  .nav-right { display: none; }
  .nav-burger { display: flex; }
}

/* ────────────────── HERO CANVAS ────────────────── */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* ────────────────── SIGNAL STREAM ────────────────── */
.signal-stream {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  font-family: 'Courier New', monospace;
  font-size: 9.5px;
  line-height: 1.65;
  color: #3a3a3a;
  letter-spacing: 0.04em;
  word-break: break-all;
  overflow: hidden;
  user-select: none;
  padding: 32px 0;
  pointer-events: none;
  transition: color 0.4s;
  border-left: 1px solid var(--rule);
  padding-left: 20px;
  padding-right: 20px;
}
.service-row { position: relative; }
.service-row:hover .signal-stream { color: #484848; }
.signal-stream .hl { color: var(--silver); }

/* ────────────────── HERO BACKGROUND ────────────────── */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-vlines {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 48px;
}
.vline {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--rule) 30%, var(--rule) 70%, transparent 100%);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
}
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,180,180,0.055) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(0.25,0.46,0.45,0.94), top 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
  left: 50%;
  top: 40%;
}

/* ────────────────── HERO ────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 0;
  padding-top: 120px;
  position: relative;
}

/* Split-line text animation */
.split-line {
  display: block;
  overflow: hidden;
  line-height: 1.05;
}
.split-inner {
  display: block;
  transform: translateY(110%);
  opacity: 0;
}
.italic-text {
  font-style: italic;
  color: var(--silver);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 48px;
  overflow: hidden;
}
.hero-meta-item {
  display: block;
  transform: translateY(100%);
  opacity: 0;
}
.hero-headline {
  font-family: var(--serif);
  font-size: clamp(52px, 8.5vw, 110px);
  font-weight: 400;
  line-height: 1.02;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 80px;
}
.hero-headline em {
  font-style: italic;
  color: var(--silver);
}
.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 64px;
  opacity: 0;
  transform: translateY(16px);
}
.hero-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 480px;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  justify-self: end;
  align-self: end;
  transition: color 0.2s;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 4px;
}
.hero-cta:hover { color: var(--white); border-color: var(--silver); }
.arrow { transition: transform 0.2s; }
.hero-cta:hover .arrow,
.contact-cta:hover .arrow { transform: translateX(4px); }

.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
}

@media (max-width: 768px) {
  .hero-bottom { grid-template-columns: 1fr; padding-bottom: 48px; }
  .hero-cta { justify-self: start; }
}

/* ────────────────── PROBLEM ────────────────── */
.problem { padding-bottom: 100px; }

.problem-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 80px;
}
.problem-headline h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  position: sticky;
  top: 120px;
}
.problem-text p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 24px;
}
.problem-text p:last-child { margin-bottom: 0; }

.stats-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 48px;
}
.stat { padding: 16px 0; }
.stat:nth-child(3), .stat:nth-child(5) { padding-left: 48px; }
.stat-n {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 64px);
  color: var(--white);
  line-height: 1;
  margin-bottom: 12px;
  font-weight: 400;
}
.stat-l {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 180px;
}
.stat-rule {
  width: 1px;
  height: 80px;
  background: var(--rule);
  margin: 0 48px;
}

@media (max-width: 900px) {
  .problem-body { grid-template-columns: 1fr; gap: 40px; }
  .problem-headline h2 { position: static; }
  .stats-row { grid-template-columns: 1fr; gap: 0; }
  .stat { border-top: 1px solid var(--rule); padding: 32px 0; }
  .stat:nth-child(3), .stat:nth-child(5) { padding-left: 0; }
  .stat-rule { display: none; }
}

/* ────────────────── SERVICES ────────────────── */
.services { padding-bottom: 0; }

.services-headline {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 64px;
}

.services-list {
  border-top: 1px solid var(--rule);
}

.service-row {
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.service-row-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  padding-top: 40px;
  padding-bottom: 40px;
  align-items: start;
  transition: padding 0.4s ease;
}
.service-row:hover .service-row-inner {
  padding-top: 52px;
  padding-bottom: 52px;
}

.service-row-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.service-num {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
  font-weight: 500;
  transition: color 0.35s;
}
.service-row:hover .service-num { color: var(--muted); }
.service-name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  transition: color 0.35s, transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  display: flex;
  align-items: center;
  gap: 16px;
}
.service-name::after {
  content: '→';
  font-family: var(--sans);
  font-size: 20px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.35s, transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  color: var(--silver);
}
.service-row:hover .service-name { color: var(--silver); transform: translateX(6px); }
.service-row:hover .service-name::after { opacity: 1; transform: translateX(0); }

.service-row-right {
  padding-top: 4px;
}
.service-row-right p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}
.service-row-right ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-row-right ul li {
  font-size: 13px;
  color: var(--dim);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.service-row-right ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--rule);
}

@media (max-width: 768px) {
  .service-row-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ────────────────── PHILOSOPHY ────────────────── */
.philosophy {
  padding: 140px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.philosophy blockquote {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--silver);
  max-width: 820px;
}
.philosophy blockquote em {
  font-style: normal;
  color: var(--white);
}

/* ────────────────── ABOUT ────────────────── */
.about { padding-bottom: 100px; }

.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.about-left h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
  position: sticky;
  top: 120px;
}
.about-right p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 24px;
}
.about-principles {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
}
.principle {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.principle-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
}
.principle-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .about-body { grid-template-columns: 1fr; gap: 48px; }
  .about-left h2 { position: static; }
  .principle { grid-template-columns: 1fr; gap: 8px; }
}

/* ────────────────── CONTACT ────────────────── */
.contact { padding-bottom: 120px; }

.contact-body {
  max-width: 720px;
}
.contact-body h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 28px;
}
.contact-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 52px;
}
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 36px);
  font-style: italic;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 8px;
  transition: border-color 0.2s, color 0.2s;
  margin-bottom: 32px;
}
.contact-cta:hover { border-color: var(--silver); color: var(--silver); }
.contact-cta .arrow { font-style: normal; font-family: var(--sans); font-size: 24px; }
.contact-meta {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.05em;
}

/* ────────────────── FOOTER ────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--white);
}
.footer-mid {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer-copy {
  font-size: 11px;
  color: var(--dim);
}
@media (max-width: 600px) { .footer-inner { flex-direction: column; } }
