/* =========================================================================
   NeoJarvis — Design System
   Brand: Neo Indigo #2E3192 · Jarvis Blue #1654D9 · Ink #15162B
          Slate #5B5E73 · Mist #F4F5FA · White
   Type:  LEMON MILK (display, uppercase) + Inter (body)
   ========================================================================= */

/* ---- Fonts ------------------------------------------------------------- */
@font-face {
  font-family: "LEMON MILK";
  src: url("../fonts/LEMONMILK-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ----------------------------------------------------- */
:root {
  /* Brand palette */
  --indigo: #2e3192;
  --indigo-deep: #232567;
  --blue: #1654d9;
  --blue-hover: #1246bb;
  --ink: #15162b;
  --slate: #5b5e73;
  --mist: #f4f5fa;
  --white: #ffffff;

  /* Functional */
  --bg: var(--white);
  --bg-alt: var(--mist);
  --text: var(--ink);
  --text-soft: var(--slate);
  --heading: var(--indigo);
  --line: rgba(21, 22, 43, 0.10);
  --line-strong: rgba(21, 22, 43, 0.16);
  --line-on-dark: rgba(255, 255, 255, 0.16);

  /* Type families */
  --font-display: "LEMON MILK", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2.15rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.75vw, 3rem);
  --step-4: clamp(2.4rem, 1.8rem + 3vw, 4.25rem);
  --step-5: clamp(3rem, 2rem + 5vw, 6rem);

  /* Spacing scale (4/8 rhythm) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Structure */
  --container: 1200px;
  --container-narrow: 820px;
  --radius: 6px;      /* brand: 6px button radius */
  --radius-lg: 14px;
  --radius-xl: 22px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --dur-1: 160ms;
  --dur-2: 240ms;
  --dur-3: 420ms;

  --shadow-sm: 0 1px 2px rgba(21, 22, 43, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(21, 22, 43, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(46, 49, 146, 0.28);

  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--blue); color: #fff; }

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

/* ---- Typography -------------------------------------------------------- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.display { font-size: var(--step-5); line-height: 0.98; }
h1, .h1 { font-size: var(--step-4); }
h2, .h2 { font-size: var(--step-3); }
h3, .h3 { font-size: var(--step-1); letter-spacing: 0.03em; }

/* Sub-headings that need to read as body still */
h4, h5, h6, .label {
  font-family: var(--font-body);
  color: var(--heading);
  line-height: 1.3;
}
h4 { font-size: var(--step-1); font-weight: 600; }

p { max-width: 68ch; }
.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-soft);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.text-soft { color: var(--text-soft); }
.text-blue { color: var(--blue); }
strong, .semi { font-weight: 600; }

/* ---- Layout ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.narrow { max-width: var(--container-narrow); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--mist { background: var(--bg-alt); }
.section--indigo {
  background: var(--indigo);
  color: rgba(255, 255, 255, 0.82);
}
.section--indigo h1, .section--indigo h2, .section--indigo h3,
.section--indigo .display, .section--indigo h4 { color: #fff; }

.section-head { max-width: 780px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: var(--sp-4); }
.section-head p { margin-top: var(--sp-4); }
.section-head.center p { margin-inline: auto; }

.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.6em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  letter-spacing: 0.01em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-bg);
  transition: transform var(--dur-1) var(--ease-out),
              background var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
  min-height: 48px;
  will-change: transform;
}
.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; box-shadow: 0 12px 24px -12px rgba(22, 84, 217, 0.6); }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--secondary {
  background: transparent;
  color: var(--indigo);
  border-color: var(--indigo);
}
.btn--secondary:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); box-shadow: none; }

.btn--onDark { background: #fff; color: var(--indigo); border-color: #fff; }
.btn--onDark:hover { background: var(--mist); color: var(--indigo); border-color: var(--mist); }
.btn--ghostDark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--ghostDark:hover { background: rgba(255,255,255,0.08); color:#fff; border-color:#fff; }

.btn .arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: var(--blue);
}
.link-arrow .arrow { transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---- Header / Nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { height: 34px; width: auto; }
.brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--indigo);
  text-transform: uppercase;
  line-height: 1;
  padding-top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  /* Widened once the nav dropped to four items — the old clamp was sized to fit six. */
  gap: clamp(1.35rem, 2.5vw, 2.4rem);
}
.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-block: 0.4rem;
  transition: color var(--dur-1) var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-out);
}

