/* ==========================================================================
   ImliStack — design system
   Tokens → base → layout → components → sections → utilities
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --charcoal: #1f2933;
  --charcoal-2: #27333f;
  --charcoal-3: #323f4c;
  --copper: #a05a3c;
  --copper-strong: #8a4a2f;
  --copper-soft: #f3e6df;
  --copper-on-dark: #d9926f;
  --sage: #55624f;
  --sage-soft: #e6e9e1;
  --sage-on-dark: #a9b79f;
  --ivory: #f8f6f1;
  --sand: #efebe3;
  --stone: #d9d3c7;
  --slate: #64748b;

  /* Semantic */
  --bg: var(--ivory);
  --bg-alt: var(--sand);
  --surface: #ffffff;
  --text: var(--charcoal);
  --text-muted: #56616f;
  --line: rgba(31, 41, 51, 0.12);
  --line-strong: rgba(31, 41, 51, 0.22);
  --focus: #a05a3c;

  /* Type */
  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --fs-h4: clamp(1.15rem, 1.08rem + 0.35vw, 1.375rem);
  --fs-h3: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  --fs-h2: clamp(1.9rem, 1.5rem + 1.9vw, 3.1rem);
  --fs-h1: clamp(2.4rem, 1.7rem + 3.4vw, 4.6rem);
  --fs-display: clamp(2.7rem, 1.8rem + 4.4vw, 5.6rem);

  /* Space (8pt) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section: clamp(4.5rem, 3rem + 6vw, 8.5rem);

  /* Shape & depth */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(31, 41, 51, 0.18);
  --shadow-lg: 0 30px 60px -24px rgba(31, 41, 51, 0.28);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-4);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); letter-spacing: -0.015em; }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--copper); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--copper-strong); }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.2em; }
li + li { margin-top: var(--s-2); }

strong { font-weight: 600; color: var(--text); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

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

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--charcoal);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); color: #fff; }

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 860px; }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--alt { background: var(--bg-alt); }
.section--white { background: var(--surface); }
.section--dark {
  --text: var(--ivory);
  --text-muted: #b7c0ca;
  --line: rgba(248, 246, 241, 0.14);
  --line-strong: rgba(248, 246, 241, 0.28);
  --focus: var(--copper-on-dark);
  background: var(--charcoal);
  color: var(--ivory);
}
.section--dark a:not(.btn) { color: var(--copper-on-dark); }
.section--dark strong { color: #fff; }
.section + .section--alt,
.section--alt + .section--alt { border-top: 0; }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.split {
  display: grid;
  gap: var(--s-7);
  align-items: start;
}
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); }
  .split--even { grid-template-columns: 1fr 1fr; }
  .split--center { align-items: center; }
  .split--rev > :first-child { order: 2; }
  .sticky { position: sticky; top: calc(var(--header-h) + 32px); }
}

.stack > * + * { margin-top: var(--s-4); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section--dark .eyebrow { color: var(--copper-on-dark); }
.eyebrow__num { color: var(--text-muted); font-weight: 600; }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 62ch;
}
.muted { color: var(--text-muted); }
.accent { color: var(--copper); }
.section--dark .accent { color: var(--copper-on-dark); }
.small { font-size: var(--fs-sm); }

.section-head { max-width: 760px; margin-bottom: var(--s-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-5);
}
.section-head--row > div { max-width: 720px; }

