:root {
  --black:  oklch(32% 0.13 262);
  --navy:   oklch(21% 0.12 264);
  --lime:   oklch(96% 0.33 123);
  --sky:    oklch(79% 0.08 215);
  --white:  oklch(97% 0.005 85);
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--white); font-family: 'Rubik', sans-serif; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 48px; transition: background 0.4s, padding 0.4s;
}
nav.scrolled {
  background: oklch(12% 0.09 264 / 0.94); padding: 14px 48px;
  border-bottom: 1px solid oklch(97% 0.005 85 / 0.07);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav-logo-wrap { width: 200px; height: 40px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-logo { width: 200px; height: 200px; object-fit: contain; flex-shrink: 0; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: oklch(97% 0.005 85 / 0.55); transition: color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; width: 100%; height: 1px;
  background: var(--lime); transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav-links a:hover { color: var(--lime); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 9px 20px; border: 1.5px solid var(--lime); color: var(--lime);
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--lime); color: var(--black); }
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; z-index: 201; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--white);
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.svc-hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 48px 0; position: relative; overflow: hidden;
}
.svc-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04); transition: transform 8s var(--ease);
}
.svc-hero:hover .svc-hero-bg { transform: scale(1); }
.svc-hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, oklch(12% 0.09 264 / 0.97) 0%, oklch(12% 0.09 264 / 0.55) 45%, oklch(12% 0.09 264 / 0.35) 100%),
    linear-gradient(135deg, oklch(21% 0.12 264 / 0.6) 0%, transparent 55%);
  pointer-events: none;
}
.svc-hero-accent {
  position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: linear-gradient(135deg, transparent 40%, oklch(96% 0.33 123 / 0.06) 100%);
  pointer-events: none; z-index: 1;
}
.svc-hero-inner {
  position: relative; z-index: 2;
  padding-bottom: 48px; max-width: 1200px; width: 100%; margin: 0 auto;
}
.svc-back {
  position: absolute; top: 112px; left: 48px; z-index: 3;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: oklch(97% 0.005 85 / 0.55); display: flex; align-items: center; gap: 8px;
  transition: color 0.2s;
  opacity: 0; animation: fadeUp 0.6s var(--ease) 0.1s forwards;
}
.svc-back:hover { color: var(--lime); }
.svc-eyebrow {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.2s forwards;
}
.svc-eyebrow-line { width: 40px; height: 2px; background: var(--lime); }
.svc-eyebrow span { font-size: 11px; font-weight: 700; letter-spacing: 3px; color: var(--lime); text-transform: uppercase; }
.svc-heading {
  font-size: clamp(48px, 7.5vw, 100px); font-weight: 900; font-style: italic;
  line-height: 0.9; letter-spacing: -3px; color: var(--white);
  opacity: 0; animation: fadeUp 0.8s var(--ease) 0.35s forwards;
}
.svc-heading em { color: var(--lime); font-style: italic; }
.svc-tagline {
  margin-top: 24px; font-size: 18px; color: oklch(97% 0.005 85 / 0.65);
  max-width: 520px; line-height: 1.6;
  opacity: 0; animation: fadeUp 0.8s var(--ease) 0.5s forwards;
}
.svc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  margin-top: 56px; border-top: 1px solid oklch(97% 0.005 85 / 0.12);
  opacity: 0; animation: fadeUp 0.8s var(--ease) 0.65s forwards;
}
.svc-stat {
  padding: 28px 24px 32px;
  background: oklch(12% 0.09 264 / 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid oklch(97% 0.005 85 / 0.06);
}
.svc-stat:last-child { border-right: none; }
.svc-stat-value {
  font-size: clamp(28px, 3.5vw, 44px); font-weight: 900; font-style: italic;
  color: var(--lime); line-height: 1; letter-spacing: -1px;
}
.svc-stat-label {
  margin-top: 8px; font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: oklch(97% 0.005 85 / 0.45);
}

@keyframes fadeUp { to { opacity: 1; transform: none; } }
.svc-eyebrow, .svc-heading, .svc-tagline, .svc-stats { transform: translateY(30px); }
.svc-back { transform: translateY(-10px); }

/* DELIVERABLES */
.svc-deliverables {
  padding: 100px 48px; background: var(--black);
}
.svc-deliverables-inner { max-width: 1200px; margin: 0 auto; }
.deliverables-header { margin-bottom: 56px; max-width: 640px; }
.deliverables-label {
  font-size: 10px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase;
  color: var(--sky); margin-bottom: 16px;
}
.deliverables-title {
  font-size: clamp(32px, 4.5vw, 56px); font-weight: 900; font-style: italic;
  line-height: 1.0; letter-spacing: -1.5px; margin-bottom: 16px;
}
.deliverables-title em { color: var(--lime); font-style: italic; }
.deliverables-subtitle {
  font-size: 16px; color: oklch(97% 0.005 85 / 0.55); line-height: 1.7;
}
.deliverables-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
}
.deliverable-card {
  background: oklch(19% 0.11 264);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: background 0.25s, transform 0.25s var(--ease);
}
.deliverable-card:hover {
  background: oklch(22% 0.11 264);
  transform: translateY(-2px);
}
.deliverable-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: oklch(96% 0.33 123 / 0.08);
  border: 1px solid oklch(96% 0.33 123 / 0.2);
  color: var(--lime); flex-shrink: 0;
}
.deliverable-icon svg { width: 22px; height: 22px; }
.deliverable-title { font-size: 16px; font-weight: 700; color: var(--white); line-height: 1.3; }
.deliverable-desc { font-size: 13px; color: oklch(97% 0.005 85 / 0.45); line-height: 1.65; }

