/* ==========================================================================
   CLIFAI — shared stylesheet
   Structure: 1 Tokens · 2 Base · 3 Layout · 4 Components · 5 Sections · 6 Footer
              7 Motion · 8 Responsive
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #101828;          /* primary dark */
  --ink-2: #1d2939;        /* secondary dark */
  --bg: #f8fafc;           /* primary light background */
  --card: #ffffff;
  --line: #e4e7ec;
  --muted: #667085;        /* secondary text */
  --body: #344054;         /* body text */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-tint: #eaf1ff;
  --on-dark: #e4e7ec;
  --on-dark-muted: #98a2b3;
  --line-dark: #344054;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-card: 16px;
  --r-img: 16px;
  --r-btn: 10px;
  --shadow: 0 8px 30px rgba(16, 24, 40, 0.06);

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 8vw, 7.5rem);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 2. BASE ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.125rem, 4.6vw, 3.625rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #93b4fb; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem; border-radius: var(--r-btn);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. LAYOUT ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--white { background: var(--card); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.on-dark {
  color: var(--on-dark);
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(37, 99, 235, 0.18), transparent 65%),
    linear-gradient(160deg, #101828 0%, #17202f 55%, #1d2939 100%);
}
.on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }
.on-dark p { color: var(--on-dark); }

.section-head { max-width: none; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head p { margin-top: 1.25rem; font-size: 1.125rem; max-width: none; }

.split { display: grid; gap: clamp(1.5rem, 5vw, 5rem); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }

/* 4. COMPONENTS ------------------------------------------------------------ */
.eyebrow {
  display: inline-block; margin: 0 0 1.25rem;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em;
  color: #93b4fb;
}
.eyebrow--light { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.5rem;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; border-radius: var(--r-btn); cursor: pointer;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease),
              color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28); }
.btn--secondary { background: transparent; color: var(--ink); border-color: #98a2b3; }
.btn--secondary:hover { border-color: var(--ink); background: #fff; }
.on-dark .btn--secondary { color: #fff; border-color: #667085; }
.on-dark .btn--secondary:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.875rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px;
  font-weight: 600; font-size: 0.9375rem; color: var(--accent); text-decoration: none;
  border-bottom: 1.5px solid transparent;
}
.text-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.text-link svg { width: 16px; height: 16px; transition: transform 0.22s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

.tag {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.5;
  background: var(--accent-tint); color: #1e40af;
}
.tag--muted { background: #f2f4f7; color: #475467; }

.media { overflow: hidden; border-radius: var(--r-img); background: var(--ink-2); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.32s var(--ease); }
a:hover .media img, .media:hover img { transform: scale(1.02); }

/* Header / navigation */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font-weight: 800; font-size: 1.375rem; letter-spacing: 0.06em; color: var(--ink); text-decoration: none;
}
.logo img { display: block; height: 48px; width: auto; max-width: none; }
.nav-list { display: flex; align-items: center; gap: 0.25rem; }
.nav-list a:not(.btn) {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem;
  font-size: 0.9375rem; font-weight: 550; color: var(--body); text-decoration: none;
  transition: color 0.2s;
}
.nav-list a:not(.btn)::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav-list a:not(.btn):hover { color: var(--ink); }
.nav-list a:not(.btn):hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-cta { margin-left: 0.75rem; }
.nav-cta .btn { min-height: 44px; padding: 0.55rem 1.15rem; font-size: 0.9375rem; }

.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 48px; height: 48px;
  background: transparent; border: 1.5px solid var(--line); border-radius: var(--r-btn); cursor: pointer; color: var(--ink);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.25s var(--ease), background-color 0.2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* 5. SECTIONS -------------------------------------------------------------- */

/* Hero */
.hero { padding-block: clamp(3rem, 6vw, 6rem); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin: 1.5rem 0 2.25rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--on-dark); max-width: 36rem; }
.hero .media { aspect-ratio: 2 / 1; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }

/* Introduction */
.why .split { grid-template-columns: 1fr; row-gap: clamp(1.5rem, 3vw, 2.5rem); }
.intro__head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.intro__lead { text-wrap: balance; margin: 0; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-size: 1.375rem; line-height: 1.4; font-weight: 550; color: var(--ink); letter-spacing: -0.015em; }
.intro__steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); counter-reset: none; }
.intro__steps li { position: relative; padding: 2rem 1.75rem 1.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.intro__steps li:not(:last-child)::after { content: ""; position: absolute; top: 3.5rem; left: calc(100% - 0.25rem); width: calc(clamp(1rem, 2vw, 1.75rem) + 0.5rem); height: 2px; background: var(--accent); opacity: 0.35; z-index: 1; }
.intro__num { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1.25rem; border-radius: 12px; background: var(--accent-tint); color: var(--accent); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }
.intro__steps h3 { margin-bottom: 0.75rem; }
.intro__steps p { font-size: 1.0625rem; max-width: none; }

/* Services: two feature cards then three, on a 6-column grid */
.services-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); }
.service { grid-column: span 2; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.service--feature { grid-column: span 3; }
.service .media { border-radius: 0; aspect-ratio: 4 / 3; }
.service--feature .media { aspect-ratio: 4 / 3; }
.service__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.5rem 1.25rem; }
.service__body h3 { margin-bottom: 0.75rem; }
.service__body p { font-size: 1rem; color: var(--body); }
.service__body .text-link { margin-top: auto; padding-top: 0.5rem; }
.service:hover { box-shadow: var(--shadow); }
.service { transition: box-shadow 0.3s var(--ease); }

