/* Enkareflow staging design system
   Brand-locked: Space Grotesk headings, Public Sans body, navy/accent palette. */

:root {
  --navy: #0f1b2d;
  --navy-deep: #0a1626;
  --accent: #2e8fe0;
  --accent-light: #58a8ec;
  --bg: #eef3f7;
  --band: #f7f9fb;
  --body: #3d4a5c;
  --muted: #55606e;
  --muted-dark: #9fb0c2;
  --hairline: rgba(15, 27, 45, .08);
  --hairline-strong: rgba(15, 27, 45, .16);
  --heading-stack: 'Space Grotesk', 'Avenir Next', 'Segoe UI', 'Trebuchet MS', Verdana, sans-serif;
  --body-stack: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 20px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--body-stack);
  -webkit-font-smoothing: antialiased;
}

html, body { overflow-x: hidden; }
main { display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
input::placeholder, textarea::placeholder { color: #66727f; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--navy);
  color: #fff;
  border-radius: 0 0 12px 12px;
  font-size: 15px;
  font-weight: 500;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

h1, h2, h3 { font-family: var(--heading-stack); font-weight: 500; letter-spacing: -.01em; margin: 0; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 64px; }

/* ---------- Nav: floating glass pill ---------- */
.nav-shell {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 12px 14px 12px 26px;
  border-radius: 999px;
  background: rgba(238, 243, 247, .72);
  border: 1px solid rgba(15, 27, 45, .10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(15, 27, 45, .10);
  transition: box-shadow .4s ease, background .4s ease;
}
.nav-pill.is-scrolled { background: rgba(238, 243, 247, .92); box-shadow: 0 16px 48px rgba(15, 27, 45, .16); }
.nav-pill .logo img { height: 32px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: var(--body); }
.nav-links a.active { color: var(--navy); }
.nav-cta {
  padding: 12px 24px;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  transition: background .3s ease;
}
.nav-cta:hover { background: var(--accent); color: #fff; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(15, 27, 45, .18);
  border-radius: 999px;
  background: var(--navy);
  cursor: pointer;
  padding: 0;
}
.nav-toggle .bars { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle .bars span { width: 16px; height: 2px; background: #fff; border-radius: 2px; }
.mobile-menu {
  position: fixed;
  top: 76px;
  left: 16px;
  right: 16px;
  z-index: 95;
  background: #fff;
  border: 1px solid rgba(15, 27, 45, .12);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 27, 45, .18);
  padding: 10px;
}
.mobile-menu a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  border-radius: 10px;
}
.mobile-menu a:hover, .mobile-menu a:focus-visible { background: var(--band); color: var(--navy); }
.mobile-menu .menu-cta {
  margin-top: 6px;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  text-align: center;
}
.mobile-menu .menu-cta:hover, .mobile-menu .menu-cta:focus-visible { background: var(--accent); color: #fff; }
body.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  white-space: nowrap;
  padding: 17px 34px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), background .3s ease, color .3s ease, border-color .3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid-light { background: #fff; color: var(--navy); }
.btn-solid-light:hover { color: var(--navy); background: #e8f1fa; }
.btn-solid-dark { background: var(--navy); color: #fff; }
.btn-solid-dark:hover { background: var(--accent); color: #fff; }
.btn-outline-light { border: 1px solid rgba(255, 255, 255, .45); color: #fff; background: rgba(15, 27, 45, .30); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn-outline-dark { border: 1px solid rgba(15, 27, 45, .25); color: var(--navy); background: transparent; }

/* ---------- Hero: cinematic centre ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: center; display: block; }
.hero-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 100%, rgba(10, 22, 38, .92) 0%, rgba(10, 22, 38, .55) 45%, rgba(10, 22, 38, .18) 75%),
    linear-gradient(180deg, rgba(15, 27, 45, .35) 0%, rgba(15, 27, 45, .10) 40%, rgba(10, 22, 38, .88) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(140px, 18vh, 200px) 32px clamp(64px, 10vh, 120px);
  max-width: 1100px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  border: 1.5px solid var(--accent-light);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  color: #fff;
  background: rgba(15, 27, 45, .45);
}
.hero h1 {
  margin: 34px 0 28px;
  font-size: clamp(3rem, 5.5vw, 5.4rem);
  line-height: 1.04;
  color: #fff;
  text-wrap: balance;
}
.hero p {
  margin: 0 auto 40px;
  font-size: 19px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .85);
  max-width: 62ch;
  text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Sub-hero for interior pages: editorial split */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}
.page-hero .hero-wash {
  background: linear-gradient(90deg, var(--navy) 0%, rgba(15, 27, 45, .92) 30%, rgba(15, 27, 45, .55) 60%, rgba(15, 27, 45, .12) 100%);
}
.page-hero-inner { position: relative; z-index: 1; padding: 190px 64px 130px; max-width: 860px; }
.page-hero-inner.align-right { margin-left: auto; }
.page-hero h1 {
  margin: 22px 0;
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  line-height: 1.08;
  color: #fff;
  max-width: 22ch;
  text-wrap: balance;
}
.page-hero p { margin: 0; font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, .85); max-width: 52ch; text-wrap: pretty; }

/* ---------- Sections ---------- */
.section { padding: 128px 0; }
.section-lg { padding: 176px 0; }
.section-dark { background: var(--navy-deep); color: #fff; }
.section-band { background: var(--band); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.eyebrow { font-size: 15px; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.section-dark .eyebrow { color: var(--accent-light); }
.h2 { font-size: clamp(2rem, 3.4vw, 3.1rem); text-wrap: balance; }
.lede { font-size: 16.5px; line-height: 1.75; color: var(--body); text-wrap: pretty; }
.section-dark .lede { color: var(--muted-dark); }

/* ---------- Service index strip ---------- */
.service-index {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: #fff;
  padding: 22px 24px;
}
.service-index ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1360px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}
.service-index a {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid rgba(15, 27, 45, .16);
  border-radius: 999px;
  font-family: var(--heading-stack);
  font-size: 15px;
  color: var(--muted);
  background: #fff;
}
.service-index a:hover, .service-index a:focus-visible { color: var(--navy); border-color: var(--accent); }

/* ---------- Gapless bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-flow: dense;
  gap: 20px;
}
.bento-cell {
  border-radius: var(--radius);
  padding: 40px;
  background: var(--band);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}
.bento-cell h3 { font-size: 22px; margin-bottom: 10px; }
.bento-cell p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.bento-a { grid-column: span 4; }
.bento-b { grid-column: span 2; }
.bento-c { grid-column: span 2; }
.bento-media { padding: 0; }
.bento-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.22, 1, .36, 1); }
.bento-media:hover img { transform: scale(1.05); }
.bento-media .bento-caption {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  padding: 28px 32px;
  background: linear-gradient(180deg, rgba(10, 22, 38, 0) 0%, rgba(10, 22, 38, .82) 55%);
  color: #fff;
}
.bento-caption h3 { color: #fff; }
.bento-caption p { color: rgba(255, 255, 255, .82); }
.bento-dark { background: var(--navy-deep); border-color: transparent; color: #fff; }
.bento-dark p { color: var(--muted-dark); }

/* ---------- Process steps ---------- */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.step {
  border-left: 1px solid rgba(255, 255, 255, .15);
  padding: 8px 0 8px 32px;
}
.step .num { font-size: 15px; color: var(--accent-light); margin-bottom: 18px; font-family: var(--heading-stack); }
.step h3 { font-size: 26px; margin-bottom: 14px; }
.step p { margin: 0; font-size: 15.5px; line-height: 1.75; color: var(--muted-dark); }

/* ---------- Editorial split rows (services) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split + .split { margin-top: 152px; }
.split-media {
  position: relative;
  min-height: 460px;
  border-radius: var(--radius);
  overflow: hidden;
}
.split-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}
.split-media:hover img { transform: scale(1.05); }
.split h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); scroll-margin-top: 120px; }
.split .kicker { font-size: 16px; color: var(--accent); margin: 10px 0 18px; }
.split .lede { margin: 0 0 26px; }
.outputs-label {
  font-family: var(--heading-stack);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}
.outputs { display: flex; flex-direction: column; gap: 12px; font-size: 15.5px; color: var(--body); }
.outputs div { display: flex; gap: 12px; align-items: baseline; }
.outputs .tick { color: var(--accent); }

/* ---------- Cards / columns ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px; }
.rule-card { border-top: 2px solid var(--accent); padding-top: 22px; }
.rule-card h2, .rule-card h3 { font-size: 21px; margin-bottom: 12px; }
.rule-card p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--body); }

/* ---------- Big CTA ---------- */
.cta-panel {
  background: linear-gradient(120deg, #1273b8 0%, #0d4d84 45%, #0a1c33 100%);
  border-radius: var(--radius-lg);
  padding: 112px 64px;
  text-align: center;
  color: #fff;
}
.cta-panel.plain { background: var(--navy-deep); }
.cta-panel h2 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); margin-bottom: 22px; text-wrap: balance; }
.cta-panel p { margin: 0 auto 40px; font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, .85); max-width: 58ch; }

/* ---------- Footer ---------- */
footer { background: var(--navy-deep); color: var(--muted-dark); padding: 96px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer-grid img { height: 34px; width: auto; display: block; margin-bottom: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-col .head { color: #fff; font-family: var(--heading-stack); margin-bottom: 6px; }
.footer-base {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 56px;
  padding-top: 28px;
  font-size: 14px;
  gap: 20px;
}

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid rgba(15, 27, 45, .10);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(15, 27, 45, .07);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; color: var(--body); }
.field input, .field select, .field textarea {
  padding: 14px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  font-family: var(--body-stack);
  font-size: 15px;
  color: var(--navy);
  background: #fff;
}
.field textarea { resize: vertical; }
.field .err { font-size: 13px; color: #b23a3a; min-height: 0; }
.form-card .btn { white-space: normal; }
.field.invalid input, .field.invalid textarea { border-color: #b23a3a; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- Entrance reveals (progressive enhancement) ----------
   Content is fully visible in plain HTML/CSS. The js-motion class is added
   by main.js only when it is running and reduced motion is not requested,
   so nothing is ever hidden unless the script that reveals it is active. */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
}
.js-motion [data-imgfx] {
  opacity: 0;
  transform: scale(.94);
  transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1);
}
.js-motion [data-reveal].is-in, .js-motion [data-imgfx].is-in {
  opacity: 1;
  transform: none;
}

/* Capture mode: QA screenshots only (set via ?static=1) */
.capture-mode .hero { min-height: 820px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; }
.legal h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); margin-bottom: 18px; }
.legal h2 { font-size: 26px; margin: 48px 0 14px; }
.legal p, .legal li { font-size: 16px; line-height: 1.8; color: var(--body); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .section, .section-lg { padding: 88px 0; }
  .nav-shell { top: 12px; }
  .nav-pill { gap: 18px; padding: 10px 10px 10px 18px; }
  .nav-links { gap: 16px; font-size: 14px; }
  .nav-cta { padding: 10px 16px; font-size: 14px; }
  .hero-inner { padding: 170px 24px 88px; }
  .hero p { font-size: 17px; }
  .page-hero-inner { padding: 160px 24px 88px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-a, .bento-b, .bento-c { grid-column: span 2; min-height: 240px; }
  .steps-row { grid-template-columns: 1fr; gap: 40px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split + .split { margin-top: 96px; }
  .split-media { min-height: 320px; order: -1; }
  .cols-3, .cols-4 { grid-template-columns: 1fr; gap: 32px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta-panel { padding: 64px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .form-card { padding: 24px 18px; }
}

@media (max-width: 720px) {
  .nav-links, .nav-pill .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-pill { gap: 16px; padding: 8px 8px 8px 18px; }
  .nav-pill .logo img { height: 28px; }
}
@media (min-width: 721px) {
  .mobile-menu { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-motion [data-reveal], .js-motion [data-imgfx] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