/* MID CTA */
.svc-mid-cta {
  background: var(--navy);
  padding: 72px 48px;
  border-top: 1px solid oklch(97% 0.005 85 / 0.07);
  border-bottom: 1px solid oklch(97% 0.005 85 / 0.07);
}
.svc-mid-cta-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
.svc-mid-cta-text h2 {
  font-size: clamp(28px, 3.5vw, 44px); font-weight: 900; font-style: italic;
  letter-spacing: -1.5px; line-height: 1.0; margin-bottom: 12px;
}
.svc-mid-cta-text h2 em { color: var(--lime); font-style: italic; }
.svc-mid-cta-text p { font-size: 15px; color: oklch(97% 0.005 85 / 0.5); max-width: 480px; line-height: 1.7; }
.svc-cta-btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 28px; border: 1.5px solid var(--lime); color: var(--lime);
  background: linear-gradient(to right, var(--navy) 50%, var(--black) 50%);
  background-size: 202% 100%; background-position: right;
  transition: gap 0.35s var(--ease), background-position 0.45s var(--ease);
}
.svc-cta-btn:hover { gap: 22px; background-position: left; }

/* GALLERY */
.svc-gallery { padding: 100px 48px; }
.svc-gallery-inner { max-width: 1200px; margin: 0 auto; }
.gallery-header { margin-bottom: 48px; max-width: 560px; }
.gallery-label {
  font-size: 10px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase;
  color: var(--lime); margin-bottom: 16px;
}
.gallery-title {
  font-size: clamp(36px, 5vw, 64px); font-weight: 900; font-style: italic;
  line-height: 0.95; letter-spacing: -2px; margin-bottom: 12px;
}
.gallery-title em { color: var(--lime); font-style: italic; }
.gallery-subtitle { font-size: 15px; color: oklch(97% 0.005 85 / 0.45); line-height: 1.7; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 180px;
  grid-auto-flow: dense; /* backfill holes left by spanning items */
  gap: 4px;
}
.gallery-item {
  position: relative; overflow: hidden;
  background: oklch(19% 0.11 264);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s;
}
.gallery-item:hover img { transform: scale(1.05); filter: brightness(1.08); }
.gallery-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(12% 0.09 264 / 0.5) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.35s;
  pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item-caption {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 1;
  padding: 16px 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: oklch(97% 0.005 85 / 0.85);
  transform: translateY(100%); transition: transform 0.35s var(--ease);
}
.gallery-item:hover .gallery-item-caption { transform: translateY(0); }
.gallery-item--feature { grid-column: span 7; grid-row: span 2; }
.gallery-item--tall   { grid-column: span 5; grid-row: span 2; }
.gallery-item--square { grid-column: span 4; grid-row: span 1; }
.gallery-item--wide   { grid-column: span 8; grid-row: span 1; }

/* FINAL CTA */
.svc-cta {
  background: var(--navy); padding: 80px 48px;
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
  border-top: 1px solid oklch(97% 0.005 85 / 0.07);
}
.svc-cta h2 {
  font-size: clamp(28px, 4vw, 52px); font-weight: 900; font-style: italic;
  letter-spacing: -1.5px; line-height: 1.0;
}
.svc-cta h2 em { color: var(--lime); font-style: italic; }
.svc-cta p { font-size: 15px; color: oklch(97% 0.005 85 / 0.5); max-width: 440px; line-height: 1.7; }

