@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");
/* ==========================================================================
   OutCom-Media — Design System & Master Stylesheet
   Tokens follow the SOP palette-switcher contract.
   ========================================================================== */

:root {
  /* Palette Tokens */
  --color-primary: #1E75BB;
  --color-primary-hover: #166099;
  --color-accent: #0284C7;
  --color-accent-warm: #F59E0B;
  --color-secondary: #5C5E58;

  /* Surfaces & Neutrals (Light Theme Default) */
  --color-bg: #FFFFFF;
  --color-surface: #F8FAFC;
  --color-surface-2: #F1F5F9;
  --color-surface-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-border-subtle: #EDF2F7;
  --color-text: #0F172A;
  --color-text-muted: #475569;
  --color-text-dim: #64748B;
  --color-text-inverse: #FFFFFF;
  --color-badge-bg: rgba(30, 117, 187, 0.08);
  --color-badge-text: #1E75BB;

  /* Scrims & Overlays */
  --hero-scrim: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.88) 100%);
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 12px 30px -4px rgba(30, 117, 187, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);

  /* Typography */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Geometry & Tokens */
  --radius-img: 14px;
  --radius-card: 16px;
  --radius-btn: 8px;
  --radius-pill: 9999px;
  --header-height: 80px;
  --container-max: 1240px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --color-bg: #0B1120;
  --color-surface: #111827;
  --color-surface-2: #1E293B;
  --color-surface-card: #162032;
  --color-border: #26354A;
  --color-border-subtle: #1E293B;
  --color-text: #F8FAFC;
  --color-text-muted: #94A3B8;
  --color-text-dim: #64748B;
  --color-text-inverse: #0F172A;
  --color-badge-bg: rgba(30, 117, 187, 0.22);
  --color-badge-text: #60A5FA;
  --card-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 12px 32px -4px rgba(30, 117, 187, 0.25);
  --hero-scrim: linear-gradient(180deg, rgba(8, 14, 26, 0.85) 0%, rgba(8, 14, 26, 0.94) 100%);
}

/* --- Base & Reset -------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

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

/* Content images inherit the required SOP corner radius */
.content-img,
figure img,
.card-media img,
.showcase-media img,
.gallery-grid img {
  border-radius: var(--radius-img);
  object-fit: cover;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

p {
  font-size: 1.0625rem; /* ~17px desktop readable body */
  color: var(--color-text-muted);
  line-height: 1.7;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  z-index: 99999;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- Header & Navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .site-header {
  background-color: rgba(11, 17, 32, 0.92);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.desktop-nav {
  display: none;
}

.desktop-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.desktop-nav a {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition);
}

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

.desktop-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

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

/* Theme Toggle Button */
.theme-toggle {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.theme-toggle:hover {
  background-color: var(--color-surface-2);
  border-color: var(--color-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.site-header .header-cta {
  display: none;
}

/* Burger Toggle for Mobile */
.burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  padding: 9px;
  cursor: pointer;
  z-index: 1002;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.burger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
  opacity: 0;
}

.burger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 999;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-drawer a {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  padding: 0.5rem 0;
}

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

.mobile-nav-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Buttons & Links ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 1px solid transparent;
  min-height: 48px; /* Touch target safety */
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 117, 187, 0.28);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-surface-2);
  border-color: var(--color-primary);
  color: var(--color-text);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.arrow-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  transition: transform var(--transition);
}

.btn:hover .arrow-icon {
  transform: translateX(4px);
}

/* --- Badge Tokens -------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-badge-bg);
  color: var(--color-badge-text);
  border: 1px solid rgba(30, 117, 187, 0.2);
}

.badge-light {
  background-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

/* --- Hero: Full-Bleed Background Behind Copy ----------------------------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0;
}

.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important; /* Full-bleed hero stays edge-to-edge */
  animation: heroDrift 28s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.hero-scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-scrim);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 820px;
}

