/* =========================================================
   Louis Bates · louisbates.dev
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg:            #0a0b0d;
  --bg-elev:       #0f1115;
  --surface:       #111418;
  --surface-2:     #161a20;
  --border:        #1f2329;
  --border-strong: #2a2f37;
  --text:          #e8eaed;
  --text-muted:    #9aa0a6;
  --text-dim:      #6b7079;
  --accent:        #3b82f6;
  --accent-hover:  #60a5fa;
  --accent-soft:   rgba(59, 130, 246, 0.14);
  --accent-glow:   rgba(59, 130, 246, 0.22);
  --emerald:       #10b981;
  --emerald-soft:  rgba(16, 185, 129, 0.18);

  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 12px 30px -18px rgba(0,0,0,0.6);

  --container-max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* overflow-x: clip is sticky-safe; older browsers fall back to hidden */
  overflow-x: clip;
}
html { scroll-padding-top: 84px; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }

/* Background subtle grain via radial gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(59,130,246,0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 18%, rgba(59,130,246,0.05), transparent 60%);
}

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  font-variation-settings: "opsz" 96;
}
h1 { font-size: clamp(2.75rem, 1.7rem + 4.7vw, 5.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2.125rem, 1.4rem + 2.9vw, 3.5rem); letter-spacing: -0.03em; line-height: 1.14; }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.015em; }

.eyebrow,
.section-label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.section-label { color: var(--accent); }

.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(1.75rem, 2.5vw + 1rem, 3.5rem);
}
/* Restore generous breathing room on mobile — only laptop/desktop gets the tight spacing */
@media (max-width: 720px) {
  .section {
    padding-block: clamp(2.75rem, 3.5vw + 1.5rem, 5rem);
  }
}

.section-header {
  max-width: 56ch;
  margin-bottom: clamp(1.75rem, 2.5vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
@media (max-width: 720px) {
  .section-header {
    margin-bottom: clamp(2rem, 3vw, 3.5rem);
    gap: 0.9rem;
  }
}
.section-lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--emerald));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 250ms var(--ease), border-color 250ms var(--ease), backdrop-filter 250ms var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 11, 13, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
          backdrop-filter: saturate(140%) blur(8px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.brand-mark {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  width: 32px; height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #14171c, #0e1116);
  border: 1px solid var(--border-strong);
  color: var(--accent);
}
.brand-name { font-size: 0.95rem; }

.primary-nav ul {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
}
.primary-nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.4rem 0.1rem;
  position: relative;
  transition: color 180ms var(--ease);
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--text); }
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease);
}
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after { transform: scaleX(1); }

.header-cta { white-space: nowrap; }

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.icon-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease), background-color 180ms var(--ease);
}
.icon-link:hover,
.icon-link:focus-visible {
  color: var(--accent-hover);
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.icon-link svg { display: block; }

@media (max-width: 720px) {
  .primary-nav { display: none; }
  .brand-name { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), color 180ms var(--ease);
  will-change: transform;
}
.btn-sm { padding: 0.65rem 1.05rem; font-size: 0.875rem; }
.btn-lg { padding: 1.1rem 1.65rem; font-size: 1rem; }
.btn-arrow { margin-left: 0.25rem; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 5vw + 2rem, 7rem) clamp(1.5rem, 2vw + 1rem, 3rem);
}
/* Hero: restore generous bottom padding on mobile so content has space */
@media (max-width: 720px) {
  .hero {
    padding-block: clamp(4.5rem, 7vw + 2.5rem, 9rem) clamp(2.5rem, 3.5vw + 1.5rem, 5rem);
  }
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: relative;
  z-index: 2;
  transform: translateY(var(--hero-shift, 0));
  opacity: var(--hero-fade, 1);
  will-change: transform, opacity;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 2;
  transform: translateY(var(--hero-shift, 0));
  opacity: var(--hero-fade, 1);
  will-change: transform, opacity;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
  position: relative;
}
.hero-text::before {
  /* Strong dark stage so text always reads crisply against the ribbon */
  content: "";
  position: absolute;
  inset: -4rem -6rem -2rem -4rem;
  background:
    radial-gradient(ellipse at 35% 45%, rgba(10, 11, 13, 0.88), rgba(10, 11, 13, 0.4) 55%, rgba(10, 11, 13, 0) 85%);
  z-index: -1;
  pointer-events: none;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hero-stat-num {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  font-variation-settings: "opsz" 144;
}
.hero-stat-num em {
  font-style: italic;
  color: var(--accent-hover);
}
.hero-stat-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.hero-3d {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 320px;
  max-height: 560px;
  isolation: isolate;
}
.hero-3d canvas {
  width: 100%;
  height: 100%;
  display: block;
  /* Soft edge safety net — only the outer 10% fades, shapes mostly fully opaque */
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at center, black 90%, transparent 100%);
          mask-image: radial-gradient(ellipse 100% 100% at center, black 90%, transparent 100%);
}
.hero-3d::before {
  /* Soft emerald glow behind the 3D scene */
  content: "";
  position: absolute;
  inset: 8% 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0) 60%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-3d {
    order: 2;
    min-height: 280px;
    max-height: 340px;
    aspect-ratio: auto;
  }
}