/* FOOTER */
footer {
  background: var(--navy); padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid oklch(97% 0.005 85 / 0.07);
}
footer span { font-size: 11px; color: oklch(97% 0.005 85 / 0.35); letter-spacing: 1px; }
.footer-logo-wrap {
  width: 140px; height: 28px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.footer-logo { width: 140px; height: 140px; object-fit: contain; flex-shrink: 0; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .deliverables-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--feature { grid-column: span 8; }
  .gallery-item--tall { grid-column: span 4; }
  .gallery-item--square { grid-column: span 6; }
  .gallery-item--wide { grid-column: span 12; }
}

@media (max-width: 768px) {
  html { -webkit-tap-highlight-color: transparent; }
  .nav-hamburger { display: flex; }
  nav {
    padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
    gap: 10px;
  }
  /* No backdrop-filter on mobile: it creates a containing block that breaks
     the fixed-position menu overlay (it would anchor to the nav bar). */
  nav.scrolled {
    padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
    background: oklch(12% 0.09 264 / 0.97);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav-logo-wrap { width: 132px; height: 36px; }
  .nav-logo { width: 132px; height: 132px; }
  .nav-cta { margin-left: auto; font-size: 10px; letter-spacing: 1.5px; padding: 8px 14px; white-space: nowrap; }
  .nav-links {
    position: fixed; inset: 0; z-index: 200;
    height: 100dvh;
    flex-direction: column;
    align-items: center; justify-content: center; gap: 28px;
    background: oklch(21% 0.12 264 / 0.97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    transform: translateY(-100%);
    opacity: 0; visibility: hidden;
    transition: transform 0.45s var(--ease), opacity 0.45s var(--ease), visibility 0s 0.45s;
    pointer-events: none;
  }
  .nav-links.open {
    transform: none; opacity: 1; visibility: visible;
    transition: transform 0.45s var(--ease), opacity 0.45s var(--ease), visibility 0s;
    pointer-events: auto;
  }
  .nav-links a {
    font-size: 28px; font-weight: 900; font-style: italic;
    letter-spacing: -0.5px; text-transform: uppercase; color: var(--white);
  }
  .nav-links a::after { display: none; }
  .svc-hero { padding: 0 24px 0; min-height: 100svh; }
  /* Keep the right edge of the image in frame; crop from the left */
  .svc-hero-bg { background-position: right center; }
  .svc-back { left: 24px; top: 84px; }
  .svc-hero-inner { padding-bottom: 28px; }
  .svc-heading { font-size: clamp(40px, 11vw, 64px); letter-spacing: -2px; }
  .svc-tagline { font-size: 16px; margin-top: 18px; }
  .svc-stats { grid-template-columns: repeat(2, 1fr); margin-top: 36px; }
  .svc-stat { padding: 18px 16px 22px; }
  .svc-stat:nth-child(2n) { border-right: none; }
  .svc-stat-value { font-size: clamp(26px, 8vw, 36px); }
  .svc-deliverables { padding: 64px 24px; }
  .deliverables-header { margin-bottom: 36px; }
  .deliverables-grid { grid-template-columns: 1fr; }
  .deliverable-card { flex-direction: row; align-items: flex-start; gap: 18px; padding: 22px 20px; flex-wrap: wrap; }
  .deliverable-icon { width: 40px; height: 40px; }
  .deliverable-icon svg { width: 20px; height: 20px; }
  .deliverable-card h3 { flex: 1; align-self: center; }
  .deliverable-desc { flex-basis: 100%; }
  .svc-mid-cta { padding: 52px 24px; }
  .svc-mid-cta-inner { grid-template-columns: 1fr; gap: 24px; }
  .svc-mid-cta .svc-cta-btn { justify-self: start; }
  .svc-gallery { padding: 64px 24px; }
  .gallery-header { margin-bottom: 32px; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    grid-auto-flow: dense; /* backfill holes left by 2-col spans */
    gap: 4px;
  }
  .gallery-item--feature { grid-column: span 2; grid-row: span 2; }
  .gallery-item--tall   { grid-column: span 1; grid-row: span 2; }
  .gallery-item--square { grid-column: span 1; grid-row: span 1; }
  .gallery-item--wide   { grid-column: span 2; grid-row: span 1; }
  /* Last photo always takes the full row — no orphan half-width cell */
  .gallery-grid .gallery-item:last-child { grid-column: span 2; }
  .svc-cta { padding: 64px 24px 72px; }
  .svc-cta .svc-cta-btn { width: 100%; max-width: 360px; justify-content: center; }
  footer { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); flex-direction: column; gap: 8px; text-align: center; }
}

/* Touch devices: hover reveals don't exist, keep captions visible */
@media (hover: none) {
  .gallery-item-caption {
    transform: none;
    background: linear-gradient(to top, oklch(12% 0.09 264 / 0.72), transparent);
    padding: 24px 14px 10px; font-size: 10px; letter-spacing: 1.5px;
  }
  .gallery-item::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .svc-hero-bg { transform: none !important; }
}

/* WCAG */
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
.nav-cta { min-height: 44px; display: inline-flex; align-items: center; }
.nav-hamburger { min-width: 44px; min-height: 44px; }
.svc-cta-btn { min-height: 44px; }