/* Answer-first block (AEO): concise definition that engines can quote */
.answer {
  border-left: 3px solid var(--copper);
  padding: var(--s-2) 0 var(--s-2) var(--s-5);
  font-size: var(--fs-lg);
  line-height: 1.6;
  max-width: 70ch;
}
.section--dark .answer { border-color: var(--copper-on-dark); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--charcoal);
  --btn-fg: #fff;
  --btn-border: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 1.5px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn svg { width: 1.05em; height: 1.05em; transition: transform var(--dur) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { --btn-bg: var(--copper); }
.btn--primary:hover { --btn-bg: var(--copper-strong); }
.btn--dark:hover { --btn-bg: #111921; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-border: var(--line-strong); }
.btn--ghost:hover { --btn-border: var(--text); }
.section--dark .btn--ghost { --btn-fg: var(--ivory); }
.section--dark .btn--primary:hover { --btn-bg: #b4664a; }
.btn--light { --btn-bg: var(--ivory); --btn-fg: var(--charcoal); }
.btn--light:hover { --btn-bg: #fff; }
.btn--sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text);
}
.link-arrow svg { width: 1em; height: 1em; color: var(--copper); transition: transform var(--dur) var(--ease); }
.link-arrow:hover { color: var(--copper); }
.link-arrow:hover svg { transform: translateX(4px); }
.section--dark .link-arrow { color: var(--ivory); }
.section--dark .link-arrow svg { color: var(--copper-on-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 246, 241, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--charcoal);
  flex-shrink: 0;
}
.brand img { width: 30px; height: 40px; }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--charcoal);
}
.brand__word b { font-weight: 800; }
.brand__word span { font-weight: 400; }
.section--dark .brand__word, .site-footer .brand__word { color: var(--ivory); }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.nav__list > li { margin: 0; position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  background: none;
  border-radius: 999px;
  color: var(--charcoal);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { background: rgba(31, 41, 51, 0.06); color: var(--charcoal); }
.nav__link[aria-current="page"], .nav__link.is-active { color: var(--copper); }
.nav__link svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(760px, 90vw);
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.mega.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-1) var(--s-4); list-style: none; margin: 0; padding: 0; }
.mega__grid li { margin: 0; }
.mega__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--charcoal);
  transition: background var(--dur) var(--ease);
}
.mega__item:hover { background: var(--ivory); color: var(--charcoal); }
.mega__text strong { display: block; font-family: var(--font-display); font-size: 0.95rem; line-height: 1.3; }
.mega__text > span { display: block; font-size: 0.85rem; line-height: 1.45; color: var(--text-muted); margin-top: 2px; }
.mega__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--copper-soft);
  color: var(--copper);
}
.icon-tile svg { width: 20px; height: 20px; }
.icon-tile--sage { background: var(--sage-soft); color: var(--sage); }
.icon-tile--lg { width: 52px; height: 52px; border-radius: 14px; }
.icon-tile--lg svg { width: 24px; height: 24px; }
.section--dark .icon-tile { background: rgba(217, 146, 111, 0.14); color: var(--copper-on-dark); }

.header-cta { display: none; }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  overflow-y: auto;
  padding: var(--s-5) var(--gutter) var(--s-8);
  background: var(--ivory);
  border-top: 1px solid var(--line);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav li { margin: 0; }
.mobile-nav > ul > li { border-bottom: 1px solid var(--line); }
.mobile-nav a, .mobile-nav summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-4) 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary svg { width: 18px; transition: transform var(--dur) var(--ease); }
.mobile-nav details[open] summary svg { transform: rotate(180deg); }
.mobile-nav details ul { padding: 0 0 var(--s-4) var(--s-4); }
.mobile-nav details a { font-size: 1rem; font-weight: 600; padding: var(--s-2) 0; color: var(--text-muted); }
.mobile-nav .btn { width: 100%; margin-top: var(--s-6); }
body.nav-open { overflow: hidden; }

@media (min-width: 1160px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(4rem, 2rem + 6vw, 7.5rem);
  overflow: hidden;
}
.hero__grid { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); } }
.hero h1 { font-size: var(--fs-display); margin-bottom: var(--s-5); }
.hero h1 .accent { display: block; }
.hero .lead { margin-bottom: var(--s-6); }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  list-style: none;
  padding-left: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.hero__meta li { margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__meta svg { width: 16px; height: 16px; color: var(--sage); flex-shrink: 0; }

.blueprint { position: relative; }
.blueprint svg { width: 100%; height: auto; }

.page-hero { padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(3rem, 2rem + 3vw, 5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: var(--s-4); }
.page-hero .btn-row { margin-top: var(--s-6); }

.breadcrumbs { margin-bottom: var(--s-6); font-size: var(--fs-sm); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: 0; color: var(--text-muted); }
.breadcrumbs li { margin: 0; display: inline-flex; gap: var(--s-2); align-items: center; }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--copper); text-decoration: underline; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card h3, .card h4 { margin-bottom: var(--s-1); }
.card p { color: var(--text-muted); }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card--link .link-arrow { margin-top: auto; padding-top: var(--s-3); }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link { text-decoration: none; color: inherit; }
.card__link:hover { color: inherit; }
.card--flat { background: transparent; }
.card--sand { background: var(--sand); border-color: transparent; }
.section--alt .card--sand { background: var(--ivory); }
.section--dark .card { background: var(--charcoal-2); border-color: var(--line); }
.section--dark .card p { color: var(--text-muted); }

.card__num {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: var(--s-2) 0 0; }
.tag-list li { margin: 0; }
.tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  background: transparent;
}
.tag--solid { background: var(--sand); border-color: transparent; color: var(--charcoal); }
.section--alt .tag--solid { background: var(--surface); }
.section--dark .tag { color: #d0d6dd; }

.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.8rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355624F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.65rem no-repeat;
}
.section--dark .check-list li::before { background-color: rgba(169, 183, 159, 0.18); }
.x-list { list-style: none; padding: 0; }
.x-list li { position: relative; padding-left: 1.8rem; color: var(--text-muted); }
.x-list li::before { content: "—"; position: absolute; left: 0.1rem; color: var(--line-strong); }