/* Hide 3D scene entirely on mobile — text-only hero, ribbon stays */
@media (max-width: 720px) {
  .hero-3d { display: none; }
}

.hero-ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
  display: block;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}
.aurora-1 {
  width: 760px;
  height: 760px;
  top: -260px;
  right: -180px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.55), rgba(59, 130, 246, 0) 70%);
  opacity: 0.55;
  animation: aurora-drift-1 22s ease-in-out infinite alternate;
}
.aurora-2 {
  width: 600px;
  height: 600px;
  bottom: -220px;
  left: -160px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.32), rgba(96, 165, 250, 0) 70%);
  opacity: 0.45;
  animation: aurora-drift-2 28s ease-in-out infinite alternate;
}
@keyframes aurora-drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-90px, 70px, 0) scale(1.18); }
}
@keyframes aurora-drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(70px, -50px, 0) scale(1.12); }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  align-self: flex-start;
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #6ee7a4;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  50%      { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

.hero-title {
  max-width: 19ch;
  margin-top: 0.5rem;
  font-size: clamp(2.75rem, 1.7rem + 4.7vw, 5.5rem);
  font-variation-settings: "opsz" 144;
}
.hero-accent {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-hover);
  font-variation-settings: "opsz" 144;
}
.hero-subhead {
  max-width: 46ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.375rem);
  color: var(--text-muted);
  line-height: 1.5;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-text { display: flex; flex-direction: column; gap: 1.25rem; }
.about-text p { color: var(--text-muted); max-width: 56ch; line-height: 1.65; }
.about-text h2 { margin-bottom: 0.5rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.chips li {
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}
.chips a {
  color: var(--accent-hover);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease);
}
.chips a:hover { border-bottom-color: var(--accent-hover); }

.about-photo {
  position: relative;
  aspect-ratio: 800 / 878;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  max-width: 440px;
  width: 100%;
}
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  border-radius: inherit;
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 1.5vw, 1.5rem);
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 1.4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: var(--shadow-card);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(59,130,246,0.0), rgba(59,130,246,0.0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  transition: background 260ms var(--ease);
}
.service-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 30px 60px -28px rgba(0,0,0,0.8), 0 0 0 1px rgba(59,130,246,0.22), 0 0 60px -20px rgba(16, 185, 129, 0.18);
}
.service-card:hover::before {
  background: linear-gradient(135deg, rgba(59,130,246,0.5), rgba(16, 185, 129, 0.28) 60%, rgba(59,130,246,0));
}
.service-card:hover .service-index {
  color: var(--accent-hover);
  opacity: 1;
}
.service-index {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  opacity: 0.6;
  transition: color 380ms var(--ease-out), opacity 380ms var(--ease-out);
}
.service-head { display: flex; flex-direction: column; gap: 0.4rem; }
.service-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.service-meta .price { color: var(--accent-hover); font-weight: 500; }
.meta-sep { color: var(--text-dim); }
.service-desc { color: var(--text-muted); line-height: 1.65; }

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
}
.feature-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Secondary plan detail cards (quoted separately / good to know) */
.plan-extra { margin-top: clamp(1rem, 1.5vw, 1.5rem); }
.plan-extra .service-card { gap: 0.85rem; }
.plan-extra .feature-list { margin-top: 0.4rem; }

