/* ============================================================
   JEEVES SOFTWARE DEVELOPMENT — STYLESHEET
   Dark blue theme · Inter + Syne · Mobile-first responsive
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* --- Dark backgrounds --- */
  --dark-bg:        #040C1E;
  --dark-bg-2:      #060F24;
  --dark-card:      #0A1428;
  --dark-border:    rgba(96, 165, 250, 0.12);
  --dark-border-hover: rgba(96, 165, 250, 0.35);

  /* --- Blue accent palette --- */
  --blue-600:       #2563EB;
  --blue-500:       #3B82F6;
  --blue-400:       #60A5FA;
  --blue-300:       #93C5FD;
  --blue-glow:      #0EA5E9;
  --blue-tint:      #EFF6FF;
  --blue-tint-2:    #DBEAFE;

  /* --- Light backgrounds --- */
  --white:          #FFFFFF;
  --gray-50:        #F8FAFC;
  --gray-100:       #F1F5F9;
  --gray-200:       #E2E8F0;

  /* --- Text --- */
  --text-dark:      #0F172A;
  --text-body:      #1E293B;
  --text-muted:     #64748B;
  --text-light:     #F1F5F9;
  --text-light-muted: #94A3B8;

  /* --- Status --- */
  --green:          #10B981;
  --red:            #EF4444;

  /* --- Typography --- */
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;
  --font-display:   'Syne', 'Inter', sans-serif;

  /* --- Spacing --- */
  --section-py:     5rem;
  --container-max:  1160px;
  --container-px:   1.5rem;

  /* --- Radii --- */
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  /* --- Shadows --- */
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.08);
  --shadow-lg:      0 10px 40px rgba(0,0,0,.14);
  --shadow-blue:    0 4px 24px rgba(37,99,235,.25);

  /* --- Transitions --- */
  --ease:           cubic-bezier(.4, 0, .2, 1);
  --transition:     200ms var(--ease);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }

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

ul, ol { list-style: none; }

button { cursor: pointer; border: none; background: none; font: inherit; }

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

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { max-width: 65ch; }

/* ============================================================
   4. UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--container-px));
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.section {
  padding: var(--section-py) 0;
}
.section--light  { background: var(--white); }
.section--white  { background: var(--white); }
.section--tint   { background: var(--blue-tint); }
.section--dark   { background: var(--dark-bg); }

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}
.section__header--light h2,
.section__header--light p { color: var(--text-light); }

.section__label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-500);
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .2);
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: .875rem;
}
.section__label--blue { color: var(--blue-300); background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.2); }

.section__sub {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: .75rem auto 0;
}

.section__cta {
  text-align: center;
  margin-top: 3rem;
}

/* ---- Coming Soon placeholder ---- */
.coming-soon {
  display: flex;
  justify-content: center;
  padding: 1rem 0 2rem;
}

.coming-soon__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 3rem 2.5rem 3rem;
  background: linear-gradient(135deg, rgba(37,99,235,.04) 0%, rgba(14,165,233,.03) 100%);
  border: 1.5px dashed rgba(96,165,250,.28);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Ambient glow behind content */
.coming-soon__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 40%, rgba(37,99,235,.07) 0%, transparent 70%);
  pointer-events: none;
}

.coming-soon__icon {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(14,165,233,.10));
  border: 1px solid rgba(96,165,250,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-400);
  box-shadow: 0 4px 20px rgba(37,99,235,.12);
}

.coming-soon__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-500);
  background: rgba(37,99,235,.07);
  border: 1px solid rgba(96,165,250,.22);
  padding: .375rem 1rem;
  border-radius: 999px;
}

/* Pulsing dot */
.coming-soon__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-400);
  flex-shrink: 0;
  animation: cs-pulse 2s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .35; transform: scale(.65); }
}

.coming-soon__title {
  position: relative;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  letter-spacing: -.01em;
  color: var(--text-dark);
  margin-top: -.25rem;
  max-width: 22ch;
}