/* The nav CTA wears the same brand treatment as the "One Connected View" pill
   on the home page: indigo fill, display face, uppercase, large radius. Font
   weight is deliberately left alone — it keeps the 500 it inherits as a nav
   link rather than taking the pill's face.
   Retargeting --btn-bg moves the background and the 2px border together.
   `color` has to be restated here (and on :hover) because `.nav-links a`
   (0,1,1) outweighs `.btn` (0,1,0), so the button's own --btn-fg white never
   won — it rendered as --ink on the fill. Two classes settles it. */
.nav-links .btn {
  --btn-bg: var(--indigo);
  color: #fff;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  /* Sized down from the pill's 1.05rem: uppercase display caps read a size
     larger than the 0.95rem lowercase nav links beside it, and .btn's 48px
     min-height is built for standalone CTAs, not a header row. */
  font-size: 0.85rem;
  padding: 0.72em 1.5em;
  min-height: 0;
  box-shadow: var(--shadow-lg);
}
.nav-links .btn:hover {
  background: var(--indigo-deep);
  border-color: var(--indigo-deep);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
/* The sliding underline is for text links; on the filled CTA it just pokes out
   below the rounded corner. It was always matching here, only invisible while
   the button was blue-on-blue with a 6px radius. */
.nav-links .btn::after { display: none; }

/* Set the CTA slightly apart from the nav links (desktop only — the stacked
   mobile nav gives the button its own full-width row). */
@media (min-width: 1025px) {
  .nav-links .btn { margin-left: clamp(0.25rem, 0.9vw, 0.9rem); }
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--blue); }

