/* ============ RESET & TOKENS ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0c;
  --bg-alt: #0d0d10;
  --surface: rgba(255, 255, 255, 0.024);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #6366f1;
  --accent-hover: #717afc;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
}

html { scroll-behavior: smooth; scroll-padding-top: 86px; }

/* no-JS fallback: never hide content if scripts fail */
.no-js .reveal { opacity: 1; transform: none; }

::selection { background: var(--accent); color: #fff; }

/* skip link */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 500; transition: top .2s;
}
.skip-link:focus { top: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* subtle single background glow */
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(99,102,241,0.13), transparent 70%),
    radial-gradient(700px 700px at 100% 0%, rgba(99,102,241,0.05), transparent 60%);
}

/* ============ LABELS ============ */
.label, .eyebrow, .step-no, .footer-h {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.label {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-hover); margin-bottom: 18px;
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  transition: background .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.logo-mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.logo-mark svg { width: 28px; height: 28px; display: block; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a:not(.nav-cta) { font-size: 15px; color: var(--text-2); transition: color .2s; position: relative; }
.nav-links a:not(.nav-cta):hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-cta {
  padding: 8px 18px; border-radius: 9px; color: var(--text) !important;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background .2s, border-color .2s;
}
.nav-cta:hover { background: rgba(255,255,255,0.08); border-color: var(--border-2); }

.nav-toggle { display: none; flex-direction: column; gap: 6px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 1.6px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { padding: 150px 0 100px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-text { max-width: 600px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; letter-spacing: 0.06em; color: var(--text-2);
  padding: 7px 15px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: 30px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-title { font-size: clamp(2.5rem, 4.6vw, 3.9rem); margin-bottom: 26px; }
.accent { color: var(--accent-hover); }
.hero-sub { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-2); max-width: 540px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--text-3); }
.hero-meta .dot { color: var(--border-2); }

/* hero visual: staggered phones */
.hero-visual { position: relative; height: 520px; display: flex; align-items: center; justify-content: center; }
.hero-glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.28), transparent 65%);
  filter: blur(20px);
}
.hero-phone { position: absolute; }
.hero-phone .device { width: 218px; }
.hero-phone-back { transform: translate(58px, -26px) rotate(4deg); opacity: 0.92; }
.hero-phone-front { transform: translate(-58px, 34px) rotate(-3deg); z-index: 2; }
.hero-phone-front .device { box-shadow: 0 50px 100px -34px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.4); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 10px; font-size: 15px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(99,102,241,0.7); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: var(--border-2); }
.btn-lg { height: 52px; padding: 0 30px; font-size: 16px; }