.coming-soon p {
  position: relative;
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.65;
  max-width: 36ch;
}
.coming-soon p strong { color: var(--text-dark); font-weight: 600; }

.coming-soon a:not(.btn) {
  color: var(--blue-600);
  font-weight: 500;
  text-underline-offset: 3px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 180ms ease;
}
.coming-soon a:not(.btn):hover { text-decoration-color: var(--blue-600); }

.coming-soon .btn {
  position: relative;
  margin-top: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
[hidden] { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.375rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn--lg { padding: .8125rem 1.75rem; font-size: 1rem; }

.btn--primary {
  background: var(--blue-600);
  color: #fff;
  border: 1.5px solid var(--blue-600);
  box-shadow: var(--shadow-blue);
}
.btn--primary:hover {
  background: var(--blue-500);
  border-color: var(--blue-500);
  box-shadow: 0 6px 30px rgba(37,99,235,.4);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn--ghost:hover {
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--blue-600);
  border: 1.5px solid var(--blue-200, #BFDBFE);
}
.btn--outline:hover {
  background: var(--blue-tint);
  border-color: var(--blue-500);
  transform: translateY(-1px);
}

.btn--full { width: 100%; justify-content: center; }

/* ============================================================
   6. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 12, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.nav.scrolled {
  background: rgba(4, 12, 30, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav__logo-hat { opacity: .9; }
.nav__logo-name { color: #fff; }

.nav__links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Individual nav links */
.nav__link {
  position: relative;
  padding: .5rem .8rem;
  font-size: .9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.58);
  border-radius: 0;
  transition: color 200ms ease;
}

/* Animated underline — only for non-CTA links */
.nav__link:not(.nav__link--cta)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--blue-400);
  border-radius: 2px;
  transition: left 220ms ease, right 220ms ease;
}
.nav__link:not(.nav__link--cta):hover,
.nav__link.is-active:not(.nav__link--cta) {
  color: #fff;
}
.nav__link:not(.nav__link--cta):hover::after,
.nav__link.is-active::after {
  left: .45rem;
  right: .45rem;
}

/* CTA button */
.nav__link--cta {
  margin-left: .625rem;
  padding: .5rem 1.2rem;
  background: var(--blue-600);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
  transition: background 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.nav__link--cta:hover {
  background: var(--blue-500);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.6);
  filter: brightness(1.08);
  color: #fff;
}

/* Hamburger toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: .5rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.75);
  transition: background 200ms ease, color 200ms ease;
}
.nav__toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 280ms cubic-bezier(.4,0,.2,1), opacity 200ms ease, width 200ms ease;
  transform-origin: center;
}
/* Hamburger → X */
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; width: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   7. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--dark-bg);
  overflow: hidden;
  padding-top: 68px;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(96,165,250,.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.hero__bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(37,99,235,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 30%, rgba(14,165,233,.12) 0%, transparent 60%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--blue-300);
  background: rgba(96,165,250,.08);
  border: 1px solid rgba(96,165,250,.2);
  padding: .35rem .875rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}

.hero__headline {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-light-muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--dark-border);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.hero__stat strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.hero__stat span {
  font-size: .8125rem;
  color: var(--text-light-muted);
}

.hero__stat-divider {
  width: 1px;
  height: 2rem;
  background: var(--dark-border);
}

/* ============================================================
   8. PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--dark-bg);
  padding: calc(68px + 4rem) 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 30% 50%, rgba(37,99,235,.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(14,165,233,.08) 0%, transparent 60%);
}
.page-hero__inner { position: relative; z-index: 1; }

.page-hero__title {
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin: .5rem 0 .875rem;
}
.page-hero__title .text-gradient { display: inline; }

.page-hero__sub {
  color: var(--text-light-muted);
  font-size: 1.0625rem;
  max-width: 540px;
  line-height: 1.7;
}

/* ============================================================
   9. SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
/* Reveal accent line on hover */
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-glow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms var(--ease);
}
.service-card:hover {
  border-color: rgba(59,130,246,.25);
  box-shadow: var(--shadow-lg), 0 0 48px rgba(37,99,235,.09);
  transform: translateY(-4px);
}
.service-card:hover::after { transform: scaleX(1); }

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue-tint) 0%, rgba(219,234,254,.6) 100%);
  border: 1.5px solid var(--blue-tint-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  margin-bottom: 1.25rem;
  transition: background var(--transition), border-color var(--transition);
}
.service-card:hover .service-card__icon {
  background: linear-gradient(135deg, rgba(219,234,254,.9) 0%, rgba(191,219,254,.7) 100%);
  border-color: rgba(59,130,246,.4);
}