.nav-right { display: flex; align-items: center; gap: var(--sp-5); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--radius);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px; height: 2px;
  background: var(--indigo);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) var(--ease-out);
}
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after { transform: translateY(5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg) translateY(-1px); }

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(1.5rem, 3.5vw, 3rem) clamp(3rem, 6vw, 5rem); overflow: clip; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.hero h1 { margin-top: var(--sp-5); }
.hero .lead { margin-top: var(--sp-5); max-width: 46ch; }
.hero-actions { margin-top: var(--sp-7); display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.hero-meta {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.hero-meta .stat b {
  font-family: var(--font-display);
  color: var(--indigo);
  font-size: var(--step-2);
  display: block;
  line-height: 1;
  font-feature-settings: "tnum";
}
.hero-meta .stat span { color: var(--text-soft); font-size: var(--step--1); }

/* Geometric monogram motif (the brand square) */
.hero-figure { position: relative; aspect-ratio: 1 / 1; }
.mono-frame {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.mono-frame svg { width: 100%; height: auto; overflow: visible; }

/* ---- Marquee / trust --------------------------------------------------- */
.trust { border-block: 1px solid var(--line); background: var(--white); }
.trust .container { display: flex; align-items: center; gap: clamp(1.5rem,4vw,3rem); flex-wrap: wrap; justify-content: space-between; }
.trust .trust-label { color: var(--text-soft); font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.trust-logos { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); flex-wrap: wrap; }
.trust-logos span {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  opacity: 0.7;
  font-size: 1.05rem;
  transition: opacity var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.trust-logos span:hover { opacity: 1; color: var(--indigo); }

/* ---- Cards / services -------------------------------------------------- */
.cards { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--mist);
  color: var(--indigo);
  margin-bottom: var(--sp-5);
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.card:hover .card-icon { background: var(--indigo); color: #fff; }
.card .card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: var(--step-1); margin-bottom: var(--sp-3); }
.card p { color: var(--text-soft); font-size: var(--step-0); }
.card .card-index {
  position: absolute; top: 1.25rem; right: 1.5rem;
  font-family: var(--font-display);
  color: var(--line-strong);
  font-size: 1rem;
}

/* ---- Steps / approach -------------------------------------------------- */
.steps { grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.step { position: relative; padding-top: var(--sp-6); border-top: 2px solid var(--line); }
.step .num {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--blue);
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-4);
  font-feature-settings: "tnum";
}
.step h3 { font-size: var(--step-1); margin-bottom: var(--sp-3); }
.step p { color: var(--text-soft); font-size: var(--step-0); }
.section--indigo .step { border-top-color: var(--line-on-dark); }
.section--indigo .step p { color: rgba(255,255,255,0.72); }
.section--indigo .step .num { color: #7d9bff; }

/* ---- Stats band -------------------------------------------------------- */
.stats { grid-template-columns: repeat(4, 1fr); text-align: left; }
.stat-big b {
  font-family: var(--font-display);
  font-size: var(--step-4);
  color: var(--indigo);
  line-height: 0.95;
  display: block;
  font-feature-settings: "tnum";
}
.section--indigo .stat-big b { color: #fff; }
.stat-big span { color: var(--text-soft); display: block; margin-top: var(--sp-3); font-size: var(--step-0); }
.section--indigo .stat-big span { color: rgba(255,255,255,0.72); }

/* ---- Feature split ----------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.split.reverse .split-media { order: 2; }
.list-check li {
  position: relative;
  padding-left: 2rem;
  margin-top: var(--sp-4);
  color: var(--text-soft);
}
.list-check li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 18px; height: 10px;
  border-left: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: rotate(-45deg);
  transform-origin: center;
}

/* ---- Case study card --------------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.case-body { padding: clamp(2rem, 5vw, 3.5rem); }
.case-body .tag { color: var(--blue); font-weight: 600; font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; }
.case-body h3 { font-size: var(--step-2); margin: var(--sp-4) 0; }
.case-metrics { display: flex; gap: clamp(1.5rem,4vw,3rem); margin-top: var(--sp-6); flex-wrap: wrap; }
.case-metrics b { font-family: var(--font-display); font-size: var(--step-2); color: var(--indigo); display: block; line-height: 1; font-feature-settings:"tnum"; }
.case-metrics span { color: var(--text-soft); font-size: var(--step--1); }
.case-media {
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

/* ---- Testimonial ------------------------------------------------------- */
.quote { max-width: 900px; margin-inline: auto; text-align: center; }
.quote blockquote {
  font-family: var(--font-display);
  text-transform: none;
  font-size: var(--step-2);
  line-height: 1.25;
  color: var(--indigo);
  letter-spacing: 0;
}
.section--indigo .quote blockquote { color: #fff; }
.quote .cite { margin-top: var(--sp-6); color: var(--text-soft); font-weight: 500; }
.section--indigo .quote .cite { color: rgba(255,255,255,0.75); }
.quote .cite b { color: var(--ink); }
.section--indigo .quote .cite b { color: #fff; }

/* ---- CTA band ---------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band .display, .cta-band h2 { max-width: 16ch; margin-inline: auto; }
.cta-band p { margin: var(--sp-5) auto 0; color: rgba(255,255,255,0.8); }
.cta-band .hero-actions { justify-content: center; margin-top: var(--sp-7); }

/* ---- Footer ------------------------------------------------------------ */
.site-footer { background: var(--indigo); color: rgba(255,255,255,0.72); padding-block: clamp(3rem, 6vw, 5rem) var(--sp-6); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(2rem,4vw,3rem); }
.footer-brand img { height: 30px; margin-bottom: var(--sp-5); }
.footer-brand p { color: rgba(255,255,255,0.66); max-width: 32ch; font-size: var(--step-0); }
.footer-col h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: var(--sp-4); font-weight: 600; }
.footer-col a { color: rgba(255,255,255,0.72); display: block; padding-block: 0.35rem; transition: color var(--dur-1) var(--ease-out); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: clamp(2.5rem,5vw,4rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line-on-dark);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--step--1);
  color: rgba(255,255,255,0.6);
}
.footer-bottom .socials { display: flex; gap: var(--sp-4); }
.footer-bottom .socials a { color: rgba(255,255,255,0.72); }
.footer-bottom .socials a:hover { color: #fff; }

/* Footer logo lockup — clean symbol + LEMON MILK wordmark, white (matches header) */
.footer-lockup { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }
.footer-lockup img { height: 40px; width: auto; margin: 0; }
.footer-lockup .wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
  padding-top: 3px;
}

/* ---- Page hero (interior pages) ---------------------------------------- */
.page-hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3.5rem); background: var(--mist); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: var(--sp-4); }
.page-hero p { margin-top: var(--sp-5); max-width: 60ch; }
.breadcrumb { font-size: var(--step--1); color: var(--text-soft); margin-bottom: var(--sp-5); }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--blue); }

/* ---- Forms ------------------------------------------------------------- */
.field { margin-bottom: var(--sp-5); }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: var(--sp-2); font-size: 0.95rem; }
.field .req { color: var(--blue); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.85em 1em;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  min-height: 48px;
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22,84,217,0.15);
}
.field .help { font-size: var(--step--1); color: var(--text-soft); margin-top: var(--sp-2); }
.field.error input, .field.error textarea { border-color: #dc2626; }
.field .err-msg { color: #dc2626; font-size: var(--step--1); margin-top: var(--sp-2); display: none; }
.field.error .err-msg { display: block; }
.form-note { font-size: var(--step--1); color: var(--text-soft); }
.form-status { padding: var(--sp-4) var(--sp-5); border-radius: var(--radius); margin-bottom: var(--sp-5); display: none; }
.form-status.success { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
/* Neutral variant: the form has no backend yet, so a submit is a handoff to
   the visitor's mail client, not a success. Green would be a lie. */
.form-status.notice { display: block; background: var(--mist); color: var(--ink);
  border: 1px solid rgba(22, 84, 217, 0.25); }
.form-status.notice .link-arrow { margin-top: var(--sp-3); }
.form-status.error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
/* Honeypot. Off-canvas rather than display:none — bots skip hidden inputs,
   people never reach it (aria-hidden + tabindex="-1" in the markup). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Blog -------------------------------------------------------------- */
.post-grid { grid-template-columns: repeat(3, 1fr); }
.post-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-thumb { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--indigo), var(--blue)); position: relative; overflow: hidden; }
.post-card-body { padding: clamp(1.25rem, 2.5vw, 1.75rem); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.post-meta { font-size: var(--step--1); color: var(--text-soft); display: flex; gap: var(--sp-3); align-items: center; }
.post-meta .cat { color: var(--blue); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.post-card h3 { font-size: var(--step-1); text-transform: none; font-family: var(--font-body); font-weight: 700; color: var(--ink); letter-spacing: 0; line-height: 1.25; }
.post-card:hover h3 { color: var(--indigo); }
.post-card p { color: var(--text-soft); font-size: var(--step-0); }
.post-card .link-arrow { margin-top: auto; padding-top: var(--sp-2); }

/* Article body */
.article { max-width: 720px; margin-inline: auto; }
.article h2 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); font-size: var(--step-2); margin-top: var(--sp-8); margin-bottom: var(--sp-4); }
.article h3 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); font-size: var(--step-1); margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.article p { margin-top: var(--sp-4); }
.article p, .article li { color: var(--ink); }
.article ul { margin-top: var(--sp-4); }
.article ul li { position: relative; padding-left: 1.5rem; margin-top: var(--sp-3); }
.article ul li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 7px; height: 7px; background: var(--blue); border-radius: 2px; }
.article blockquote { border-left: 3px solid var(--blue); padding-left: var(--sp-5); margin: var(--sp-6) 0; font-size: var(--step-1); color: var(--indigo); }
.article figure img { border-radius: var(--radius-lg); }