.hero-content h1 {
  color: #FFFFFF;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.hero-lede {
  color: #E2E8F0;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* Page Hero for Interior Pages */
.page-hero {
  position: relative;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 4.5rem 0 3.5rem;
}

.page-hero-inner {
  max-width: 840px;
}

.page-hero-inner h1 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.page-hero-inner p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

/* --- Proof & Stats Bar --------------------------------------------------- */
.proof-strip {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.stat-sub {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

/* --- Content Sections ---------------------------------------------------- */
.section {
  padding: 5.5rem 0;
}

.section-alt {
  background-color: var(--color-surface);
}

.section-header {
  max-width: 760px;
  margin-bottom: 3.5rem;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header h2 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
}

/* --- Services Grid & Cards ----------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(30, 117, 187, 0.4);
}

.card-media {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  background-color: var(--color-surface-2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* Let outer card frame clip it */
  transition: transform 0.5s ease;
}

.service-card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  margin-bottom: 0.85rem;
}

.card-body p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-features {
  list-style: none;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.check-icon {
  width: 18px;
  height: 18px;
  stroke: var(--color-primary);
  stroke-width: 2.2;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Turnkey Process Section --------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  position: relative;
}

.process-step {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2.25rem 1.75rem;
  position: relative;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-number {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--color-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.process-step h3 {
  font-size: 1.25rem;
}

/* --- Enterprise Clients Showcase ----------------------------------------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.client-card {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), border-color var(--transition);
}

.client-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

.client-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.client-sector {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

/* --- Split Showcase (Two-Column Editorial) -------------------------------- */
.split-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-reverse {
  direction: rtl;
}

.split-reverse > * {
  direction: ltr;
}

.split-media {
  position: relative;
}

.split-media img {
  width: 100%;
  height: auto;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12);
}

.split-text h2 {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.split-text p {
  margin-bottom: 1.5rem;
}

/* --- Focus Editorial (Background & Focus — image-free) -------------------- */
.bg-focus-editorial {
  background: var(--color-surface);
}

.focus-editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.focus-editorial__lead h2 {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.focus-editorial__lead p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.focus-editorial__pillars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.focus-pillar {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 1.25rem;
  align-items: start;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.focus-pillar:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.focus-pillar__icon {
  grid-row: span 2;
  width: 52px;
  height: 52px;
  background: var(--color-badge-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.focus-pillar h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.35rem;
  align-self: end;
}

.focus-pillar p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}


.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-img);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item-tall {
  grid-row: span 2;
}

.gallery-item-wide {
  grid-column: span 2;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.gallery-caption {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}

/* Service-level mini gallery */
.service-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.service-gallery-grid .gallery-item {
  height: 220px;
}

/* Image Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-img);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-family: var(--font-body);
  text-align: center;
  max-width: 600px;
}

/* Gallery responsive */
@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }
  .gallery-item-tall {
    grid-row: span 1;
  }
  .gallery-item-wide {
    grid-column: span 1;
  }
  .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .service-gallery-grid {
    grid-template-columns: 1fr;
  }
  .service-gallery-grid .gallery-item {
    height: 180px;
  }
}

/* --- Form Component ------------------------------------------------------ */
.contact-form-card {
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2.75rem;
  box-shadow: var(--card-shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 117, 187, 0.18);
}

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

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-btn);
  display: none;
  font-size: 0.95rem;
}

.form-status.success {
  display: block;
  background-color: rgba(34, 197, 94, 0.12);
  color: #16A34A;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* --- Contact Info Blocks ------------------------------------------------- */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--color-badge-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.contact-info-item h3 {
  font-size: 1.125rem;
  margin-bottom: 0.35rem;
}

.contact-info-item p,
.contact-info-item a {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.contact-info-item a:hover {
  color: var(--color-primary);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 5rem 0 2.5rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 1rem;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.925rem;
  color: var(--color-text-dim);
}

.footer-credit {
  font-size: 0.875rem;
  color: var(--color-text-dim);
}

.footer-credit .credit-highlight {
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-credit a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.footer-credit a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* --- Motion & Scroll Animations ------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger entrance for hero */
.hero-stagger-1 {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.hero-stagger-2 {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.hero-stagger-3 {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-stagger-1,
  .hero-stagger-2,
  .hero-stagger-3 {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-bg-img {
    animation: none !important;
    transform: none !important;
  }
}

/* --- Responsive Breakpoints ---------------------------------------------- */
@media (min-width: 960px) {
  .desktop-nav {
    display: block;
  }
  .burger-btn {
    display: none;
  }
  .mobile-nav-drawer {
    display: none;
  }
}

@media (min-width: 1040px) {
  .site-header .header-cta {
    display: inline-flex;
  }
}

@media (max-width: 960px) {
  .split-showcase {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .focus-editorial {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}


@media (max-width: 640px) {
  /* Header mobile tuning */
  .header-inner {
    height: 64px;
    gap: 0.75rem;
  }
  .header-logo {
    height: 38px;
    max-width: 155px;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .theme-toggle,
  .burger-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
  }
  .mobile-nav-drawer {
    top: 64px;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
  }

  /* Core Grids Mobile Safety */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .process-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .focus-pillar {
    grid-template-columns: 44px 1fr;
    column-gap: 1rem;
    padding: 1.25rem 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 0.85rem;
  }
  .section {
    padding: 3.75rem 0;
  }
  .hero {
    min-height: 70vh;
    padding: 4.5rem 0;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  /* Clients grid: 2 per row on mobile */
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .client-card {
    padding: 1.25rem 1rem;
  }
  .client-name {
    font-size: 0.95rem;
  }
  .client-sector {
    font-size: 0.78rem;
  }
  /* Improve touch targets */
  .btn {
    min-height: 48px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  /* Safe area padding for notched devices (iPhone X+) */
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* Mobile contact details */
  .contact-info-item {
    gap: 0.75rem;
  }
  /* Better hero readability on small screens */
  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  .hero-lede {
    font-size: 0.95rem;
  }
  /* Page hero text */
  .page-hero h1 {
    font-size: 1.5rem;
  }
}

/* Extra small screens (iPhone SE, etc.) */
@media (max-width: 380px) {
  .clients-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