.service-card__title {
  font-size: 1.125rem;
  margin-bottom: .5rem;
  color: var(--text-dark);
}

.service-card__desc {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.service-card__features {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.service-card__features li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text-body);
}
.service-card__features li svg { color: var(--blue-600); flex-shrink: 0; }

/* ============================================================
   10. PILLARS (Why Jeeves)
   ============================================================ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pillar {
  background: var(--dark-card);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.pillar:hover {
  border-color: rgba(59,130,246,.4);
  box-shadow: 0 0 40px rgba(37,99,235,.18), 0 0 0 1px rgba(37,99,235,.1);
  transform: translateY(-3px);
}

.pillar__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(37,99,235,.15);
  border: 1.5px solid rgba(37,99,235,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-400);
  margin-bottom: 1.25rem;
}

.pillar h3 { color: #fff; margin-bottom: .5rem; }

.pillar p {
  font-size: .9375rem;
  color: var(--text-light-muted);
  line-height: 1.7;
}

/* ============================================================
   11. PROCESS STEPS
   ============================================================ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  counter-reset: none;
  position: relative;
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  padding: 2rem 2rem 2rem 0;
  position: relative;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 2.5rem;
  right: 0;
  width: 1px;
  height: 2rem;
  background: var(--blue-tint-2);
  display: none;
}

.process-step__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-400) 0%, var(--blue-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.04em;
}

.process-step__content h3 {
  font-size: 1.125rem;
  color: var(--text-dark);
  margin-bottom: .375rem;
}

.process-step__content p {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   12. WORK CARDS
   ============================================================ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}
.work-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.work-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.work-card:hover {
  border-color: var(--blue-tint-2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.work-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--blue-tint);
}
.work-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
.work-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,12,30,.45) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.work-card:hover .work-card__image img { transform: scale(1.06); }
.work-card:hover .work-card__image::after { opacity: 1; }

.work-card__badge {
  position: absolute;
  top: .875rem;
  left: .875rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--blue-600);
  color: #fff;
}
.work-card__badge--featured {
  left: auto;
  right: .875rem;
  background: rgba(4,12,30,.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}

.work-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}

.work-card__category {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.work-card__title {
  font-size: 1.125rem;
  color: var(--text-dark);
  line-height: 1.3;
}

.work-card__desc {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .375rem;
}

.work-card__link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue-600);
  margin-top: .75rem;
  transition: gap var(--transition), color var(--transition);
}
.work-card__link:hover { gap: .625rem; color: var(--blue-500); }

/* ============================================================
   13. TAGS
   ============================================================ */
.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 500;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue-600);
  border: 1px solid var(--blue-tint-2);
  white-space: nowrap;
}
.tag--sm { font-size: .6875rem; padding: .15rem .5rem; }

/* ============================================================
   14. BLOG CARDS
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.blog-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.blog-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  border-color: var(--blue-tint-2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card__image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--blue-tint);
  position: relative;
}
.blog-card__image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}
.blog-card__image-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,12,30,.4) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.blog-card:hover .blog-card__image-link img { transform: scale(1.06); }
.blog-card:hover .blog-card__image-link::after { opacity: 1; }

.blog-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .8125rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.blog-card__title {
  font-size: 1.0625rem;
  line-height: 1.4;
}
.blog-card__title a { color: var(--text-dark); transition: color var(--transition); }
.blog-card__title a:hover { color: var(--blue-600); }

.blog-card__excerpt {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .5rem;
}

.blog-card__tags { display: flex; flex-wrap: wrap; gap: .375rem; }

.blog-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue-600);
  white-space: nowrap;
  transition: gap var(--transition), color var(--transition);
}
.blog-card__read-more:hover { gap: .625rem; color: var(--blue-500); }

/* ============================================================
   15. CTA BANNER
   ============================================================ */