/* ---------- Service index (homepage) ---------- */
.service-index { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.service-index li { margin: 0; border-bottom: 1px solid var(--line); }
.service-index a {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-5) var(--s-2);
  text-decoration: none;
  color: var(--text);
  transition: background var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.service-index a { position: relative; isolation: isolate; }
.service-index a::before { content: ""; position: absolute; inset: 0 calc(var(--s-4) * -1); z-index: -1; border-radius: var(--r-md); background: var(--surface); opacity: 0; transform: scaleY(0.92); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.service-index a:hover::before, .service-index a:focus-visible::before { opacity: 1; transform: none; }
.service-index a:hover h3 { color: var(--copper); }
.service-index h3 { transition: color var(--dur) var(--ease); }
.service-index .num { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700; color: var(--copper); }
.service-index h3 { margin: 0; font-size: var(--fs-h4); }
.service-index p { margin: 0.25rem 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.service-index svg { width: 22px; height: 22px; color: var(--copper); transition: transform var(--dur) var(--ease); }
.service-index a:hover > svg { transform: translateX(4px); }
@media (min-width: 900px) {
  .service-index a { grid-template-columns: 4rem minmax(0, 0.9fr) minmax(0, 1.1fr) auto; gap: var(--s-6); }
  .service-index p { margin: 0; font-size: var(--fs-base); }
}

/* ---------- Stats / proof ---------- */
.proof-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-bar > div { padding: var(--s-6) var(--s-5); border-right: 1px solid var(--line); }
.proof-bar > div:last-child { border-right: 0; }
.proof-bar dt { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--s-2); }
.proof-bar dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  order: -1;
}
.proof-bar dl, .proof-bar > div { display: flex; flex-direction: column; }
@media (max-width: 640px) {
  .proof-bar > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .proof-bar > div:last-child { border-bottom: 0; }
}

/* ---------- Process ---------- */
.process { counter-reset: step; display: grid; gap: var(--s-4); list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .process { grid-template-columns: repeat(var(--steps, 4), 1fr); gap: 0; } }
.process > li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: var(--s-6) var(--s-5) var(--s-5);
  border-top: 2px solid var(--line-strong);
}
.process > li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--copper);
}
.section--dark .process > li::before { color: var(--copper-on-dark); }
.process > li::after {
  content: "";
  position: absolute;
  top: -6px;
  left: var(--s-5);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--copper);
}
.section--dark .process > li::after { background: var(--copper-on-dark); }
.process h3 { font-size: var(--fs-h4); }
.process p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- Engagement / offer cards ---------- */
.offer {
  display: flex;
  flex-direction: column;
  padding: var(--s-6);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
}
.offer__label {
  align-self: flex-start;
  margin-bottom: var(--s-5);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--copper-soft);
  color: var(--copper-strong);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.offer h3 { font-size: var(--fs-h3); }