@media (max-width: 720px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ---------- Selected work ---------- */
.work .section-header { max-width: 64ch; }
.work-subtitle {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.work-subtitle a { color: var(--accent-hover); border-bottom: 1px solid transparent; transition: border-color 180ms var(--ease); }
.work-subtitle a:hover { border-bottom-color: var(--accent-hover); }
.work-description { color: var(--text-muted); max-width: 56ch; line-height: 1.65; }

.work-shots {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}
.work-shot {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 380ms var(--ease-out), border-color 380ms var(--ease-out), box-shadow 380ms var(--ease-out);
  box-shadow: 0 10px 40px -22px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.work-shot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0), rgba(59, 130, 246, 0.5) 50%, rgba(16, 185, 129, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 380ms var(--ease-out);
  pointer-events: none;
  z-index: 2;
}
.work-shot:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 70px -30px rgba(0,0,0,0.85), 0 0 0 1px rgba(59, 130, 246, 0.15);
}
.work-shot:hover::after { opacity: 1; }
.work-shot picture {
  display: block;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 700ms var(--ease-out);
}
.work-shot:hover img {
  transform: scale(1.035);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.95rem;
  background: linear-gradient(180deg, #14171c, #0f1216);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.browser-chrome .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2f37;
}
.browser-chrome .dot:nth-child(1) { background: #4a3539; }
.browser-chrome .dot:nth-child(2) { background: #4a4435; }
.browser-chrome .dot:nth-child(3) { background: #354a3a; }
.browser-url {
  margin-left: 0.65rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-shot-1 { grid-column: 1 / -1; }
.work-shot-1 picture { aspect-ratio: 1600 / 720; max-height: 520px; }
.work-shot-2 { grid-column: 1 / span 6; }
.work-shot-3 { grid-column: 7 / -1; }
.work-shot-2 picture, .work-shot-3 picture { aspect-ratio: 1600 / 903; }

@media (max-width: 900px) {
  .work-shot-2, .work-shot-3 { grid-column: 1 / -1; }
  .work-shot-1 picture { max-height: 360px; }
}

.testimonial {
  /* Mobile (overridden below): more space; desktop: tight */
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  padding: clamp(1.5rem, 2vw, 2rem);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.testimonial p {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);
  font-style: italic;
  color: var(--text);
  line-height: 1.4;
  font-variation-settings: "opsz" 60;
}
.testimonial footer {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.testimonial cite { font-style: normal; }
@media (max-width: 720px) {
  .testimonial { margin-top: clamp(2rem, 4vw, 3rem); }
}

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.5vw, 1.5rem);
  counter-reset: step;
}
.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 220ms var(--ease), transform 220ms var(--ease);
}
.process-step:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.step-num {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.process-step h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.process-step p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.55; }

@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact / CTA ---------- */
.contact { padding-block: clamp(2.25rem, 3vw + 1rem, 4.5rem); }
@media (max-width: 720px) {
  .contact { padding-block: clamp(3.5rem, 5vw + 1.5rem, 7rem); }
}
.cta-block {
  position: relative;
  isolation: isolate;
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
  padding: clamp(3rem, 4vw + 1rem, 5rem) clamp(1.5rem, 3vw, 3rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 20, 24, 0.7), rgba(22, 26, 32, 0.4));
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.8);
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.4), rgba(16, 185, 129, 0.15) 50%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.cta-glow {
  position: absolute;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.35), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: -1;
}
.cta-status {
  margin-bottom: 1.5rem;
  align-self: center;
}
.cta-title {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  font-variation-settings: "opsz" 144;
}
.cta-lead {
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 2.25rem;
}
.cta-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.cta-actions .btn { white-space: nowrap; }
.cta-trust {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.cta-trust-sep { color: var(--border-strong); }

@media (max-width: 560px) {
  .cta-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .cta-trust { flex-direction: column; gap: 0.4rem; }
  .cta-trust-sep { display: none; }
}

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 4vw + 1rem, 5rem); }
.legal .container { max-width: 720px; }
.legal h1 {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
}
.legal h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.legal p, .legal li { color: var(--text-muted); line-height: 1.7; }
.legal p + p { margin-top: 1rem; }
.legal a {
  color: var(--accent-hover);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms var(--ease);
}
.legal a:hover { border-bottom-color: var(--accent-hover); }
.legal-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-list li::marker { color: var(--accent); }
.legal-back { margin-top: 3rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
  margin-top: 1rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.copyright {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 180ms var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-links a:hover,
.footer-links a:focus-visible { color: var(--accent-hover); }
.footer-link-with-icon svg { opacity: 0.85; transition: opacity 180ms var(--ease); }
.footer-link-with-icon:hover svg { opacity: 1; }

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* More dramatic reveal for section headings */
.section-header [data-reveal],
.section-header.is-reveal-group [data-reveal] {
  transform: translateY(32px);
  transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out);
}

/* Stagger service cards as they enter */
.services-grid .service-card[data-reveal] { transition-delay: 0ms; }
.services-grid .service-card[data-reveal]:nth-child(2) { transition-delay: 90ms; }
.services-grid .service-card[data-reveal]:nth-child(3) { transition-delay: 180ms; }
.services-grid .service-card[data-reveal]:nth-child(4) { transition-delay: 270ms; }

/* Stagger process steps */
.process-grid .process-step[data-reveal]:nth-child(1) { transition-delay: 0ms; }
.process-grid .process-step[data-reveal]:nth-child(2) { transition-delay: 80ms; }
.process-grid .process-step[data-reveal]:nth-child(3) { transition-delay: 160ms; }
.process-grid .process-step[data-reveal]:nth-child(4) { transition-delay: 240ms; }
.process-grid .process-step[data-reveal]:nth-child(5) { transition-delay: 320ms; }
.process-grid .process-step[data-reveal]:nth-child(6) { transition-delay: 400ms; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 4px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .aurora { animation: none; }
  .pulse-dot { animation: none; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
  .hero-ribbon { display: none; }
  .scroll-progress { display: none; }
  .hero-inner { transform: none !important; opacity: 1 !important; }
}

/* Ribbon stays visible on mobile — it's part of the brand atmosphere */
