:root {
  --bg: #060608;
  --bg-elev: #0e1015;
  --bg-elev-2: #12151b;
  --border: #1e2128;
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f5f6f8;
  --muted: #8b8f99;
  --accent: #2aabee;
  --accent-2: #8a5cff;
  --accent-dim: rgba(42, 171, 238, 0.12);
  --wrap: 1120px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Ambient background: gradient mesh + dot grid + grain ─ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(640px circle at 12% -8%, rgba(42, 171, 238, 0.20), transparent 60%),
    radial-gradient(560px circle at 92% 6%, rgba(138, 92, 255, 0.16), transparent 60%),
    radial-gradient(700px circle at 50% 115%, rgba(42, 171, 238, 0.08), transparent 60%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px;
  mask-image: radial-gradient(1100px circle at 50% 0%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(1100px circle at 50% 0%, black 0%, transparent 75%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; }
em { font-style: normal; color: var(--accent); }

.grad-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Reveal-on-scroll ───────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  margin-right: auto; white-space: nowrap; flex-shrink: 0;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.nav { display: flex; gap: 26px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color .15s; }
.nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-weight: 600; font-size: 14px;
  padding: 10px 18px; transition: all .15s; border: 1px solid transparent;
  white-space: nowrap; font-family: var(--font-body);
}
.btn-small { padding: 8px 14px; font-size: 13px; }
.btn-large { padding: 15px 30px; font-size: 15px; }
.btn-primary {
  background: linear-gradient(100deg, var(--accent), #59c3f5);
  color: #04141d;
  box-shadow: 0 8px 24px -8px rgba(42, 171, 238, 0.5);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.03); color: var(--text); border-color: var(--border-soft); }
.btn-ghost:hover { border-color: #3a3f4a; background: rgba(255,255,255,0.05); }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: 96px 0 100px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #35d07f; box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.18);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
}
.tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 50px); margin-bottom: 20px; max-width: 580px;
}
.hero-sub { color: var(--muted); font-size: 17px; max-width: 460px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Phone mock */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
  border: 1px solid var(--border-soft);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.phone::before {
  content: "";
  position: absolute; inset: -1px;
  padding: 1px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(42,171,238,0.35), transparent 40%, rgba(138,92,255,0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.phone-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
}
.phone-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), rgba(138,92,255,0.16));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.phone-title { display: flex; flex-direction: column; line-height: 1.3; }
.phone-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.phone-status { font-size: 11.5px; color: var(--accent); display: flex; align-items: center; gap: 5px; }
.phone-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #35d07f; }
.phone-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  position: relative;
  background: rgba(255,255,255,0.035); border: 1px solid var(--border-soft);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 12px 16px;
  font-size: 13.5px; color: #e4e6ea;
  max-width: 92%;
  backdrop-filter: blur(6px);
}
.bubble-tag {
  display: block; font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent);
  margin-bottom: 5px;
}
.bubble-time {
  position: absolute; right: 10px; bottom: 6px;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
}

/* ── Work / services — bento grid ──────────────────── */
.work { padding: 90px 0; }
.section-tag {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  margin-bottom: 32px;
}
.bento {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.card {
  position: relative;
  grid-column: span 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 26px 26px;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 171, 238, 0.35);
  background: linear-gradient(180deg, rgba(42,171,238,0.06), rgba(255,255,255,0.01));
}
.card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(42,171,238,0.16), rgba(138,92,255,0.12));
  border: 1px solid var(--border-soft);
}
.card-num {
  position: absolute; top: 24px; right: 26px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; flex: 1; margin-bottom: 20px; }
.card-link {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.card-link span { color: var(--accent); }
.card:hover .card-link span { text-decoration: underline; }

/* ── Process — connected timeline ─────────────────── */
.process { padding: 90px 0; }
.timeline {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.timeline::before {
  content: "";
  position: absolute; top: 15px; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft) 15%, var(--border-soft) 85%, transparent);
}
.step { position: relative; }
.step-dot {
  position: relative; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.step h4 { font-size: 16px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; max-width: 280px; }

/* ── CTA ────────────────────────────────────────────── */
.cta { padding: 90px 0 110px; }
.cta-panel {
  position: relative;
  max-width: 720px; margin: 0 auto; text-align: center;
  padding: 64px 40px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.cta-panel::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at 50% 0%, rgba(42,171,238,0.18), transparent 70%);
}
.cta h2 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 18px; }
.prompt-line {
  font-family: var(--font-mono); font-size: 14px; color: var(--muted);
  margin-bottom: 30px;
}
.prompt-line span { color: var(--accent); margin-right: 6px; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border-soft); padding: 28px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13.5px;
}
.footer-brand { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 8px; }
  .bento { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 26px; }
  .timeline::before { display: none; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .header-inner .btn { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--border-soft);
    padding: 8px 24px 16px;
  }
  .site-header.nav-open .nav a { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .site-header.nav-open .nav a:last-child { border-bottom: none; }
  .site-header.nav-open .header-inner .btn { display: inline-flex; }

  .hero { padding: 60px 0 64px; }
  .hero-actions .btn { width: 100%; }
  .cta-panel { padding: 48px 26px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
}
