/* ── Tokens ──────────────────────────────────────── */
:root {
  --bg:      #FAFAFA;
  --ink:     #0E0E10;
  --ink-2:   #4A4A50;
  --ink-3:   #8A8A92;
  --line:    #E5E5E8;
  --accent:  #B25C66;
  --accent-2:#E58A50;
  --accent-3:#D9A23E;
  --pill:    #0E0E10;
  --sans:    'Geist', -apple-system, system-ui, sans-serif;
  --mono:    'Geist Mono', ui-monospace, monospace;
}
[data-theme="dark"] {
  --bg:    #0B0B0D;
  --ink:   #F5F5F7;
  --ink-2: #B5B5BA;
  --ink-3: #6E6E76;
  --line:  #1F1F23;
  --pill:  #F5F5F7;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background .5s, color .5s;
}
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--sans); }

/* ── Dust canvas ─────────────────────────────────── */
.dust {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: .7;
}
[data-theme="dark"] .dust { opacity: .35; mix-blend-mode: screen; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
}
.brand-mark { width: 22px; height: 22px; }

.nav-links {
  display: flex; gap: 28px;
  font-size: 14px; color: var(--ink-2);
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; gap: 10px; align-items: center; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
  transition: all .2s;
}
.icon-btn:hover { border-color: var(--ink-2); }

.lang-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); padding: 8px 12px; border-radius: 999px;
  cursor: pointer; transition: all .2s;
}
.lang-btn:hover { border-color: var(--ink-2); color: var(--ink); }

.cta-pill {
  background: var(--pill); color: var(--bg);
  padding: 9px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .2s; cursor: pointer; border: 0;
}
.cta-pill:hover { transform: translateY(-1px); }

/* ── Hamburger (mobile) ──────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  cursor: pointer; padding: 9px 8px; justify-content: center;
}
.hamburger span {
  display: block; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: all .3s;
}

/* ── Mobile menu ─────────────────────────────────── */
.mobile-menu {
  position: fixed; inset: 0; top: 73px; z-index: 49;
  background: var(--bg); padding: 32px 40px;
  display: none; flex-direction: column; gap: 24px;
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 20px; font-weight: 500; color: var(--ink); }

/* ── Hero ────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: grid; place-items: center;
  padding: 120px 24px 80px; z-index: 1;
}
.hero-inner { max-width: 920px; text-align: center; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--ink-2);
  margin-bottom: 32px; font-family: var(--mono);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.hero h1 {
  font-size: clamp(40px, 6.4vw, 88px); font-weight: 600;
  line-height: 1.02; letter-spacing: -0.035em;
  text-wrap: balance; margin-bottom: 24px;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--accent); }

.hero .lede {
  font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2);
  max-width: 620px; margin: 0 auto 40px;
  line-height: 1.55; text-wrap: pretty;
}

.hero-ctas {
  display: inline-flex; gap: 12px;
  flex-wrap: wrap; justify-content: center;
}

.btn-primary {
  background: var(--pill); color: var(--bg);
  padding: 14px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .2s; border: 0; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
  background: transparent; color: var(--ink);
  padding: 13px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line);
  transition: all .2s; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--ink-2); }

/* ── Particle field (bottom-right) ───────────────── */
.field {
  position: absolute; bottom: 0; right: 0;
  width: 60vw; height: 70vh;
  pointer-events: none; z-index: 0; opacity: .9;
}
@media (max-width: 800px) { .field { width: 100vw; opacity: .6; } }

/* ── Sections ────────────────────────────────────── */
.section {
  padding: 120px 40px; position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
}
.section h2 {
  font-size: clamp(32px, 4vw, 56px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 16px; text-wrap: balance;
}
.section h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.section .sub {
  color: var(--ink-2); font-size: 17px;
  max-width: 560px; margin-bottom: 56px; line-height: 1.55;
}

/* ── Services grid ───────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
@media (max-width: 720px) { .services-grid { grid-template-columns: 1fr; } }

.svc {
  background: var(--bg); padding: 36px 32px;
  transition: background .3s; cursor: default; position: relative;
}
.svc:hover { background: color-mix(in oklab, var(--accent) 5%, var(--bg)); }
.svc .num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .12em; }
.svc h3 { font-size: 24px; font-weight: 500; margin: 12px 0 10px; letter-spacing: -0.015em; }
.svc h3 em { font-style: italic; color: var(--accent); font-weight: 400; }
.svc p { color: var(--ink-2); font-size: 14px; line-height: 1.6; max-width: 42ch; }
.svc .arrow {
  position: absolute; top: 36px; right: 32px;
  transition: transform .3s; color: var(--ink-3);
}
.svc:hover .arrow { transform: translate(4px, -4px); color: var(--accent); }

/* ── Projects grid ───────────────────────────────── */
.proj-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
}
.proj {
  grid-column: span 6; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  background: var(--bg);
}
.proj.feature { grid-column: span 12; }
.proj:hover { transform: translateY(-6px); }

