:root {
  --ink: #f5f3ff;
  --paper: #08080c;
  --white: #141019;
  --muted: #a8a3b8;
  --line: rgba(255, 255, 255, .14);
  --accent: #8b5cf6;
  --accent-soft: #171022;
  --accent-ink: #ffffff;
  --radius: 18px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.03em; }
p { margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { font-size: 1.15rem; }
.brand-word { font-size: 1.15rem; }
.brand-mark::after { content: "/"; margin-left: 6px; color: var(--accent); font-weight: 600; }

.nav { display: flex; gap: 26px; font-size: .92rem; color: #d6d1e3; }
.nav a { padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a.is-active { border-color: var(--accent); color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 650;
  font-size: .95rem;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); background: #9d74ff; }
.btn-small { padding: 9px 16px; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(255,255,255,.28); }
.btn-ghost:hover { background: #ffffff; color: #08080c; }

main { display: block; }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) clamp(20px, 4vw, 56px) clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-cube {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
}

.hero-cube::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, .28), transparent 66%);
  filter: blur(24px);
}

.hero-cube-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
  touch-action: none;
}

.hero-cube-canvas.is-dragging { cursor: grabbing; }

.hero-cube-fallback {
  position: absolute;
  inset: 24%;
  border-radius: 26px;
  border: 1px solid rgba(139, 92, 246, .55);
  background: linear-gradient(145deg, #241537, #0d0913 62%);
  box-shadow: 0 30px 80px rgba(139, 92, 246, .25), inset 0 0 40px rgba(139, 92, 246, .18);
  transform: rotate(-14deg) rotateY(18deg);
  transition: opacity .4s ease;
}

.hero-cube-fallback.is-hidden { opacity: 0; }

.hero-cube-hint {
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .65;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 780;
}

.lead {
  max-width: 62ch;
  margin-top: 26px;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: #c9c4d6;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}
.proof strong { color: var(--ink); }
.proof .dot { opacity: .5; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 96px) clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 760; }
.section-head .muted { margin-top: 12px; }

.muted { color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.process-head { max-width: none; }
.process-title { font-size: clamp(1.3rem, 2.3vw, 2rem); letter-spacing: -.02em; }

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.card h3 { font-size: 1.18rem; font-weight: 720; letter-spacing: -.02em; }
.card p { color: #b9b3c7; font-size: .96rem; }
.card a { color: var(--accent); }
.card-accent { background: var(--accent); border-color: transparent; color: #ffffff; }
.card-accent p { color: #efe7ff; }
.card-accent a { color: #ffffff; }

.work {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.work-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.04em;
}
.work-media-a { background: linear-gradient(135deg, #24163b, #4c2a85); color: #e9d5ff; }
.work-media-b { background: linear-gradient(135deg, #050506, #1c1a24); color: #ffffff; }
.work-body { padding: 24px 26px 28px; }
.tag { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.work-body h3 { margin-top: 8px; font-size: 1.3rem; font-weight: 720; }
.work-body p:last-child { margin-top: 10px; color: #b9b3c7; }
.work-body a { color: var(--accent); }

.process .step {
  padding: 26px;
  border-top: 3px solid var(--accent);
  background: transparent;
}
.step-num { font-size: .8rem; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.step h3 { margin: 10px 0 8px; font-size: 1.4rem; font-weight: 760; }
.step p { color: #b9b3c7; }

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(44px, 7vw, 80px) clamp(20px, 4vw, 56px);
  margin: clamp(20px, 4vw, 40px) auto;
  max-width: var(--max);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
}
.cta h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); max-width: 22ch; }
.cta .muted { color: #efe7ff; margin-top: 12px; max-width: 52ch; }
.cta .eyebrow { color: #efe7ff; }
.cta .btn { background: #ffffff; color: #4c1d95; border-color: #ffffff; }
.cta .btn:hover { background: #f1eaff; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px clamp(20px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  justify-content: space-between;
  font-size: .9rem;
}
.footer-inner nav { display: flex; gap: 22px; }
.footer-inner a { color: #c9c4d6; }
.footer-inner a:hover { color: var(--ink); }

/* Multi-page additions */
.page-hero { max-width: var(--max); margin: 0 auto; padding: clamp(44px, 7vw, 84px) clamp(20px, 4vw, 56px) clamp(28px, 4vw, 44px); }
.page-hero h1 { max-width: 22ch; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 780; }
.page-hero .lead { margin-top: 20px; }
.about-title { max-width: none; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.breadcrumbs { max-width: var(--max); margin: 0 auto; padding: 22px clamp(20px, 4vw, 56px) 0; font-size: .82rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--ink); }
.prose { max-width: 820px; }
.prose h2 { margin-top: 42px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 740; }
.prose h3 { margin-top: 28px; font-size: 1.15rem; font-weight: 700; }
.prose p, .prose li { margin-top: 14px; color: #c9c4d6; }
.prose ul, .prose ol { margin-top: 14px; padding-left: 22px; }
.prose li { margin-top: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.side-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); }
.side-card h3 { font-size: 1.05rem; font-weight: 720; }
.side-card ul { margin: 12px 0 0; padding-left: 20px; color: #c9c4d6; }
.side-card li { margin-top: 8px; }
.side-card a { color: var(--accent); }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li { position: relative; padding-left: 26px; margin-top: 10px; color: #c9c4d6; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--accent); }
.article { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 56px); }
.article h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 780; }
.article .meta { margin-top: 12px; color: var(--muted); font-size: .9rem; }
.article h2 { margin-top: 36px; font-size: 1.45rem; font-weight: 730; }
.article p { margin-top: 14px; color: #c9c4d6; }
.article ul, .article ol { margin-top: 14px; padding-left: 22px; }
.article li { margin-top: 8px; color: #c9c4d6; }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article .back { margin-top: 40px; font-weight: 650; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field span { font-size: .85rem; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #141019; font: inherit; color: var(--ink); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { margin-top: 14px; font-size: .82rem; color: var(--muted); }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.list-clean li { display: flex; gap: 12px; align-items: baseline; }
.list-clean .num { color: var(--muted); font-size: .8rem; }

.doc { max-width: 780px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 56px); }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 780; }
.doc h2 { margin-top: 34px; font-size: 1.3rem; font-weight: 720; }
.doc p, .doc li { margin-top: 12px; color: #c9c4d6; }
.doc ul { margin-top: 12px; padding-left: 22px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-cube { width: min(78vw, 380px); }
  .hero-cube-hint { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
}
