:root {
  --bg: #08080b;
  --bg2: #0e0e12;
  --panel: #111116;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --text: #ededee;
  --mute: rgba(237, 237, 238, 0.55);
  --mute2: rgba(237, 237, 238, 0.38);
  --accent: #a78bfa;
  --accent2: #7c3aed;
  --glow: rgba(167, 139, 250, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }
img { max-width: 100%; display: block; }

/* ---------- NAV (mobile first) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 8, 11, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: 1280px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  color: #0b0b0f; font-family: 'Geist Mono', monospace;
  animation: pulse-glow 3s ease-in-out infinite;
}
.nav-links { display: none; }
.nav-cta { display: none; }

.nav-toggle {
  background: transparent; border: 1px solid var(--border2);
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center; gap: 4px;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 1.5px; width: 18px; background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-mobile {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  animation: slide-down 0.3s var(--ease);
}
.nav-mobile[hidden] { display: none; }
.nav-mobile a {
  padding: 12px 4px; color: var(--mute); font-size: 15px;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--text); color: #08080b; font-weight: 600; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px -6px var(--glow); }
.btn-outline { border-color: var(--border2); color: var(--text); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.22); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 56px 20px 48px;
  max-width: 1280px; margin: 0 auto;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bg::before {
  content: ''; position: absolute; top: -20%; left: 50%;
  width: min(800px, 120vw); height: 600px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 60%);
  filter: blur(40px);
  animation: glow-drift 8s ease-in-out infinite;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  opacity: 0.5;
}
.hero > * { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px; font-weight: 500; color: var(--mute);
  margin-bottom: 24px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.h1 {
  font-size: clamp(40px, 10vw, 104px);
  font-weight: 600; letter-spacing: -0.04em; line-height: 0.98;
  margin: 0 0 20px;
}
.h1 .gradient {
  background: linear-gradient(180deg, var(--text) 0%, var(--mute) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.h1 .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic; font-family: 'Instrument Serif', serif; font-weight: 400;
}

.sub {
  max-width: 620px; margin: 0 auto 28px;
  font-size: 16px; line-height: 1.55; color: var(--mute);
}

.hero-ctas { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 320px; margin: 0 auto; }
.hero-ctas .btn { padding: 14px 22px; font-size: 14px; }

/* hero preview */
.hero-preview {
  margin: 48px auto 0; max-width: 980px;
  border: 1px solid var(--border2); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  padding: 8px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5),
              inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.hero-preview-top { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.hero-preview-top .d { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.hero-preview-top .url {
  flex: 1; background: rgba(255, 255, 255, 0.04); border-radius: 6px;
  padding: 4px 10px; font-family: 'Geist Mono', monospace;
  font-size: 10px; color: var(--mute2); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-preview-top .spacer { width: 24px; }
.hero-preview-body {
  aspect-ratio: 16/10; border-radius: 10px;
  background: var(--bg); position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.mini-site { position: absolute; inset: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mini-nav { display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: var(--mute2); }
.mini-nav .b { padding: 3px 8px; border-radius: 4px; background: var(--accent); color: #000; font-weight: 600; }
.mini-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; }
.mini-title {
  font-size: clamp(14px, 4vw, 32px); font-weight: 600; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, var(--accent));
  -webkit-background-clip: text; color: transparent;
}
.mini-sub { font-size: 10px; color: var(--mute); max-width: 70%; }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mini-cards > div {
  aspect-ratio: 1.4; border-radius: 6px;
  background: linear-gradient(180deg, var(--panel), transparent);
  border: 1px solid var(--border);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 72px 20px;
  max-width: 1280px; margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  font-family: 'Geist Mono', monospace; font-size: 12px;
  color: var(--accent); letter-spacing: 0.02em; margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 6vw, 56px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.08;
  margin: 0 auto 16px; max-width: 860px;
}
.section-sub {
  font-size: 16px; line-height: 1.55; color: var(--mute);
  max-width: 620px; margin: 0 auto;
}

/* why grid */
.why-grid {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.why-item {
  background: var(--bg); padding: 28px 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: background 0.25s var(--ease);
}
.why-item:hover { background: var(--bg2); }
.why-item:hover .why-n { color: var(--accent); }
.why-n { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--mute2); transition: color 0.25s; }
.why-t { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.why-d { font-size: 13px; line-height: 1.6; color: var(--mute); margin: 0; }

/* what grid */
.what-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.what-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 22px;
  background: linear-gradient(180deg, var(--panel), var(--bg));
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.what-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 0% 0%, var(--glow), transparent 60%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.what-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.what-card:hover::before { opacity: 1; }
.what-icon {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border2); background: var(--bg2);
  display: grid; place-items: center; margin-bottom: 16px; color: var(--accent);
  position: relative;
}
.what-t { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; position: relative; }
.what-d { font-size: 14px; line-height: 1.55; color: var(--mute); margin: 0; position: relative; }

/* work grid */
.work-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.work-card {
  aspect-ratio: 1.3; border-radius: 14px; overflow: hidden;
  position: relative; border: 1px solid var(--border);
  cursor: pointer; transition: transform 0.3s var(--ease);
}
.work-card:hover { transform: translateY(-4px); }
.work-visual { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.work-visual::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, var(--c, var(--accent)), transparent 70%);
  opacity: 0.25;
}
.work-mock {
  position: relative; z-index: 1; width: 70%; aspect-ratio: 1.5;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px;
  padding: 10px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s var(--ease);
}
.work-card:hover .work-mock { transform: translateY(-4px) scale(1.02); }
.work-mock .top { display: flex; gap: 4px; }
.work-mock .top div { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.work-mock .bar { height: 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.work-mock .bar.a { width: 60%; background: var(--c); opacity: 0.6; }
.work-mock .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: auto; }
.work-mock .grid div { aspect-ratio: 1; background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.work-info {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
}
.work-t { font-size: 15px; font-weight: 600; }
.work-cat { font-size: 11px; color: var(--mute); font-family: 'Geist Mono', monospace; }
.work-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border2); display: grid; place-items: center;
  color: var(--mute); transition: all 0.25s var(--ease);
}
.work-card:hover .work-arrow {
  background: var(--accent); color: #000; border-color: var(--accent);
  transform: rotate(-45deg);
}

/* testimonials */
.test-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.test-card {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 28px 24px; background: var(--bg);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.test-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.test-q { font-size: 17px; line-height: 1.5; letter-spacing: -0.02em; font-weight: 500; margin: 0 0 20px; }
.test-a { display: flex; align-items: center; gap: 12px; }
.test-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; color: #000; font-weight: 700; font-size: 13px;
}
.test-meta { font-size: 13px; }
.test-meta strong { display: block; font-weight: 600; }
.test-meta span { color: var(--mute); font-size: 12px; }

/* contact */
.contact-wrap {
  max-width: 720px; margin: 0 auto;
  border: 1px solid var(--border2); border-radius: 18px;
  padding: 28px 22px;
  background: linear-gradient(180deg, var(--panel), var(--bg));
  position: relative; overflow: hidden;
}
.contact-wrap::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, var(--glow), transparent 60%);
  pointer-events: none;
}
.form { display: grid; gap: 12px; position: relative; }
.form .row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.field input, .field textarea {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; color: var(--text); font-size: 15px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.field input::placeholder, .field textarea::placeholder { color: var(--mute2); }
.form button[type=submit] {
  background: var(--text); color: #08080b; border: none;
  padding: 14px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.2s var(--ease); margin-top: 4px;
}
.form button[type=submit]:hover:not(:disabled) {
  background: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px var(--glow);
}
.form button[type=submit]:disabled { opacity: 0.7; cursor: default; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 28px 20px; margin-top: 32px; }
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--mute); text-align: center;
}

/* ---------- ANIMATIONS ---------- */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.35); }
  50% { box-shadow: 0 0 18px 2px rgba(167, 139, 250, 0.15); }
}
@keyframes glow-drift {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.9; }
  50% { transform: translateX(-48%) translateY(18px); opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.float { animation: float 6s ease-in-out infinite; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.stagger > * { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.stagger.in > * { opacity: 1; transform: translateY(0); }
.stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.12s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.16s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.20s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.24s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.28s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .stagger > * { opacity: 1; transform: none; }
}

/* ---------- TABLET ---------- */
@media (min-width: 640px) {
  .nav-inner { padding: 16px 28px; }
  .hero { padding: 72px 28px 64px; }
  .hero-ctas { flex-direction: row; justify-content: center; max-width: none; }
  .section { padding: 96px 28px; }
  .section-head { margin-bottom: 60px; }
  .sub { font-size: 18px; }
  .section-sub { font-size: 17px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .what-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .test-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .form .row { grid-template-columns: 1fr 1fr; }
  .contact-wrap { padding: 40px 32px; }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- DESKTOP ---------- */
@media (min-width: 960px) {
  .nav-inner { padding: 16px 32px; }
  .nav-links {
    display: flex; gap: 28px; font-size: 14px; color: var(--mute);
  }
  .nav-links a { transition: color 0.15s; }
  .nav-links a:hover { color: var(--text); }
  .nav-cta { display: inline-flex; padding: 8px 14px; font-size: 13px; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }

  .hero { padding: 100px 32px 80px; }
  .section { padding: 120px 32px; }
  .section-head { margin-bottom: 72px; }
  .eyebrow { margin-bottom: 28px; }
  .h1 { margin-bottom: 24px; }
  .sub { font-size: 19px; margin-bottom: 36px; }

  .why-grid { grid-template-columns: repeat(4, 1fr); border-radius: 16px; }
  .why-item { padding: 36px 28px; }
  .why-t { font-size: 17px; }
  .what-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .what-card { padding: 32px 28px; }
  .work-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; aspect-ratio: auto; }
  .work-card { aspect-ratio: 1.2; }
  .test-grid { gap: 20px; }
  .test-card { padding: 36px 32px; }
  .test-q { font-size: 20px; line-height: 1.45; margin-bottom: 24px; }
  .contact-wrap { padding: 48px; border-radius: 20px; }
  .footer { padding: 40px 32px; }
}