.proj-img {
  aspect-ratio: 16/9; position: relative; overflow: hidden;
}
.proj.feature .proj-img { aspect-ratio: 21/8; }
.proj-img .shine {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.4), transparent 60%);
}
.proj-info {
  padding: 24px 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.proj-info h4 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 4px; }
.proj-info h4 em { font-style: italic; color: var(--accent); font-weight: 400; }
.proj-info p { color: var(--ink-3); font-size: 13px; }
.proj-info .visit { font-family: var(--mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.proj-info .visit:hover { color: var(--accent); }

@media (max-width: 800px) { .proj { grid-column: span 12; } }

/* ── Contact ─────────────────────────────────────── */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
}
@media (max-width: 720px) { .contact { grid-template-columns: 1fr; gap: 32px; } }

.contact-info { display: flex; flex-direction: column; gap: 4px; }
.contact-info .detail {
  font-family: var(--mono); font-size: 13px; color: var(--ink-2); line-height: 1.9;
}
.contact-info .detail a { transition: color .2s; }
.contact-info .detail a:hover { color: var(--accent); }

.contact form { display: grid; gap: 16px; }
.contact label {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: .1em; text-transform: uppercase;
}
.contact input, .contact textarea {
  background: transparent; border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0; font-family: var(--sans);
  font-size: 16px; color: var(--ink); outline: none;
  transition: border-color .2s; width: 100%;
}
.contact input:focus, .contact textarea:focus { border-bottom-color: var(--accent); }
.contact textarea { resize: vertical; min-height: 80px; }
.contact .row { display: flex; flex-direction: column; gap: 4px; }
.contact .submit-row { margin-top: 8px; }

/* Form success state */
.form-success {
  display: none; align-items: center; gap: 12px;
  padding: 16px; border-radius: 8px;
  background: color-mix(in oklab, var(--accent) 8%, var(--bg));
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--line));
  color: var(--accent); font-size: 14px;
}
.form-success.visible { display: flex; }

/* ── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 40px;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--ink-3);
  position: relative; z-index: 1; background: var(--bg);
}

/* ── Scroll reveal ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

/* ── Design System card ──────────────────────────── */
.ds-card {
  position: fixed; bottom: 20px; left: 20px; width: 320px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.04);
  z-index: 60; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
[data-theme="dark"] .ds-card { box-shadow: 0 10px 40px -10px rgba(0,0,0,.6); }
.ds-card.collapsed { transform: translateY(calc(100% - 44px)); }

.ds-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--line);
}
.ds-card.collapsed .ds-head { border-bottom-color: transparent; }

.ds-head-left {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase;
}
.ds-head-left .badge { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.ds-toggle {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; color: var(--ink-3);
  transition: transform .3s, color .2s;
}
.ds-card:hover .ds-toggle { color: var(--ink); }
.ds-card.collapsed .ds-toggle { transform: rotate(180deg); }

.ds-body {
  max-height: 70vh; overflow-y: auto;
  padding: 16px 14px 18px; display: grid; gap: 18px;
}
.ds-body::-webkit-scrollbar { width: 6px; }
.ds-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.ds-section h5 {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-3); text-transform: uppercase;
  margin-bottom: 10px; font-weight: 500;
}
.ds-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ds-swatch {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line);
  position: relative; cursor: pointer; transition: transform .15s;
}
.ds-swatch:hover { transform: scale(1.08); }
.ds-swatch span {
  position: absolute; bottom: -16px; left: 0; right: 0;
  text-align: center; font-family: var(--mono); font-size: 8px;
  color: var(--ink-3); letter-spacing: .04em;
}
.ds-swatches-row { padding-bottom: 18px; }

.ds-type-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  align-items: baseline; padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.ds-type-row:last-child { border-bottom: 0; }
.ds-type-meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: .04em; white-space: nowrap; }
.ds-h1-sample { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ds-h1-sample em { font-style: italic; color: var(--accent); font-weight: 400; }
.ds-h2-sample { font-size: 16px; font-weight: 500; letter-spacing: -0.015em; }
.ds-body-sample { font-size: 13px; color: var(--ink-2); }
.ds-mono-sample { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--ink-2); }

.ds-tokens {
  display: grid; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
}
.ds-tokens div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 4px 8px; border-radius: 5px;
  background: color-mix(in oklab, var(--ink) 4%, transparent);
}
.ds-tokens div span:last-child { color: var(--ink); }

.ds-vibe { display: flex; flex-wrap: wrap; gap: 5px; }
.ds-vibe span {
  font-family: var(--mono); font-size: 10px;
  padding: 4px 8px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink-2); letter-spacing: .04em;
}

/* ── Responsive nav ──────────────────────────────── */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .cta-pill { display: none; }
  .nav { padding: 18px 24px; }
  .section { padding: 80px 24px; }
  .ds-card { width: calc(100vw - 24px); left: 12px; bottom: 12px; }
}