.cta-banner {
  position: relative;
  background: var(--dark-bg);
  padding: 5rem 0;
  overflow: hidden;
  text-align: center;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 120% at 50% 110%, rgba(37,99,235,.35) 0%, transparent 65%),
    radial-gradient(ellipse 60% 60% at 15% 0%,   rgba(14,165,233,.18) 0%, transparent 55%),
    radial-gradient(ellipse 45% 45% at 85% 10%,  rgba(96,165,250,.12) 0%, transparent 50%);
}

.cta-banner__inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-banner__hat {
  display: flex;
  justify-content: center;
  color: var(--blue-400);
  margin-bottom: 1.5rem;
  opacity: .7;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: .875rem;
}

.cta-banner p {
  color: var(--text-light-muted);
  font-size: 1.0625rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  justify-content: center;
}

/* ============================================================
   16. CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .contact-layout { grid-template-columns: 1.2fr 1fr; }
}

.contact-form-wrap h2 { margin-bottom: .5rem; }
.contact-form-wrap__sub { color: var(--text-muted); font-size: .9375rem; margin-bottom: 2rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-dark);
}
.form-label span { color: var(--red); margin-left: .1rem; }

.form-input {
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: .65rem .875rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-input::placeholder { color: #a0aec0; }
.form-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-input:invalid:not(:placeholder-shown) { border-color: var(--red); }

.form-textarea { resize: vertical; min-height: 140px; }

.form-feedback {
  padding: .875rem 1rem;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
}
.form-feedback--success {
  background: rgba(16,185,129,.08);
  border: 1.5px solid rgba(16,185,129,.25);
  color: #059669;
}
.form-feedback--error {
  background: rgba(239,68,68,.07);
  border: 1.5px solid rgba(239,68,68,.2);
  color: #DC2626;
}

.spinner {
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Contact info sidebar */
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }

.contact-info__card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.contact-info__card h3 { font-size: 1rem; margin-bottom: .5rem; }
.contact-info__card p { font-size: .9375rem; color: var(--text-muted); margin-bottom: 0; max-width: none; }

.contact-info__card--dark {
  background: var(--dark-bg);
  border-color: var(--dark-border);
}
.contact-info__card--dark h3 { color: #fff; }
.contact-info__card--dark p  { color: var(--text-light-muted); }

.contact-info__email {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--blue-600);
  font-size: .9375rem;
  font-weight: 500;
  margin-top: .5rem;
  word-break: break-all;
}
.contact-info__email:hover { color: var(--blue-500); }

.contact-info__stat { display: flex; flex-direction: column; gap: .15rem; }
.contact-info__stat strong { font-size: 1.5rem; color: var(--blue-600); }
.contact-info__stat span   { font-size: .875rem; color: var(--text-muted); }

.contact-info__steps {
  list-style: decimal;
  list-style-position: inside;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .5rem;
}
.contact-info__steps li { font-size: .9375rem; color: var(--text-muted); }

/* ============================================================
   17. BLOG POST
   ============================================================ */
.post-hero {
  background: var(--dark-bg);
  padding: calc(68px + 3.5rem) 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 30% 50%, rgba(37,99,235,.15) 0%, transparent 70%);
}
.post-hero__inner { position: relative; z-index: 1; }

.post-hero__meta { margin-bottom: 1.5rem; }
.post-hero__back {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-light-muted);
  transition: color var(--transition), gap var(--transition);
}
.post-hero__back:hover { color: var(--blue-300); gap: .5rem; }

.post-hero__tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1rem; }

