:root {
  --ink: #0e1116;
  --ink-soft: #4a5160;
  --paper: #f5f3ee;
  --surface: #ffffff;
  --line: #e2ded5;
  --accent: #ff5a1f;
  --accent-dark: #d94410;
  --radius: 16px;
  --font-display: "Space Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.3rem; }

p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; }

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

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 18px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 600; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-small { padding: 9px 20px; font-size: 0.95rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 238, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 0.97rem; color: var(--ink-soft); transition: color .2s; }
.site-nav a:not(.btn):hover { color: var(--ink); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 24px; font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; padding: 0 40px 56px 0; }

.browser {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(14, 17, 22, 0.35);
  overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser-bar span {
  margin-left: 10px; padding: 3px 12px; border-radius: 999px; background: var(--paper);
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-soft);
}
.browser-body { display: grid; grid-template-columns: 64px 1fr; min-height: 260px; }
.ui-side { border-right: 1px solid var(--line); padding: 18px 14px; display: grid; gap: 12px; align-content: start; }
.ui-side b { height: 10px; border-radius: 5px; background: var(--line); }
.ui-side b:first-child { background: var(--ink); }
.ui-main { padding: 20px; display: grid; gap: 16px; align-content: start; }
.ui-title { width: 45%; height: 14px; border-radius: 7px; background: var(--ink); }
.ui-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ui-cards div { height: 52px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.ui-cards div:first-child { background: var(--accent); border-color: var(--accent); }
.ui-chart { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.ui-chart s { flex: 1; border-radius: 6px 6px 0 0; background: var(--line); transform-origin: bottom; animation: grow 1s cubic-bezier(.2,.8,.2,1) both; }
.ui-chart s:nth-child(1) { height: 35%; animation-delay: .1s; }
.ui-chart s:nth-child(2) { height: 50%; animation-delay: .18s; }
.ui-chart s:nth-child(3) { height: 42%; animation-delay: .26s; }
.ui-chart s:nth-child(4) { height: 68%; animation-delay: .34s; }
.ui-chart s:nth-child(5) { height: 60%; animation-delay: .42s; }
.ui-chart s:nth-child(6) { height: 84%; animation-delay: .5s; }
.ui-chart s:nth-child(7) { height: 100%; animation-delay: .58s; background: var(--ink); }

@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.phone {
  position: absolute; right: 0; bottom: 0; width: 150px;
  background: var(--ink); border-radius: 26px; padding: 12px 12px 16px;
  display: grid; gap: 9px;
  box-shadow: 0 30px 50px -20px rgba(14, 17, 22, 0.55);
  animation: float 6s ease-in-out infinite;
}
.phone-notch { width: 44px; height: 6px; border-radius: 3px; background: #2a2f3a; margin: 0 auto 6px; }
.phone-title { width: 60%; height: 9px; border-radius: 5px; background: #fff; }
.phone-hero { height: 70px; border-radius: 12px; background: var(--accent); }
.phone-row { height: 9px; border-radius: 5px; background: #2a2f3a; }
.phone-row.short { width: 55%; }
.phone-cta { height: 26px; border-radius: 13px; background: #fff; margin-top: 4px; }

@keyframes float { 50% { transform: translateY(-10px); } }

.badge-deploy {
  position: absolute; left: -14px; bottom: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  box-shadow: 0 12px 24px -12px rgba(14, 17, 22, 0.3);
}
.badge-deploy .dot { width: 8px; height: 8px; border-radius: 50%; background: #1faa59; box-shadow: 0 0 0 4px rgba(31, 170, 89, 0.18); }

/* Stats */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 36px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat > span { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 0.95rem; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 56px; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--ink); transform: translateY(-4px); box-shadow: 0 20px 40px -28px rgba(14, 17, 22, 0.4); }
.card-num { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--accent-dark); }
.card p { color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.tags li { font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }

/* Why */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px; }
.pillar h3 { font-size: 1.5rem; margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.pillar-icon { color: var(--accent); font-size: 1rem; }
.checks { display: grid; gap: 20px; }
.checks li { position: relative; padding-left: 34px; color: var(--ink-soft); }
.checks li strong { color: var(--ink); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 28px; border-top: 2px solid var(--ink); }
.step::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.step-time { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-dark); }
.step h3 { margin: 10px 0 10px; }
.step p { color: var(--ink-soft); font-size: 0.98rem; }

/* Stack marquee */
.stack { border-block: 1px solid var(--line); background: var(--surface); padding: 22px 0; overflow: hidden; }
.marquee { display: flex; width: max-content; }
.marquee-track { display: flex; flex-shrink: 0; animation: marquee 36s linear infinite; }
.marquee-track li { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; white-space: nowrap; padding-right: 28px; }
.marquee-track li::after { content: "/"; color: var(--accent); margin-left: 28px; }
.stack:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee { to { transform: translateX(-100%); } }

/* CTA */
.cta { background: var(--ink); color: #fff; padding: clamp(72px, 10vw, 136px) 0; }
.cta-inner { max-width: 820px; }
.cta .eyebrow { color: var(--accent); }
.cta h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.cta p:not(.eyebrow) { margin-top: 22px; color: #b3b9c6; font-size: 1.1rem; max-width: 36em; }
.cta-mail {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 40px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3.6vw, 2.5rem);
  color: #fff; text-decoration: none; padding-bottom: 6px;
  border-bottom: 3px solid var(--accent); transition: color .2s;
}
.cta-mail span { transition: transform .2s; }
.cta-mail:hover { color: var(--accent); }
.cta-mail:hover span { transform: translateX(8px); }

/* Footer */
.site-footer { padding: 28px 0; font-size: 0.92rem; color: var(--ink-soft); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer .brand-name { font-size: 1.1rem; color: var(--ink); }
.site-footer a:not(.brand) { text-decoration: none; }
.site-footer a:not(.brand):hover { color: var(--accent-dark); }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .pillars { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 20px 24px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }
  .site-nav .btn { margin-top: 20px; padding: 14px 26px; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 26px; }
  .section-head { margin-bottom: 40px; }
  .hero-visual { padding-right: 24px; }
  .phone { width: 124px; }
  .badge-deploy { left: 0; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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