/* Differentiators: quiet list, no cards */
.diff-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); }
.diff { grid-column: span 2; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 1.25rem; padding: 1.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.diff:nth-child(n+4) { grid-column: span 3; }
.diff__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); }
.diff__icon svg { width: 24px; height: 24px; }
.diff h3 { margin-bottom: 0.5rem; }
.diff p { font-size: 1rem; }

/* Product experience (kept compact: credibility, not the headline) */
.experience { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.experience .media { aspect-ratio: 16 / 10; }
.experience .body p { font-size: 1.125rem; max-width: none; }
.experience h2 { margin-bottom: 1.5rem; }

/* Customer journey: the one memorable moment */
.journey.on-dark {
  background:
    radial-gradient(900px 420px at 8% 104%, rgba(37, 99, 235, 0.16), transparent 65%),
    linear-gradient(200deg, #1d2939 0%, #101828 100%);
}
.journey .section-head { max-width: none; }
.journey-track { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 0 clamp(2.5rem, 5vw, 4rem); counter-reset: step; }
.journey-track::before, .journey-track::after {
  content: ""; position: absolute; top: 19px; left: calc(100% / 12); right: calc(100% / 12); height: 2px;
}
.journey-track::before { background: var(--line-dark); }
.journey-track::after { background: #6b96f7; transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease) 0.2s; }
.journey-track.is-visible::after { transform: scaleX(1); }
.journey-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.875rem; text-align: center; counter-increment: step; }
.journey-step::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-size: 0.9375rem; font-weight: 700; color: var(--on-dark-muted);
  background: #141d2c; border: 2px solid var(--line-dark);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.journey-track.is-visible .journey-step::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.journey-track.is-visible .journey-step:nth-child(1)::before { transition-delay: 0.2s; }
.journey-track.is-visible .journey-step:nth-child(2)::before { transition-delay: 0.55s; }
.journey-track.is-visible .journey-step:nth-child(3)::before { transition-delay: 0.9s; }
.journey-track.is-visible .journey-step:nth-child(4)::before { transition-delay: 1.25s; }
.journey-track.is-visible .journey-step:nth-child(5)::before { transition-delay: 1.6s; }
.journey-track.is-visible .journey-step:nth-child(6)::before { transition-delay: 1.95s; }
.journey-step span { font-size: 1.0625rem; font-weight: 650; color: #fff; }
.journey .media { aspect-ratio: 16 / 9; width: 100%; }

/* Process: a genuine sequence, so numbered */
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); counter-reset: process; }
.process li { counter-increment: process; padding-top: 1.25rem; border-top: 2px solid var(--line); position: relative; }
.process li::before { content: counter(process); display: block; margin-bottom: 0.75rem; font-size: 0.9375rem; font-weight: 700; color: var(--accent); }
.process li::after { content: ""; position: absolute; left: 0; top: -2px; width: 36px; height: 2px; background: var(--accent); }
.process h3 { margin-bottom: 0.625rem; }
.process p { font-size: 1rem; line-height: 1.6; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.project { display: flex; flex-direction: column; gap: 1rem; text-decoration: none; }
.project .media { aspect-ratio: 16 / 10; }
.project h3 { margin: 0.25rem 0 0.4rem; }
.project p { font-size: 1rem; color: var(--muted); }
.placeholder-note { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: #93370d; background: #fef0c7; border-radius: 6px; padding: 0.15rem 0.5rem; }
.section-foot { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

/* FAQ */
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding-block: 1rem;
  font-size: 1.125rem; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s var(--ease); }
.faq details[open] .faq__a { grid-template-rows: 1fr; }
.faq .faq__a > div { overflow: hidden; }
.faq .faq__a p { padding-bottom: 1.5rem; }

/* 6. FOOTER ---------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: 0.9688rem; }
.site-footer .logo { background: #fff; border-radius: 12px; padding: 0.35rem 0.75rem; }
.site-footer .logo img { height: 52px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-dark); }
.footer-grid h2 { margin-bottom: 1rem; font-size: 0.9375rem; font-weight: 650; letter-spacing: 0; color: #fff; }
.footer-grid p { margin-top: 1rem; max-width: 30ch; }
.footer-grid li a { display: inline-block; padding-block: 0.4rem; text-decoration: none; color: var(--on-dark-muted); transition: color 0.2s; }
.footer-grid li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact li { padding-block: 0.4rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.75rem; font-size: 0.875rem; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.footer-bottom a { display: inline-block; padding-block: 0.4rem; color: var(--on-dark-muted); text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* 7. MOTION ---------------------------------------------------------------- */
/* Content is always visible without JS; reveal only applies when JS has loaded. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: 0.08s; }
.js [data-reveal-delay="2"] { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .journey-track::after { transform: scaleX(1); }
  .journey-step::before { background: var(--accent); border-color: var(--accent); color: #fff; }
}

/* 8. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(16, 24, 40, 0.08);
    max-height: 0; overflow: hidden; visibility: hidden; opacity: 0;
    transition: max-height 0.35s var(--ease), opacity 0.25s, visibility 0s linear 0.35s;
  }
  .site-nav.is-open { max-height: calc(100vh - var(--header-h)); opacity: 1; visibility: visible; transition-delay: 0s; overflow-y: auto; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 0.75rem var(--gutter) 1.5rem; }
  .nav-list a:not(.btn) { display: flex; min-height: 52px; padding: 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .nav-list a:not(.btn)::after { display: none; }
  .nav-list a[aria-current="page"] { color: var(--accent); }
  .nav-cta { margin: 1.25rem 0 0; }
  .nav-cta .btn { width: 100%; min-height: 52px; }

  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .split, .experience { grid-template-columns: 1fr; }
  .intro__head { grid-template-columns: 1fr; align-items: start; }
  .intro__steps { grid-template-columns: 1fr; }
  .intro__steps li::after { display: none; }
  .diff-list { grid-template-columns: 1fr 1fr; }
  .diff, .diff:nth-child(n+4) { grid-column: span 1; }
  .diff:last-child { grid-column: span 2; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service, .service--feature { grid-column: span 1; }
  .service:last-child { grid-column: span 2; }
  .projects-grid { grid-template-columns: 1fr; max-width: 40rem; }
}

@media (max-width: 720px) {
  .diff-list { grid-template-columns: 1fr; }
  .diff:last-child { grid-column: span 1; }
  body { font-size: 1rem; }
  .hero { padding-block: 2.25rem 3rem; }
  .hero .lead { margin: 1.25rem 0 1.75rem; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .services-grid { grid-template-columns: 1fr; }
  .service:last-child { grid-column: span 1; }
  .intro__lead { font-size: 1.25rem; }

  /* Journey runs vertically on small screens */
  .journey-track { grid-template-columns: 1fr; gap: 1.25rem; padding-left: 0; }
  .journey-track::before, .journey-track::after { top: 20px; bottom: 20px; left: 19px; right: auto; width: 2px; height: auto; }
  .journey-track::after { transform: scaleY(0); transform-origin: top; }
  .journey-track.is-visible::after { transform: scaleY(1); }
  .journey-step { flex-direction: row; text-align: left; gap: 1rem; }

  .process { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-panel .btn-row .btn { flex: 1 1 100%; }
}

@media (min-width: 1600px) {
  :root { --wrap: 1280px; }
}


/* ==========================================================================
   9. ADDITIONS (multi-page build)
   ========================================================================== */
[hidden] { display: none !important; }

/* Breadcrumb (inside dark hero) */
.breadcrumb { margin-bottom: 1.5rem; font-size: 0.9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; }
.breadcrumb li { color: var(--on-dark-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: #667085; }
.breadcrumb a { color: var(--on-dark-muted); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current] { color: #fff; }

/* Hero without image */
.hero--simple .wrap { grid-template-columns: 1fr; }
.hero--simple.hero--media .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.hero--simple.hero--media .media { aspect-ratio: 16 / 9; }
.hero--simple h1 { max-width: 22ch; }
.hero .lead p { max-width: 38rem; }
.hero .lead p + p { margin-top: 1em; }

/* Checklist */
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; border-top: 1px solid var(--line); }
.checklist li { display: flex; gap: 0.75rem; align-items: flex-start; padding-block: 0.9rem; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 550; line-height: 1.45; }
.checklist svg { flex: none; width: 22px; height: 22px; margin-top: 1px; padding: 3px; border-radius: 6px; background: var(--accent-tint); color: var(--accent); }

/* Related services */
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.related__item { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.25rem; border-top: 2px solid var(--line); text-decoration: none; transition: border-color 0.25s var(--ease); }
.related__item:hover { border-top-color: var(--accent); }
.related__item p { font-size: 1rem; color: var(--body); }
.related__item .text-link { margin-top: 0.25rem; }
.related__item:hover .text-link svg { transform: translateX(3px); }

/* Statement / pull line */
.statement { margin-top: 1.75rem; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-size: 1.375rem; line-height: 1.4; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; max-width: 34rem; }

/* Services page rows */
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.svc-row + .svc-row { margin-top: clamp(3rem, 6vw, 5.5rem); }
.svc-row .media { aspect-ratio: 4 / 3; }
.svc-row:nth-child(even) .media { order: 2; }
.svc-row h2 { margin-bottom: 1rem; }
.svc-row p { font-size: 1.125rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 1rem; }

/* CTA panel: sits on a light section so it never merges with the footer */
.cta-section { padding-block: var(--section); }
.cta-panel { border-radius: 24px; padding: clamp(2rem, 6vw, 4.5rem); }
.cta-panel .inner { max-width: 46rem; }
.cta-panel h2 { margin-bottom: 1.25rem; }
.cta-panel p { margin-bottom: 2rem; font-size: 1.125rem; }

/* Projects filter */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter { min-height: 44px; padding: 0.5rem 1rem; font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--body); background: #fff; border: 1.5px solid #98a2b3; border-radius: var(--r-btn); cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter[aria-pressed="true"]::before { content: "\2713"; margin-right: 0.4rem; }
.projects-grid--page { max-width: none; }
.notice { display: flex; gap: 0.75rem; padding: 1rem 1.25rem; margin-bottom: 2rem; background: #fffaeb; border: 1px solid #fedf89; border-radius: var(--r-btn); color: #7a2e0e; font-size: 0.9688rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-list li { padding-block: 0.6rem; }
.contact-list strong { display: block; font-size: 0.875rem; font-weight: 650; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.map-embed { margin-top: 1.5rem; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.contact-aside h2 { font-size: 1.375rem; margin-bottom: 0.75rem; }
.contact-aside ul li { padding-block: 0.35rem; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.form-card fieldset { border: 0; margin: 0 0 2rem; padding: 0; min-width: 0; }
.form-card legend { padding: 0; margin-bottom: 1rem; font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: flex; align-items: center; gap: 0.75rem; min-height: 52px; padding: 0.6rem 1rem; border: 1.5px solid #d0d5dd; border-radius: var(--r-btn); font-weight: 550; font-size: 0.9688rem; color: var(--ink); background: #fff; transition: border-color 0.2s, background-color 0.2s; }
.choice span::before { content: ""; flex: none; width: 20px; height: 20px; border: 1.5px solid #d0d5dd; border-radius: 6px; background: #fff center / 14px no-repeat; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-tint); }
.choice input:checked + span::before { border-color: var(--accent); background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice:hover span { border-color: #98a2b3; }
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.field label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 0.7rem 0.9rem; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1.5px solid #d0d5dd; border-radius: var(--r-btn); transition: border-color 0.2s, box-shadow 0.2s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field-error { display: none; margin-top: 0.4rem; font-size: 0.875rem; font-weight: 600; color: #b42318; }
.field-error::before { content: "! "; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #b42318; }
.field.is-invalid .field-error { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }
.form-note a { color: var(--accent); }
.form-status { display: none; margin-top: 1.25rem; padding: 0.9rem 1rem; border-radius: var(--r-btn); background: #fffaeb; border: 1px solid #fedf89; color: #7a2e0e; font-size: 0.9688rem; }
.form-status.is-visible { display: block; }

/* Legal placeholder pages */
.prose { max-width: 46rem; }
.prose h2 { margin: 2rem 0 0.75rem; font-size: 1.5rem; }

@media (max-width: 960px) {
  .hero--simple.hero--media .wrap { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 1fr; }
  .svc-row:nth-child(even) .media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .checklist { grid-template-columns: 1fr; }
  .choices, .field-row { grid-template-columns: 1fr; }
  .cta-panel { border-radius: 18px; }
}
@media (max-width: 960px) { .projects-grid--page { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .projects-grid--page { grid-template-columns: 1fr; } }
.breadcrumb--light li, .breadcrumb--light a { color: var(--muted); }
.breadcrumb--light li + li::before { color: #98a2b3; }
.breadcrumb--light a:hover, .breadcrumb--light [aria-current] { color: var(--ink); }

/* Services dropdown -------------------------------------------------------- */
.has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle { display: inline-grid; place-items: center; width: 28px; height: 44px; margin-left: -0.35rem; padding: 0; background: none; border: 0; color: var(--body); cursor: pointer; }
.sub-toggle svg { transition: transform 0.2s var(--ease); }
.has-sub:hover .sub-toggle svg, .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub-nav {
  position: absolute; top: 100%; left: 0; z-index: 60; min-width: 17rem; padding: 0.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(16, 24, 40, 0.12);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s linear 0.2s;
}
.has-sub:hover .sub-nav, .has-sub:focus-within .sub-nav, .has-sub.is-open .sub-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav-list .sub-nav a:not(.btn) { display: block; padding: 0.6rem 0.85rem; border-radius: 8px; white-space: nowrap; }
.nav-list .sub-nav a:not(.btn)::after { display: none; }
.nav-list .sub-nav a:not(.btn):hover { background: var(--accent-tint); color: var(--accent); }
@media (max-width: 960px) {
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { width: 52px; height: 52px; margin: 0; border-bottom: 1px solid var(--line); }
  .sub-nav { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 0 1rem; border: 0; box-shadow: none; border-radius: 0; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.is-open .sub-nav { display: block; }
  .nav-list .sub-nav a:not(.btn) { min-height: 48px; display: flex; align-items: center; padding: 0; border-radius: 0; font-size: 1rem; }
}

/* Home page: light image backgrounds so artwork sits softly on the page */
.home .media { background: linear-gradient(145deg, #eef3fb 0%, #f7f9fc 100%); }
.home .hero .media { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.home .journey .media { background: none; }

/* Show service and banner artwork in full whatever its proportions */
.service .media img, .svc-row .media img, .hero--simple.hero--media .media img { object-fit: contain; }

/* Services page: same light image backgrounds as the home page */
.page-services .media { background: linear-gradient(145deg, #eef3fb 0%, #f7f9fc 100%); }

/* All hero banners: compact heading, artwork shown in full without a frame */
.hero { padding-block: clamp(2.5rem, 4.5vw, 4rem); }
.hero h1 { max-width: 24ch; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.15; letter-spacing: -0.025em; }
.hero .lead { margin: 1.25rem 0 1.75rem; font-size: 1.0625rem; }
.hero .media, .home .hero .media, .hero--simple.hero--media .media { aspect-ratio: auto; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.hero .media img { width: 100%; height: auto; max-height: 420px; object-fit: contain; }

/* About page: light image backgrounds */
.page-about .media { background: linear-gradient(145deg, #eef3fb 0%, #f7f9fc 100%); }
.page-about .hero .media { background: none; }

/* Site-wide soft pastel tones (blue, violet, mint, peach) for cards, icons and numbers.
   Each repeated item picks a tone by position, so pages are not one flat blue. */
.intro__steps li:nth-child(4n+1), .services-grid .service:nth-child(4n+1), .diff:nth-child(4n+1), .process li:nth-child(4n+1), .svc-row:nth-child(4n+1), .related__item:nth-child(4n+1), .project:nth-child(4n+1) { --t-bg: #e3edff; --t-soft: #f3f7ff; --t-fg: #2563eb; --t-ink: #1d4ed8; }
.intro__steps li:nth-child(4n+2), .services-grid .service:nth-child(4n+2), .diff:nth-child(4n+2), .process li:nth-child(4n+2), .svc-row:nth-child(4n+2), .related__item:nth-child(4n+2), .project:nth-child(4n+2) { --t-bg: #ebe6ff; --t-soft: #f7f5ff; --t-fg: #7c5cdb; --t-ink: #5b3fc4; }
.intro__steps li:nth-child(4n+3), .services-grid .service:nth-child(4n+3), .diff:nth-child(4n+3), .process li:nth-child(4n+3), .svc-row:nth-child(4n+3), .related__item:nth-child(4n+3), .project:nth-child(4n+3) { --t-bg: #dcf4ea; --t-soft: #f1fbf6; --t-fg: #14a57a; --t-ink: #0b7a5a; }
.intro__steps li:nth-child(4n+4), .services-grid .service:nth-child(4n+4), .diff:nth-child(4n+4), .process li:nth-child(4n+4), .svc-row:nth-child(4n+4), .related__item:nth-child(4n+4), .project:nth-child(4n+4) { --t-bg: #ffe9d6; --t-soft: #fff7f0; --t-fg: #e8832a; --t-ink: #b45309; }

.intro__steps li { background: var(--t-soft); border-color: var(--t-bg); }
.intro__num { background: #fff; color: var(--t-ink); box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06); }
.intro__steps li:not(:last-child)::after { background: var(--t-fg); opacity: 0.5; }

.service { border-color: var(--t-bg); }
.service .media { background: linear-gradient(145deg, var(--t-bg) 0%, var(--t-soft) 100%); }
.service .text-link { color: var(--t-ink); }

.diff { background: var(--t-soft); border-color: var(--t-bg); }
.diff__icon { background: var(--t-bg); color: var(--t-fg); }

.process li { border-top-color: var(--t-bg); }
.process li::before { color: var(--t-ink); }
.process li::after { background: var(--t-fg); }

/* Services page rows */
.svc-row .media { background: linear-gradient(145deg, var(--t-bg) 0%, var(--t-soft) 100%); }
.svc-row .text-link { color: var(--t-ink); }
.svc-row .tag--muted { background: var(--t-bg); color: var(--t-ink); }

/* Related-service cards and checklists on individual service pages */
.related__item { padding: 1.5rem; background: var(--t-soft); border: 1px solid var(--t-bg); border-radius: var(--r-card); }
.related__item:hover { border-color: var(--t-fg); }
.related__item .text-link { color: var(--t-ink); }
.checklist li svg { background: #dcf4ea; color: #14a57a; }

/* Project cards (page currently hidden) */
.project .media { background: linear-gradient(145deg, var(--t-bg) 0%, var(--t-soft) 100%); }

.form-status.is-success { background: #ecfdf3; border-color: #a6f4c5; color: #05603a; }

/* Legal pages */
.prose ul { margin: 0 0 1em; padding-left: 1.25rem; list-style: disc; }
.prose li { padding-block: 0.2rem; }
.prose li::marker { color: var(--accent); }
.prose h1 { margin-bottom: 0.5rem; }
.legal-meta { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.prose a { color: var(--accent); }

/* Form popup: sending -> success / error */
.popup { --pc: #2563eb; --pc-soft: #e3edff; position: fixed; inset: 0; margin: auto; width: min(92vw, 27rem); padding: 2.5rem 2rem 2rem; border: 0; border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(16, 24, 40, 0.35); color: var(--body); overflow: visible; }
.popup::backdrop { background: rgba(16, 24, 40, 0.6); backdrop-filter: blur(3px); }
.popup[open] { animation: popup-in 0.35s var(--ease); }
@keyframes popup-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }
.popup[data-state="success"] { --pc: #14a57a; --pc-soft: #dcf4ea; }
.popup[data-state="error"] { --pc: #e8832a; --pc-soft: #ffe9d6; }
.popup__bar { position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 24px 24px 0 0; background: linear-gradient(90deg, #2563eb, #7c5cdb, #14a57a); }

.popup__visual { position: relative; display: grid; place-items: center; width: 110px; height: 110px; margin: 0 auto 1.25rem; }
.popup__badge { position: relative; z-index: 2; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--pc-soft); color: var(--pc); transition: background-color 0.35s, color 0.35s; }
.popup__badge svg { grid-area: 1 / 1; width: 34px; height: 34px; transition: opacity 0.25s, transform 0.4s var(--ease); }
.popup__badge .popup__spin { position: absolute; inset: 0; width: 100%; height: 100%; }
.popup__spin circle { stroke: var(--pc); stroke-dasharray: 70 150; transform-origin: 50% 50%; }
.popup__spin { animation: popup-spin 1.1s linear infinite; }
@keyframes popup-spin { to { transform: rotate(360deg); } }
.popup__plane { animation: popup-fly 1.6s ease-in-out infinite; }
@keyframes popup-fly { 0%, 100% { transform: translate(-2px, 2px); } 50% { transform: translate(3px, -3px); } }
.popup__check path { stroke-dasharray: 26; stroke-dashoffset: 26; }
.popup__check, .popup__alert { opacity: 0; transform: scale(0.6); }

.popup__ripple { position: absolute; inset: 10px; border-radius: 50%; border: 2px solid var(--pc); opacity: 0; }
.popup__dot { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--pc); opacity: 0; }
.popup__dot:nth-of-type(even) { background: #7c5cdb; }
.popup__dot:nth-of-type(3n) { background: #e8832a; }

.popup h2 { margin-bottom: 0.6rem; font-size: 1.55rem; }
.popup p { margin: 0 auto 1.5rem; max-width: 22rem; }
.popup__progress { height: 5px; margin: 0 auto 0.25rem; max-width: 14rem; border-radius: 99px; background: var(--pc-soft); overflow: hidden; }
.popup__progress span { display: block; width: 40%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2563eb, #7c5cdb); animation: popup-bar 1.3s ease-in-out infinite; }
@keyframes popup-bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.popup__close { min-width: 9rem; }

/* sending */
.popup[data-state="sending"] .popup__close { display: none; }
/* success */
.popup[data-state="success"] .popup__progress, .popup[data-state="error"] .popup__progress { display: none; }
.popup[data-state="success"] .popup__spin, .popup[data-state="success"] .popup__plane,
.popup[data-state="error"] .popup__spin, .popup[data-state="error"] .popup__plane { opacity: 0; animation: none; }
.popup[data-state="success"] .popup__badge { animation: popup-pop 0.5s var(--ease); }
.popup[data-state="success"] .popup__check { opacity: 1; transform: none; }
.popup[data-state="success"] .popup__check path { animation: popup-draw 0.5s 0.15s ease forwards; }
.popup[data-state="success"] .popup__ripple { animation: popup-ripple 1.3s ease-out; }
.popup[data-state="success"] .popup__ripple--2 { animation-delay: 0.25s; }
.popup[data-state="success"] .popup__dot { animation: popup-burst 0.9s 0.1s ease-out forwards; }
@keyframes popup-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes popup-draw { to { stroke-dashoffset: 0; } }
@keyframes popup-ripple { 0% { transform: scale(0.8); opacity: 0.55; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes popup-burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-54px) scale(0.4); } }
/* error */
.popup[data-state="error"] .popup__alert { opacity: 1; transform: none; }
.popup[data-state="error"] .popup__badge { animation: popup-shake 0.5s; }
@keyframes popup-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

@media (prefers-reduced-motion: reduce) {
  .popup[open], .popup__spin, .popup__plane, .popup__progress span, .popup__badge, .popup__ripple, .popup__dot { animation: none !important; }
  .popup__check path { stroke-dashoffset: 0 !important; animation: none !important; }
}