.post-hero__title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  color: #fff;
  max-width: 800px;
  margin-bottom: .875rem;
}

.post-hero__excerpt {
  font-size: 1.125rem;
  color: var(--text-light-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.post-hero__info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .625rem;
  font-size: .875rem;
  color: var(--text-light-muted);
}
.post-hero__author { font-weight: 500; color: var(--blue-300); }

.post-cover {
  background: var(--dark-bg);
  padding-bottom: 0;
}
.post-cover .container { padding-bottom: 0; }
.post-cover img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: block;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 3rem var(--container-px);
}
@media (min-width: 900px) {
  .post-layout { grid-template-columns: 1fr 300px; padding: 4rem var(--container-px); }
}

/* Prose (article body) */
.prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 680px;
}
.prose h2 {
  font-size: 1.625rem;
  margin: 2.5rem 0 .875rem;
  color: var(--text-dark);
}
.prose h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 .625rem;
  color: var(--text-dark);
}
.prose p { margin-bottom: 1.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol {
  margin: 1rem 0 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { color: var(--text-body); }
.prose strong { color: var(--text-dark); font-weight: 600; }
.prose a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-500); }
.prose code {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: .875em;
  background: var(--blue-tint);
  color: var(--blue-600);
  padding: .1em .35em;
  border-radius: 4px;
  border: 1px solid var(--blue-tint-2);
}

/* Sidebar */
.post-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.post-sidebar__card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.post-sidebar__card h3 { font-size: 1rem; margin-bottom: .875rem; }
.post-sidebar__card p  { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; max-width: none; }

.post-sidebar__card--cta {
  background: var(--dark-bg);
  border-color: var(--dark-border);
}
.post-sidebar__card--cta h3 { color: #fff; }
.post-sidebar__card--cta p  { color: var(--text-light-muted); }

.post-author {
  display: flex;
  align-items: center;
  gap: .875rem;
}
.post-author__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--blue-tint);
  border: 1.5px solid var(--blue-tint-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  flex-shrink: 0;
}
.post-author strong { display: block; font-size: .875rem; color: var(--text-dark); }
.post-author p { font-size: .8125rem; color: var(--text-muted); margin: 0; max-width: none; }

.post-sidebar__tags { display: flex; flex-wrap: wrap; gap: .375rem; }

/* ============================================================
   18. FOOTER
   ============================================================ */
.footer {
  background: var(--dark-bg);
  padding: 4rem 0 0;
  border-top: 1px solid var(--dark-border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 640px)  { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }

.footer__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.footer__tagline {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--blue-300);
  font-weight: 600;
  margin-bottom: .5rem;
  max-width: none;
}

.footer__desc {
  font-size: .875rem;
  color: var(--text-light-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 280px;
}

.footer__social {
  display: flex;
  gap: .625rem;
}
.footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light-muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.footer__social-link:hover {
  background: rgba(59,130,246,.15);
  color: var(--blue-300);
  border-color: rgba(59,130,246,.3);
}

.footer__heading {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-light-muted);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.footer__links li, .footer__links a {
  font-size: .9375rem;
  color: var(--text-light-muted);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--blue-300); }

.footer__cta-text {
  font-size: .9375rem;
  color: var(--text-light-muted);
  margin-bottom: 1rem;
  max-width: none;
  line-height: 1.5;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--dark-border);
}
.footer__bottom p {
  font-size: .8125rem;
  color: var(--text-light-muted);
  max-width: none;
}

/* ============================================================
   19. ANIMATIONS
   ============================================================ */
.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   20. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}

