/* ===== Fonts ===== */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-700.woff2') format('woff2');
}

/* ===== Design tokens ===== */
:root {
  --ink: #12121a;
  --ink-soft: #1b1b28;
  --ink-softer: #23233333;
  --card: #1a1a26;
  --border: rgba(250, 250, 250, 0.1);
  --blue: #2e5eff;
  --blue-bright: #5b7fff;
  --cyan: #00e5c7;
  --white: #fafafa;
  --text: #fafafa;
  --text-muted: rgba(250, 250, 250, 0.68);
  --text-faint: rgba(250, 250, 250, 0.45);

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --max-width: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

button {
  font-family: inherit;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-bright);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 26, 0.96);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--white);
}

.logo svg {
  height: 32px;
  width: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  inset: 65px 0 0 0;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-menu a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-menu a[aria-current="page"] {
  color: var(--cyan);
}

.nav-menu .btn {
  margin-top: 8px;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    inset: auto;
    flex-direction: row;
    background: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    gap: 36px;
  }

  .nav-menu a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
  }

  .nav-menu a:hover,
  .nav-menu a[aria-current="page"] {
    color: var(--white);
  }

  .nav-menu .btn {
    margin-top: 0;
  }
}

/* ===== Hero ===== */
.hero {
  padding: 72px 0 64px;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  max-width: 16ch;
}

.hero .lede {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== Pulse line divider ===== */
.pulse-line {
  width: 100%;
  height: 48px;
  margin: 8px 0;
  color: var(--blue);
  opacity: 0.9;
}

.js .pulse-line path {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-line.in-view path {
  stroke-dashoffset: 0;
}

/* ===== Sections ===== */
.section {
  padding: 64px 0;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 40px;
}

.section-head .kicker {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.section-head p {
  color: var(--text-muted);
}

.section-alt {
  background: var(--ink-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ===== Cards / Grids ===== */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(46, 94, 255, 0.15);
  color: var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-weight: 700;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Portfolio ===== */
.work-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

.work-card .tag {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 229, 199, 0.14);
  color: var(--cyan);
}

.work-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0;
}

.work-card .desc {
  color: var(--text-muted);
  margin-bottom: 0;
  flex-grow: 1;
}

.work-card .standout {
  font-size: 0.9rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.work-card .work-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-bright);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-card .work-link:hover {
  color: var(--cyan);
}

.work-card .case-study-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-faint);
}

/* ===== CTA banner ===== */
.cta-banner {
  background: linear-gradient(135deg, rgba(46, 94, 255, 0.18), rgba(0, 229, 199, 0.12));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px 32px;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  max-width: 24ch;
  margin: 0 auto 16px;
}

.cta-banner p {
  color: var(--text-muted);
  max-width: 48ch;
  margin: 0 auto 28px;
}

/* ===== Process steps (About) ===== */
.steps {
  counter-reset: step;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  border-left: 2px solid var(--blue);
  padding-left: 20px;
}

.step .step-num {
  counter-increment: step;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cyan);
  display: block;
  margin-bottom: 8px;
}

.step .step-num::before {
  content: '0' counter(step);
}

.step h3 {
  font-size: 1.1rem;
}

.step p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Contact ===== */
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  max-width: 720px;
}

.contact-card .location {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  margin-top: 24px;
}

.contact-checklist {
  margin: 24px 0 32px;
  display: grid;
  gap: 10px;
}

.contact-checklist li {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
}

.contact-checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--cyan);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner .logo svg {
  height: 26px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-note {
  width: 100%;
  color: var(--text-faint);
  font-size: 0.82rem;
  margin-top: 8px;
}

/* ===== Scroll reveal =====
   Hidden state only applies once JS confirms it can reveal elements
   (html.js, set by an inline script) — without JS, content stays visible. */
.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .pulse-line path {
    transition: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}