.offer > p { color: var(--text-muted); }
.offer dl { margin: var(--s-5) 0; display: grid; gap: var(--s-4); }
.offer dt { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.offer dd { margin: 0.2rem 0 0; font-size: var(--fs-sm); }
.offer .btn { margin-top: auto; align-self: flex-start; }
.section--dark .offer { background: var(--charcoal-2); }
.section--dark .offer__label { background: rgba(217, 146, 111, 0.16); color: var(--copper-on-dark); }

/* ---------- Work / case study ---------- */
.work-feature {
  display: grid;
  gap: var(--s-6);
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--r-xl);
  background: var(--charcoal);
  color: var(--ivory);
  overflow: hidden;
}
@media (min-width: 960px) { .work-feature { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: var(--s-8); } }
.work-feature h3 { color: #fff; font-size: var(--fs-h2); }
.work-feature p { color: #c3cbd3; }
.work-feature .eyebrow { color: var(--copper-on-dark); }
.work-feature .tag { color: #d0d6dd; border-color: rgba(248, 246, 241, 0.18); }
.work-feature .link-arrow { color: var(--ivory); }
.work-feature .link-arrow svg { color: var(--copper-on-dark); }
.work-feature .btn--ghost { --btn-fg: var(--ivory); --btn-border: rgba(248,246,241,.3); }

.browser {
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0f151b;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #161e26; }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4552; }
.browser__bar span { margin-left: 10px; font-size: 12px; color: #8c98a4; font-family: var(--font-body); }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--s-4);
  margin: var(--s-5) 0;
  padding: 0;
}
.facts div { padding-top: var(--s-3); border-top: 1px solid var(--line-strong); }
.facts dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 600; }
.facts dd { margin: 0.25rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.work-feature .facts div { border-color: rgba(248, 246, 241, 0.2); }
.work-feature .facts dt { color: #9aa6b2; }

.work-card { padding: 0; overflow: hidden; }
.work-card__media {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.work-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work-card__media--phones { background: linear-gradient(160deg, var(--sand), var(--stone)); padding: var(--s-5) var(--s-5) 0; place-items: end center; }
.work-card__media--phones img { width: auto; height: 100%; max-height: 260px; object-fit: contain; border-radius: 14px 14px 0 0; box-shadow: var(--shadow-md); }
.work-card__body { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); flex: 1; }
.work-card__meta { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); font-family: var(--font-display); }
.store-links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin-top: auto; padding-top: var(--s-3); }

.media-placeholder {
  display: grid;
  place-items: center;
  gap: var(--s-2);
  width: 100%;
  height: 100%;
  padding: var(--s-5);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.media-placeholder img { width: 44px; height: 58px; opacity: 0.9; }

.cs-section { padding-block: var(--s-8); border-top: 1px solid var(--line); }
.cs-section:first-child { border-top: 0; }
.cs-section h2 { font-size: var(--fs-h3); }
.cs-aside { font-size: var(--fs-sm); }
.cs-aside dl { display: grid; gap: var(--s-4); margin: 0; }
.cs-aside dt { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.cs-aside dd { margin: 0.2rem 0 0; font-weight: 500; }

.arch {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.arch__row { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-4); align-items: start; padding-bottom: var(--s-3); border-bottom: 1px dashed var(--line); }
.arch__row:last-child { border-bottom: 0; padding-bottom: 0; }
.arch__row > span { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--copper); padding-top: 0.3rem; }
@media (max-width: 560px) { .arch__row { grid-template-columns: 1fr; gap: var(--s-2); } }

/* ---------- Tech matrix ---------- */
.tech-group { padding: var(--s-6) 0; border-top: 1px solid var(--line); display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .tech-group { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-7); } }
.tech-group h3 { font-size: var(--fs-h4); margin-bottom: var(--s-2); }
.tech-group p { color: var(--text-muted); font-size: var(--fs-sm); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--fs-sm); color: var(--text-muted); list-style: none; padding: 0; }
.legend li { margin: 0; display: inline-flex; align-items: center; gap: var(--s-2); }
.tag--proven { border-color: rgba(85, 98, 79, 0.45); color: var(--charcoal); background: var(--sage-soft); }
.tag--working { border-style: dashed; }

/* ---------- Founder ---------- */
.founder {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}
@media (min-width: 900px) { .founder { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.founder__photo {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--sand);
}
.founder__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.founder__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: linear-gradient(90deg, var(--copper) 0 50%, var(--sage) 50% 100%);
}
.founder blockquote {
  margin: 0 0 var(--s-5);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A05A3C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__a { padding: 0 0 var(--s-5); max-width: 72ch; color: var(--text-muted); }
.section--dark .faq summary::after { border-color: var(--line-strong); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 2rem + 4vw, 5rem);
  border-radius: var(--r-xl);
  background: var(--charcoal);
  color: var(--ivory);
}
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band p { color: #c3cbd3; max-width: 56ch; }
.cta-band .btn-row { margin-top: var(--s-6); }
.cta-band__mark {
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 320px;
  opacity: 0.08;
  pointer-events: none;
}
@media (max-width: 700px) { .cta-band__mark { width: 200px; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; gap: var(--s-5); }
@media (min-width: 720px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label, .field legend {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--charcoal);
}
.field .req { color: var(--copper); }
.field .hint { font-size: var(--fs-xs); color: var(--text-muted); }
.input, .select, .textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--charcoal);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.textarea { min-height: 150px; resize: vertical; }
.select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F2933' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 1rem center / 16px no-repeat; padding-right: 2.75rem; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--slate); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 4px rgba(160, 90, 60, 0.16); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: #b42318; }
.field__error { font-size: var(--fs-xs); color: #b42318; font-weight: 600; }
.field__error:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choice-group { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  background: var(--surface);
  transition: all var(--dur) var(--ease);
}
.choice input:checked + span { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.consent { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-muted); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--copper); flex-shrink: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  border: 1px solid var(--line);
  background: var(--sand);
}
.notice--success { background: var(--sage-soft); border-color: rgba(85, 98, 79, 0.35); color: #2e3829; }
.notice--error { background: #fdecea; border-color: #f5c2bd; color: #7a1a12; }
.notice--pending { background: var(--copper-soft); border-color: rgba(160, 90, 60, 0.3); color: #5e321f; }
.notice[hidden] { display: none; }

.contact-card { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.contact-card h3 { font-size: var(--fs-h4); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.contact-list li { margin: 0; display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3); align-items: start; }
.contact-list small { display: block; color: var(--text-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: #c3cbd3;
  padding: var(--s-9) 0 var(--s-6);
  font-size: var(--fs-sm);
}
.site-footer a { color: #c3cbd3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__top { display: grid; gap: var(--s-7); }
@media (min-width: 960px) { .footer__top { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.footer__brand p { margin-top: var(--s-4); max-width: 34ch; }
.footer__tagline { font-family: var(--font-display); color: var(--ivory); font-weight: 600; font-size: 1.05rem; }
.footer__tagline span { color: var(--copper-on-dark); }
.footer__cols { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.footer__cols h2 {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8c98a4;
  margin-bottom: var(--s-4);
}
.footer__cols ul { list-style: none; padding: 0; margin: 0; }
.footer__cols li + li { margin-top: var(--s-3); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(248, 246, 241, 0.12);
  color: #8c98a4;
}
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: var(--s-5); list-style: none; padding: 0; margin: 0; }
.footer__bottom li { margin: 0; }
.social { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(248, 246, 241, 0.18);
}
.social a:hover { border-color: var(--copper-on-dark); }
.social svg { width: 18px; height: 18px; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.maxw-60 { max-width: 60ch; }
.divider-dot { color: var(--line-strong); padding-inline: 0.4rem; }

.pill-note {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--s-5);
}
.pill-note b {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
}
a.pill-note:hover { border-color: var(--line-strong); color: var(--charcoal); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

.blueprint .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards; }
.blueprint .fade { opacity: 0; animation: fade 0.8s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

@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; }
  .reveal { opacity: 1; transform: none; }
  .blueprint .draw { stroke-dashoffset: 0; }
  .blueprint .fade { opacity: 1; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .mobile-nav { display: none !important; }
  body { background: #fff; }
}

/* Heading-size utilities (keep semantic level, change visual size) */
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.h4 { font-size: var(--fs-h4); }
.pill-note svg { width: 14px; height: 14px; color: var(--copper); flex-shrink: 0; }
svg { flex-shrink: 0; }
@media (min-width: 960px) { .split--form { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.pill-note b { white-space: nowrap; }
.contact-list li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
/* Header's backdrop-filter makes it the containing block, so size the panel explicitly */
.mobile-nav { position: absolute; inset: auto 0 auto 0; top: 100%; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.mobile-nav a.btn { justify-content: center; gap: 0.6em; padding: 0.75rem 1.4rem; color: #fff; font-size: 1rem; }

/* ---------- Icon placements ---------- */
.mega__item .icon-tile { width: 40px; height: 40px; }

.service-index a { grid-template-columns: 2rem 40px minmax(0, 1fr) auto; }
.service-index .si-text h3 + p { margin-top: 0.25rem; }
@media (min-width: 900px) {
  .service-index a { grid-template-columns: 3rem 48px minmax(0, 1fr) auto; }
  .service-index .si-text { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-6); align-items: center; }
  .service-index .si-text p { margin: 0; }
  .service-index .icon-tile { width: 48px; height: 48px; }
}
.service-index a:hover .icon-tile { background: var(--copper); color: #fff; }
.icon-tile { transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.card--link:hover .icon-tile { background: var(--copper); color: #fff; }
.card--link:hover .icon-tile--sage { background: var(--sage); }

.proof-bar .proof-icon { width: 22px; height: 22px; color: var(--copper); margin-bottom: var(--s-4); order: -2; }

.offer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.offer__head .offer__label { margin-bottom: 0; }

.process > li .step-icon {
  position: absolute;
  top: var(--s-6);
  right: var(--s-5);
  width: 22px;
  height: 22px;
  color: var(--copper);
  opacity: 0.9;
}
.section--dark .process > li .step-icon { color: var(--copper-on-dark); }

.h-icon { display: flex; align-items: center; gap: var(--s-2); }
.h-icon svg { width: 18px; height: 18px; color: var(--copper); }
.section--dark .h-icon svg { color: var(--copper-on-dark); }

.facts dt { display: flex; align-items: center; gap: 0.4rem; }
.facts dt svg { width: 14px; height: 14px; color: var(--copper-on-dark); }
.cs-aside dt { display: flex; align-items: center; gap: 0.4rem; }
.cs-aside dt svg { width: 14px; height: 14px; color: var(--copper); }
.work-card__meta { display: flex; align-items: center; gap: 0.4rem; }
.work-card__meta svg { width: 14px; height: 14px; }
.tag--icon { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.85rem; }
.tag--icon svg { width: 15px; height: 15px; color: var(--copper); }

/* ==========================================================================
   Hover fixes
   ========================================================================== */
/* Ghost buttons on dark surfaces keep a visible border on hover */
.btn--on-dark,
.work-feature .btn--ghost,
.cta-band .btn--ghost { --btn-fg: var(--ivory); --btn-border: rgba(248, 246, 241, 0.3); }
.btn--on-dark:hover,
.work-feature .btn--ghost:hover,
.cta-band .btn--ghost:hover,
.section--dark .btn--ghost:hover { --btn-border: var(--ivory); --btn-bg: rgba(248, 246, 241, 0.06); }
.btn:active { transform: translateY(0) scale(0.98); }

/* Hover bridge so the pointer can cross the gap into the mega menu */
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }

/* Link-cards: title takes the accent, accent line grows along the top */
.card--link { overflow: hidden; }
.card--link::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--copper), var(--sage));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}
.card--link:hover::before, .card--link:focus-within::before { transform: scaleX(1); }
.card--link:hover h3, .card--link:focus-within h3 { color: var(--copper); }
.card--link h3 { transition: color var(--dur) var(--ease); }
.card--link:hover .link-arrow svg { transform: translateX(4px); }
.card--link:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card__link:focus-visible { outline: none; }
a.card { color: inherit; }
.work-card:hover .work-card__media img { transform: scale(1.03); }
.work-card__media img { transition: transform 600ms var(--ease); }

/* Nav: underline slides in instead of a pill flash */
.nav__link { position: relative; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { background: transparent; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after, .nav__link[aria-expanded="true"]::after { transform: scaleX(1); }
.nav__link svg { margin-right: -0.15rem; }
.mega__item { transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.mega__item:hover { transform: translateX(2px); }
.mega__item:hover .icon-tile { background: var(--copper); color: #fff; }

/* Footer links: gentle nudge */
.footer__cols a { display: inline-block; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.footer__cols a:hover { transform: translateX(3px); text-decoration: none; color: #fff; }
.social a { transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.social a:hover { background: rgba(217, 146, 111, 0.12); transform: translateY(-2px); }

/* Founder photo + screenshots */
.founder__photo img { transition: transform 900ms var(--ease); }
.founder__photo:hover img { transform: scale(1.03); }
.work-feature .browser img, figure.browser img { transition: object-position 6s ease-in-out; }
.work-feature:hover .browser img, figure.browser:hover img { object-position: bottom; }

/* ==========================================================================
   Motion system
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-ring { 0% { transform: scale(0.8); opacity: 0.7; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes line-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Page entrance: hero copy rises in sequence */
.hero .hero__grid > div:first-child > *,
.page-hero .container > :not(.split),
.page-hero .split > div > * {
  animation: rise 800ms var(--ease) both;
}
.hero .hero__grid > div:first-child > :nth-child(2), .page-hero .container > :nth-child(2), .page-hero .split > div > :nth-child(2) { animation-delay: 80ms; }
.hero .hero__grid > div:first-child > :nth-child(3), .page-hero .container > :nth-child(3), .page-hero .split > div > :nth-child(3) { animation-delay: 160ms; }
.hero .hero__grid > div:first-child > :nth-child(4), .page-hero .container > :nth-child(4), .page-hero .split > div > :nth-child(4) { animation-delay: 240ms; }
.hero .hero__grid > div:first-child > :nth-child(5), .page-hero .container > :nth-child(5), .page-hero .split > div > :nth-child(5) { animation-delay: 320ms; }
.hero .hero__grid > div:first-child > :nth-child(n+6), .page-hero .container > :nth-child(n+6) { animation-delay: 400ms; }
.page-hero .split > div:last-child > * { animation-delay: 260ms; }
.page-hero .split > aside { animation: rise 900ms 300ms var(--ease) both; }
.blueprint { animation: fade-in 900ms 200ms var(--ease) both; }
.blueprint svg { animation: float 9s ease-in-out 1.6s infinite; }

/* Data packets travelling through the architecture diagram */
.blueprint .packet { offset-rotate: 0deg; animation: travel 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.blueprint .packet:nth-of-type(2) { animation-delay: 0.9s; }
.blueprint .packet:nth-of-type(3) { animation-delay: 1.8s; }
.blueprint .packet--down-1 { offset-path: path("M108 120 V150 H280 V172"); }
.blueprint .packet--down-2 { offset-path: path("M452 120 V150 H280 V172"); animation-delay: 1.2s !important; }
.blueprint .packet--down-3 { offset-path: path("M280 266 V318"); animation-delay: 0.5s !important; }
.blueprint .packet--down-4 { offset-path: path("M370 266 V296 H452 V318"); animation-delay: 2s !important; }
.blueprint .ring { transform-box: fill-box; transform-origin: center; animation: pulse-ring 2.4s ease-out infinite; }

/* Scroll reveal (classes added by main.js, so content is never hidden without JS) */
.js-reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js-reveal.is-visible { opacity: 1; transform: none; }
.js-reveal--fade { transform: none; }
.js-reveal--scale { transform: scale(0.97); }

/* Process: connector line draws in when visible */
.process > li { border-top-color: transparent; }
.process > li > .process__line {
  position: absolute;
  inset: -2px 0 auto 0;
  height: 2px;
  background: var(--line-strong);
  transform-origin: left;
  transform: scaleX(1);
}
.js .process > li > .process__line { transform: scaleX(0); transition: transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 140ms); }
.js .process > li.is-visible > .process__line { transform: scaleX(1); }
.process > li::after { transition: transform 400ms var(--ease); }
.process > li:hover::after { transform: scale(1.5); }

/* Count-up numbers keep their width steady */
[data-count] { font-variant-numeric: tabular-nums; }

/* CTA mark drifts slowly */
.cta-band__mark { animation: float 12s ease-in-out infinite; }

/* Tech marquee */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-5);
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; gap: var(--s-7); width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; gap: var(--s-7); list-style: none; margin: 0; padding: 0; }
.marquee__group li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee__group li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); }
.marquee__group li:nth-child(even)::before { background: var(--sage); }
.marquee__label { text-align: center; margin-bottom: var(--s-4); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-family: var(--font-display); }

/* Scroll progress bar in the header */
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: linear-gradient(90deg, var(--copper), var(--sage)); transform-origin: left; transform: scaleX(var(--progress, 0)); pointer-events: none; }

/* FAQ answers open smoothly */
.faq details .faq__a { animation: rise 420ms var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal { opacity: 1; transform: none; transition: none; }
  .js .process > li > .process__line { transform: scaleX(1); }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__group[aria-hidden="true"] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .blueprint .packet { display: none; }
  .scroll-progress { display: none; }
}

/* ---------- Booking ---------- */
.booking { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 960px) { .booking { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-8); } }
.booking__panel { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); overflow: hidden; min-height: 320px; }
.booking__placeholder { display: grid; place-items: center; gap: var(--s-4); min-height: 320px; padding: var(--s-7) var(--s-5); text-align: center; color: var(--text-muted); }
.booking__placeholder > svg { width: 40px; height: 40px; color: var(--copper); }
.booking__placeholder p { max-width: 42ch; margin: 0; }
.booking__frame { display: block; width: 100%; height: 720px; border: 0; animation: fade-in 500ms var(--ease) both; }
@media (max-width: 640px) { .booking__frame { height: 900px; } }
.service-index .icon-tile svg { color: inherit; width: 20px; height: 20px; transform: none; }
.service-index a:hover .icon-tile svg { transform: none; }

/* ---------- Comparison table ---------- */
.compare { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.compare__row { display: grid; grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-5); border-top: 1px solid var(--line); }
.compare__row:first-child { border-top: 0; }
.compare__row--head { display: none; }
.compare__row > span { font-size: var(--fs-sm); color: var(--text-muted); }
.compare__row > span:first-child { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: var(--fs-base); }
.compare__row > span:first-child svg { width: 18px; height: 18px; color: var(--copper); }
.compare__row > span:nth-child(2)::before { content: "Typical: "; font-weight: 600; }
.compare__row > span:nth-child(3) { color: var(--text); font-weight: 600; }
.compare__row > span:nth-child(3)::before { content: "ImliStack: "; color: var(--copper); }
@media (min-width: 800px) {
  .compare__row, .compare__row--head { display: grid; grid-template-columns: 1.1fr 1.3fr 1.3fr; gap: var(--s-6); align-items: center; padding: var(--s-5) var(--s-6); }
  .compare__row > span:nth-child(n+2)::before { content: none; }
  .compare__row--head > span { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: var(--s-2); }
  .compare__row--head > span:last-child { color: var(--copper); }
  .compare__row > span:nth-child(3) { position: relative; }
  .compare__row:not(.compare__row--head) > span:nth-child(3)::after { content: ""; position: absolute; left: calc(var(--s-6) / -2); top: -1.25rem; bottom: -1.25rem; border-left: 2px solid var(--copper-soft); }
}
.compare__row:not(.compare__row--head):hover { background: var(--ivory); }

/* ---------- Grouped mega menu ---------- */
.mega { width: min(1120px, 94vw); padding: var(--s-6); }
.mega__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.mega__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.mega__col li { margin: 0; }
.mega__group { margin: 0 0 var(--s-3); padding: 0 var(--s-3) var(--s-3); border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper); }
.mega__item { grid-template-columns: 36px 1fr; gap: var(--s-3); padding: var(--s-2) var(--s-3); }
.mega__item .icon-tile { width: 36px; height: 36px; border-radius: 9px; }
.mega__item .icon-tile svg { width: 18px; height: 18px; }
.mega__text strong { font-size: 0.9rem; }
.mega__text > span { font-size: 0.8rem; line-height: 1.4; }
.nav__list > li:first-child { position: static; }
.nav { position: static; }
.site-header__inner { position: relative; }
.mega { left: 50%; top: calc(100% - 4px); }

/* ---------- Articles ---------- */
.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--s-8); }
.prose h3 { font-size: var(--fs-h4); margin-top: var(--s-6); }
.prose ul:not(.check-list), .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: var(--s-2); }
.prose a { text-decoration: underline; }
.post-meta { color: var(--text-muted); font-size: var(--fs-sm); }
.post-card .work-card__meta { margin-top: var(--s-2); }
.founder__photo picture { display: block; width: 100%; height: 100%; }
@media (min-width: 1100px) { .proof-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- App screenshot gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.shot { margin: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.shot img {
  width: 100%;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  object-position: top;
  border-radius: 18px;
  border: 6px solid var(--charcoal);
  background: var(--charcoal);
  box-shadow: var(--shadow-md);
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
}
.shot:hover img { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.shot figcaption { display: grid; gap: 2px; }
.shot figcaption strong { font-family: var(--font-display); font-size: var(--fs-sm); }
.shot figcaption span { font-size: var(--fs-xs); color: var(--text-muted); }

/* Illustrative mockups on work cards */
.work-card__media { position: relative; }
.work-card__media--mock { background: #f4f6f9; }
.work-card__media--mock img { object-fit: cover; object-position: left top; }
.mock-badge {
  position: absolute; right: var(--s-3); bottom: var(--s-3);
  padding: 0.25rem 0.6rem; border-radius: 999px;
  background: rgba(31, 41, 51, 0.82); color: #fff;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}