/* ============================================================
   21. RESPONSIVE — tablet  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --section-py:    3rem;
    --container-px:  1.25rem;
  }

  /* ---- Mobile nav bar: logo left, hamburger right (standard) ---- */
  .nav__inner { gap: 0; }
  .nav__toggle { display: flex; margin-left: auto; }
  /* Collapse the <nav> wrapper — .nav__links is absolutely positioned */
  .nav__inner > nav { flex: 0 0 0; overflow: visible; }

  /* ---- Dropdown panel ---- */
  .nav__links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;           /* li items fill full width */
    background: #060A1A;            /* solid — no nested backdrop-filter */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 0 1.5rem;
    gap: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
    z-index: 200;
  }
  .nav__links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Kill the desktop underline pseudo-element on mobile */
  .nav__link:not(.nav__link--cta)::after { display: none !important; }

  /* ---- Menu items ---- */
  .nav__link {
    display: block;
    padding: 1.0625rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 150ms ease, color 150ms ease;
  }
  .nav__link:hover     { background: rgba(255, 255, 255, 0.05); color: #fff; }
  .nav__link.is-active { color: var(--blue-300); }

  /* ---- CTA button ---- */
  .nav__link--cta {
    display: block;
    margin: 1rem 1.25rem 0 !important;
    padding: 0.9375rem !important;
    background: var(--blue-600) !important;
    color: #fff !important;
    border-radius: 10px !important;
    border-bottom: none !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-align: center !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45) !important;
    width: auto !important;
  }
  .nav__link--cta:hover {
    background: var(--blue-500) !important;
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.6) !important;
    color: #fff !important;
    filter: none !important;
  }

  /* --- Section headers --- */
  .section__header { margin-bottom: 2.5rem; }
  .section__sub    { font-size: .9375rem; }

  /* --- Hero banner --- */
  .hero { min-height: auto; padding: 5.5rem 0 3rem; }
  .hero__inner { padding: 1.5rem 1.5rem; gap: 2.25rem; }
  .hero__badge { font-size: .75rem; }
  .hero__sub { font-size: 1rem; }
  .hero__actions { gap: .75rem; }
  .hero__stat-divider { display: none; }
  .hero__stats { gap: 1.25rem; padding: 1.25rem 0; }

  /* --- Page-hero banner (Work, Blog, Contact inner pages) --- */
  .page-hero { padding: calc(68px + 2.5rem) 0 2.5rem; }
  .page-hero__title { font-size: clamp(1.75rem, 6vw, 2.75rem); margin-bottom: .625rem; }
  .page-hero__sub { font-size: .9375rem; }

  /* --- Post hero --- */
  .post-hero { padding: calc(68px + 2rem) 0 2rem; }

  /* --- Grids --- */
  .services-grid { grid-template-columns: 1fr; }
  .pillars-grid   { grid-template-columns: 1fr; }
  .work-grid      { grid-template-columns: 1fr; }
  .blog-grid      { grid-template-columns: 1fr; }

  /* --- Process: horizontal layout (number left, content right) --- */
  .process-steps { grid-template-columns: 1fr; gap: 0; }
  .process-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--blue-tint-2);
  }
  .process-step:last-child { border-bottom: none; }
  .process-step__num {
    font-size: 1.75rem;
    min-width: 2.75rem;
    flex-shrink: 0;
  }

  /* --- CTA Banner --- */
  .cta-banner { padding: 3.5rem 0; }

  /* --- Blog post --- */
  .post-layout { gap: 2rem; }
  .post-cover img { border-radius: 0; }

  /* --- Animations: disabled on mobile (avoids observer/lazy-image quirks) --- */
  .animate-fade-up { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   21b. RESPONSIVE — small phone  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --section-py:    2.5rem;
    --container-px:  1rem;
  }

  /* Hero / banners */
  .hero { padding: 5rem 0 2.5rem; }
  .hero__headline { letter-spacing: -.025em; }
  .page-hero { padding: calc(68px + 2rem) 0 2rem; }
  .hero__stats {
    flex-direction: column;
    align-items: flex-start;
    gap: .875rem;
    padding: 1rem 0;
  }
  .hero__stat {
    flex-direction: row;
    align-items: center;
    gap: .875rem;
  }
  .hero__stat strong { font-size: 1rem; }

  /* Section headers */
  .section__header { margin-bottom: 2rem; }

  /* Card padding */
  .service-card  { padding: 1.5rem; }
  .pillar        { padding: 1.5rem; }
  .work-card__body  { padding: 1.25rem; }
  .blog-card__body  { padding: 1.25rem; }

  /* Process number even smaller */
  .process-step__num { font-size: 1.5rem; min-width: 2.25rem; }

  /* CTA */
  .cta-banner { padding: 2.75rem 0; }
  .cta-banner__actions { flex-direction: column; align-items: stretch; }
  .cta-banner__actions .btn { justify-content: center; }

  /* Buttons */
  .btn--lg { padding: .75rem 1.5rem; font-size: .9375rem; }

  /* Footer */
  .footer { padding: 2.5rem 0 0; }
  .footer__grid { gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; gap: .5rem; }

  /* Contact form row stacks */
  .form-row { grid-template-columns: 1fr; }

  /* Post hero */
  .post-hero { padding: calc(68px + 2.5rem) 0 2.5rem; }
}