/* ============ SECTIONS ============ */
.section { padding: 100px 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-lead { color: var(--text-2); font-size: 1.08rem; margin-top: 16px; }

/* ============ WORK (products) ============ */
.work {
  display: grid; grid-template-columns: 0.85fr 1fr; gap: 64px; align-items: center;
  padding: 56px 0;
}
.work + .work { border-top: 1px solid var(--border); }
.work-reverse .work-media { order: 2; }
.work-media { display: flex; justify-content: center; }
.device {
  position: relative; padding: 11px; border-radius: 32px;
  background: linear-gradient(160deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  border: 1px solid var(--border-2); width: 250px;
  box-shadow: 0 40px 90px -32px rgba(0,0,0,0.85), 0 0 0 1px rgba(0,0,0,0.4);
  transition: transform .45s var(--ease);
}
.work:hover .device { transform: translateY(-8px); }
.device::before {
  content: ""; position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 78px; height: 18px; background: #0b0b0e; border-radius: 0 0 12px 12px; z-index: 2;
}
.device::after {
  content: ""; position: absolute; inset: 0; border-radius: 32px; pointer-events: none;
  background: radial-gradient(320px 220px at 50% -10%, rgba(99,102,241,0.22), transparent 70%);
}
.device img { width: 100%; border-radius: 22px; display: block; }
.work-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.work-icon { width: 44px; height: 44px; border-radius: 11px; }
.status {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px; font-weight: 500;
}
.status-live { color: #4ade80; background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.22); }
.status-soon { color: var(--accent-hover); background: var(--accent-soft); border: 1px solid rgba(99,102,241,0.3); }
.work-body h3 { font-size: 1.7rem; margin-bottom: 7px; }
.work-cat { font-size: 14px; color: var(--text-3); margin-bottom: 18px; }
.work-desc { color: var(--text-2); font-size: 1.02rem; margin-bottom: 22px; max-width: 460px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chips li { font-size: 13px; color: var(--text-2); padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.work-links { display: flex; gap: 26px; flex-wrap: wrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 500; color: var(--text); transition: color .2s; }
.link-arrow svg { width: 14px; height: 14px; transition: transform .2s; }
.link-arrow:hover { color: var(--accent-hover); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* next card */
.next-card {
  margin-top: 56px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 34px 36px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.next-card h3 { font-size: 1.35rem; margin: 14px 0 6px; }
.next-card p { color: var(--text-2); max-width: 520px; }
.next-card .link-arrow svg { width: 15px; height: 15px; }
.next-card .link-arrow:hover svg { transform: translateX(3px); }

/* ============ CAPABILITIES ============ */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cap { background: var(--bg-alt); padding: 34px 30px; transition: background .25s; }
.cap:hover { background: var(--surface); }
.cap-ico { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent-hover); margin-bottom: 20px; }
.cap-ico svg { width: 22px; height: 22px; }
.cap h3 { font-size: 1.15rem; margin-bottom: 10px; }
.cap p { color: var(--text-2); font-size: 0.97rem; }

/* ============ APPROACH ============ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step { padding-top: 26px; border-top: 1px solid var(--border-2); }
.step-no { font-size: 13px; color: var(--accent-hover); letter-spacing: 0.05em; }
.step h3 { font-size: 1.2rem; margin: 16px 0 9px; }
.step p { color: var(--text-2); font-size: 0.96rem; }

/* ============ STUDIO ============ */
.studio-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: center; }
.studio-inner h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 24px; }
.studio-text { color: var(--text-2); font-size: 1.05rem; margin-bottom: 18px; }
.studio-text strong { color: var(--text); font-weight: 600; }
.studio-inner .btn { margin-top: 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--bg); padding: 30px 26px; }
.fact-num { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin-bottom: 6px; }
.fact-amp { color: var(--text-3); font-weight: 400; }
.fact-label { font-size: 13.5px; color: var(--text-3); }

/* ============ CONTACT ============ */
.contact-inner { max-width: 640px; text-align: center; margin: 0 auto; }
.contact-inner .label { display: inline-block; }
.contact-inner h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.contact-lead { color: var(--text-2); font-size: 1.1rem; margin: 18px auto 34px; max-width: 500px; }
.contact-loc { margin-top: 22px; font-size: 14px; color: var(--text-3); }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--border); padding: 64px 0 36px; background: var(--bg-alt); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding-bottom: 48px; }
.footer-tag { color: var(--text-3); font-size: 14px; margin-top: 16px; max-width: 280px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 13px; }
.footer-h { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.footer-col a { font-size: 14.5px; color: var(--text-2); transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .hero { padding: 130px 0 70px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-text { max-width: 640px; }
  .hero-visual { height: 440px; margin: 0 auto; }
  .studio-inner { grid-template-columns: 1fr; gap: 44px; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 300px); height: 100vh;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding: 40px;
    background: rgba(12,12,15,0.97); backdrop-filter: blur(20px); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .35s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 20px; }
  .nav-toggle { display: flex; z-index: 101; }
  .hero { padding: 120px 0 60px; }
  .hero-visual { height: 400px; }
  .hero-phone .device { width: 188px; }
  .hero-phone-back { transform: translate(46px, -22px) rotate(4deg); }
  .hero-phone-front { transform: translate(-46px, 28px) rotate(-3deg); }
  .work, .work-reverse { grid-template-columns: 1fr; gap: 36px; }
  .work-media { order: -1 !important; }
  .work-body { text-align: left; }
  .next-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero-visual { height: 360px; }
  .hero-phone .device { width: 162px; }
  .hero-phone-back { transform: translate(40px, -20px) rotate(4deg); }
  .hero-phone-front { transform: translate(-40px, 24px) rotate(-3deg); }
  .section { padding: 72px 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

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