/* ---- Scroll reveal (gated on .js so no-JS users still see content) ----- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---- Utilities --------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.max-46 { max-width: 46ch; }
.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; left: 1rem; top: -100px;
  background: var(--indigo); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: var(--radius); z-index: 1000;
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* =========================================================================
   Responsive — mobile is DESIGNED, not shrunk
   ========================================================================= */
@media (max-width: 1024px) {
  .cards, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Nav collapses to hamburger earlier (≤1024) to fit the 6-item nav */
@media (max-width: 1024px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    padding: var(--sp-4) clamp(1.25rem, 5vw, 2.5rem) var(--sp-6);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav-links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding-block: 0.9rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav-links a::after { display: none; }
  /* Restore a proper touch target: the desktop rule drops .btn's 48px
     min-height, which is right for a header row but leaves the stacked
     mobile CTA at ~37px — under the 44px guidance. */
  .nav-links .btn { margin-top: var(--sp-4); width: 100%; min-height: 48px; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; width: min(340px, 72vw); margin-inline: auto; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 2rem; }
  .split.reverse .split-media { order: -1; }
  .case { grid-template-columns: 1fr; }
  .case-media { order: -1; min-height: 200px; }
}

@media (max-width: 560px) {
  .cards, .post-grid, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-actions .btn { width: 100%; }
  .hero-meta { gap: 1.5rem 2rem; }
}

/* Prevent grid/flex children from forcing tracks wider than the viewport
   (default min-width:auto = min-content; this is the standard overflow fix) */
.grid > *, .split > *, .hero-grid > *, .case > *, .footer-top > *, .frag > * { min-width: 0; }

/* ---- Responsive grid utilities (override base .steps/.cards safely) ---- */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
}

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .mono-spin, .float, .drift { animation: none !important; }
}