/* ============================================================
   21c. RESPONSIVE — tablet landscape  769–1060px
   ============================================================ */
@media (min-width: 769px) and (max-width: 1060px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid     { grid-template-columns: repeat(2, 1fr); }
  .blog-grid     { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   22. WORK CARD — CLICKABLE STATE
   ============================================================ */
[data-work-slug] { cursor: pointer; }
[data-work-slug]:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 4px;
}

/* ============================================================
   23. PROJECT MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms var(--ease);
}
.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 30, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.modal__container {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 980px;
  max-height: 90svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(0,0,0,.45);
  transform: translateY(18px) scale(.97);
  transition: transform 300ms var(--ease);
}
.modal.open .modal__container {
  transform: translateY(0) scale(1);
}

/* Close button */
.modal__close {
  position: absolute;
  top: .875rem;
  right: .875rem;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition);
  border: 1px solid var(--gray-200);
}
.modal__close:hover { background: white; transform: scale(1.08); }

/* Gallery (left column) */
.modal__gallery {
  display: flex;
  flex-direction: column;
  background: #0a0f1e;
  overflow: hidden;
  min-height: 0;
}

.modal__gallery-main {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
  background: #0a0f1e;
}
.modal__gallery-main img,
.modal__gallery-main video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 200ms var(--ease);
}
.modal__gallery-main img:not([hidden]),
.modal__gallery-main video:not([hidden]) { display: block; }
.modal__gallery-main [hidden] { display: none; }

.modal__gallery-thumbs {
  display: flex;
  gap: .5rem;
  padding: .625rem;
  overflow-x: auto;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  scrollbar-width: thin;
}
.modal__gallery-thumbs:empty { display: none; }

.modal__thumb {
  flex-shrink: 0;
  width: 58px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition), opacity var(--transition);
  opacity: .65;
  padding: 0;
  background: none;
}
.modal__thumb.active { border-color: var(--blue-600); opacity: 1; }
.modal__thumb:hover  { opacity: 1; }
.modal__thumb img    { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal__thumb--video { position: relative; }
.modal__thumb--video::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0; height: 0;
  border-left: 10px solid white;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
  pointer-events: none;
}

/* Info panel (right column) */
.modal__info {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  padding: 2rem 2rem 2rem;
  overflow-y: auto;
  max-height: 90svh;
  scrollbar-width: thin;
}

.modal__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.modal__category {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.modal__year {
  font-size: .8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.modal__title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0;
}

.modal__desc {
  font-size: .9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: none;
}

.modal__section { display: flex; flex-direction: column; gap: .35rem; }
.modal__section h3 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-dark);
  font-family: var(--font-body);
}
.modal__section p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: none;
}

.modal__tags { display: flex; flex-wrap: wrap; gap: .375rem; }

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: .25rem;
  margin-top: auto;
}

/* Responsive modal */
@media (max-width: 680px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal__container {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
    max-height: 95svh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
  }
  .modal__info { max-height: none; padding: 1.5rem 1.25rem 2rem; }
  .modal__gallery { grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .modal { transition: none; }
  .modal__container { transition: none; }
}
