/* =====================================================================
   CALYNEVO 0.8.3 — targeted responsive refinements (replaces the 0.8.0 layer, loaded last)
   ---------------------------------------------------------------------
   Principles
   1. Semantic tokens drive everything. Light and Dark redefine the same
      tokens; components only consume tokens.
   2. Light Mode is genuinely light: header, heroes, most sections and the
      footer use light surfaces. Dark is used on purpose (estimator, one
      feature band). The pre-footer CTA is the single orange block.
   3. No class, id or data-attribute used by PHP/JS is renamed.
   4. Selector prefix `html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body`
      (written below as the shorthand `:where()`-free "P") only exists to sit
      above legacy `.js .component` rules; it matches every page.
   Fonts: Bricolage Grotesque + Instrument Sans, SIL OFL 1.1, self-hosted.
   ===================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2?cv=081") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2?cv=081") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
html:root {
  /* type */
  --v8-display: "Bricolage Grotesque", "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --v8-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* spacing scale */
  --s-1: 8px; --s-2: 12px; --s-3: 16px; --s-4: 24px; --s-5: 32px;
  --s-6: 48px; --s-7: 64px; --s-8: 80px; --s-9: 96px; --s-10: 120px;
  --section-y: 104px;
  --section-y-tight: 72px;
  --head-gap: 48px;
  --card-gap: 20px;
  --card-pad: 28px;

  /* layout */
  --container: min(1240px, calc(100% - 64px));
  --measure: 62ch;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.19, 1, .22, 1);

  /* brand constants */
  --brand-orange: #ff5a1f;
  --brand-orange-hover: #ff7440;
  --brand-night: #0e0d0c;

  /* LIGHT (default) */
  --bg: #f4f0e8;
  --bg-soft: #ece6db;
  --surface: #fbf9f4;
  --surface-2: #f1ece3;
  --surface-3: #e6dfd3;
  --text: #151412;
  --text-2: #3a3632;
  --text-secondary: #3a3632;
  --muted: #5b564e;
  --border: #ddd5c8;
  --border-strong: #bdb3a4;
  --accent: #ff5a1f;
  --accent-2: #b93a0b;          /* orange for text on light surfaces (5:1) */
  --accent-hover: #ff7440;
  --accent-soft: #ffe8de;
  --on-accent: #111111;
  --inverse-bg: #0e0d0c;
  --inverse-surface: #1a1816;
  --inverse-text: #f2eee6;
  --inverse-muted: #bfb8ad;
  --inverse-border: #33302b;
  --focus: #ff5a1f;
  --header-bg: rgba(244, 240, 232, .88);
  --hero-veil: 0;               /* extra darkening on hero photos (dark only) */
  --shadow-1: 0 1px 2px rgba(21, 20, 18, .04), 0 10px 30px -18px rgba(21, 20, 18, .22);
  --shadow-2: 0 2px 4px rgba(21, 20, 18, .05), 0 24px 50px -28px rgba(21, 20, 18, .32);
}
html[data-theme="dark"]:root {
  --bg: #0e0d0c;
  --bg-soft: #131210;
  --surface: #1a1816;
  --surface-2: #211f1c;
  --surface-3: #2a2723;
  --text: #f2eee6;
  --text-2: #d9d3c9;
  --text-secondary: #d9d3c9;
  --muted: #a9a297;
  --border: #34302b;
  --border-strong: #4e4841;
  --accent: #ff6a2e;
  --accent-2: #ff8a5b;
  --accent-hover: #ff8a5b;
  --accent-soft: #2b1a12;
  --inverse-bg: #080807;
  --inverse-surface: #131210;
  --focus: #ff8a5b;
  --header-bg: rgba(14, 13, 12, .86);
  --hero-veil: .38;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -20px rgba(0, 0, 0, .7);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .3), 0 28px 60px -30px rgba(0, 0, 0, .8);
}
@media (max-width: 1099px) { html:root { --container: calc(100% - 56px); --section-y: 88px; --head-gap: 40px; } }
@media (max-width: 959px)  { html:root { --container: calc(100% - 48px); --section-y: 80px; --section-y-tight: 60px; } }
@media (max-width: 700px)  { html:root { --container: calc(100% - 40px); --section-y: 64px; --section-y-tight: 52px; --head-gap: 28px; --card-gap: 14px; --card-pad: 22px; } }
@media (max-width: 360px)  { html:root { --container: calc(100% - 36px); --section-y: 56px; --card-pad: 20px; } }

/* Premium home uses its own --cal-* names: point them at the semantic tokens. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .cal-premium-home {
  --cal-paper: var(--bg); --cal-ink: var(--text); --cal-muted: var(--muted);
  --cal-line: var(--border); --cal-accent: var(--accent-2); --cal-panel: var(--surface);
}

/* Intentional dark feature zones (same in both modes). */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.section-dark, .studio-band) {
  --bg: #0e0d0c; --bg-soft: #131210; --surface: #1a1816; --surface-2: #211f1c; --surface-3: #2a2723;
  --text: #f2eee6; --text-2: #d9d3c9; --text-secondary: #d9d3c9; --muted: #bfb8ad;
  --border: #36322d; --border-strong: #544d45; --accent-2: #ff8a5b;
  --paper: var(--bg); --white: var(--surface); --ink: var(--text); --ink-2: var(--text-2); --line: var(--border);
  --soft: var(--surface-2); --soft-2: var(--bg-soft);
  --cal-paper: var(--bg); --cal-ink: var(--text); --cal-muted: var(--muted); --cal-line: var(--border); --cal-panel: var(--surface);
  background-color: var(--bg);
  color: var(--text);
}

/* ---------------------------------------------------------------------
   2. Base typography & rhythm
   --------------------------------------------------------------------- */
html body {
  font-family: var(--v8-sans);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html body :is(h1, h2, h3, h4, .simple-price, .compact-price, .estimator-result-price, .proof-result strong) {
  font-family: var(--v8-display);
  letter-spacing: -.028em;
  text-wrap: balance;
}
html body :is(h1, h2) { font-weight: 700; line-height: 1.04; }
html body :is(h3, h4) { font-weight: 650; line-height: 1.18; letter-spacing: -.018em; }
html body :is(p, li, dd, label, input, textarea, select, button) { font-family: var(--v8-sans); }
html body p { text-wrap: pretty; }
html body .lead { color: var(--text-2); line-height: 1.55; max-width: var(--measure); }
html body .eyebrow {
  display: inline-flex; align-items: center; gap: 0;
  font-family: var(--v8-sans); font-weight: 600; letter-spacing: .14em;
  color: var(--accent-2);
}
html body .eyebrow::before {
  content: none;
  display: none;
  width: 0;
  height: 0;
  margin: 0;
}
html body :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--brand-orange); color: #111; }

/* One container, one rhythm. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .container { width: var(--container); margin-inline: auto; }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .section { padding-block: var(--section-y); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.prefooter-cta, .compact-cta) { padding-block: var(--section-y-tight); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .section-head {
  margin-bottom: var(--head-gap); align-items: end; column-gap: var(--s-6);
}
html body .section-head h2, html body .prefooter-cta h2 { font-size: clamp(2rem, 4.1vw, 3.4rem); max-width: 16ch; }
html body .section-head p:not(.eyebrow) { max-width: 52ch; margin-bottom: 0; color: var(--muted); }
html body .section-head .eyebrow { margin-bottom: var(--s-3); }

/* ---------------------------------------------------------------------
   3. Header — follows the theme
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-header {
  background: var(--header-bg) !important;             /* legacy uses !important */
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-header .brand { color: var(--text); }
/* Legacy colours the menu with --inverse-* !important: re-point those tokens to the theme. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav { --inverse-bg: var(--bg); --inverse-text: var(--text); --inverse-border: var(--border); }
@media (min-width: 960px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav {
    --inverse-bg: transparent;
    background: transparent; gap: 26px; align-items: center; padding: 0;
  }
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a:not(.nav-cta) {
  position: relative; color: var(--text-2); font-weight: 550;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a:not(.nav-cta):hover,
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a[aria-current="page"]:not(.nav-cta) { color: var(--text); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a:not(.nav-cta):hover::after,
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav .nav-cta {
  background: var(--brand-orange); color: #111; font-weight: 650; border-radius: 999px; padding: 11px 18px;
  transition: background-color .25s ease, transform .35s var(--ease), box-shadow .35s ease;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav .nav-cta:hover {
  background: var(--brand-orange-hover); color: #111; transform: translateY(-1px); box-shadow: 0 0 0 5px rgba(255, 90, 31, .16);
}
@media (max-width: 959px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav {
    background: var(--bg); color: var(--text); padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a:not(.nav-cta) {
    font-family: var(--v8-display); font-weight: 700; font-size: clamp(1.7rem, 7.5vw, 2.4rem);
    letter-spacing: -.03em; color: var(--text); padding: 12px 0; border-bottom: 1px solid var(--border);
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav a:not(.nav-cta)::after { display: none; }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-nav .nav-cta {
    margin-top: 12px; justify-content: center; text-align: center; font-size: 1.05rem; padding: 16px 20px;
  }
}

/* ---------------------------------------------------------------------
   4. Heroes — light surfaces in Light Mode, photos stay visible
   --------------------------------------------------------------------- */
html body :is(.brand-hero, .page-hero) { position: relative; isolation: isolate; overflow: hidden; }
html body :is(.brand-hero, .page-hero) > .container { position: relative; z-index: 2; }
html body .cal-hero-picture { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
html body .cal-hero-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Veil: solid page colour behind the text column, clear photo on the right.
   Uses var(--bg), so it is ivory in Light Mode and near-black in Dark Mode.
   `!important` is required: the PHP critical CSS and premium-home.css set it. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .cal-hero-media.cal-hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(rgba(14, 13, 12, var(--hero-veil)), rgba(14, 13, 12, var(--hero-veil))),
    linear-gradient(90deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 94%, transparent) 34%,
      color-mix(in srgb, var(--bg) 55%, transparent) 52%,
      color-mix(in srgb, var(--bg) 10%, transparent) 72%,
      transparent 86%) !important;
}
/* 0.8.7: small print that sits on a hero photo uses the stronger secondary text colour for contrast. */
html body .cal-hero-media .pricing-micro { color: var(--text-2); }
/* 0.8.7: each hero photo carries its own focal point (--hero-pos / --hero-pos-m, set by PHP). */
html body .cal-hero-media .cal-hero-picture img { object-position: var(--hero-pos, 70% center); }
/* Narrower screens: the text column covers more of the width, so the veil widens with it. */
@media (min-width: 960px) and (max-width: 1199px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .cal-hero-media.cal-hero-media::before {
    background:
      linear-gradient(rgba(14, 13, 12, var(--hero-veil)), rgba(14, 13, 12, var(--hero-veil))),
      linear-gradient(90deg,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 96%, transparent) 52%,
        color-mix(in srgb, var(--bg) 70%, transparent) 66%,
        color-mix(in srgb, var(--bg) 18%, transparent) 84%,
        transparent 96%) !important;
  }
}

/* Desktop geometry: text column on the left, photo readable on the right. */
@media (min-width: 960px) {
  html body .brand-hero.cal-hero-media { min-height: clamp(580px, 80vh, 780px); display: flex; align-items: center; }
  html body .page-hero.cal-hero-media { min-height: clamp(460px, 64vh, 620px); display: flex; align-items: center; }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .cal-hero-media .page-intro-grid {
    display: grid; grid-template-columns: minmax(0, 600px); row-gap: var(--s-4);
  }
  html body .cal-hero-media .hero-bottom { max-width: 560px; }
  /* 0.8.7: guide-article and legal heroes (no page-intro-grid) keep their text in the veiled column. */
  html body .page-hero.cal-hero-media > .container:not(.page-intro-grid) > * { max-width: 600px; }
}
/* Tablet + mobile: photo band on top, text on a solid surface below.
   The veil becomes solid a little above where the text starts (--hero-band). */
@media (max-width: 959px) {
  html body :is(.brand-hero, .page-hero).cal-hero-media { --hero-band: clamp(220px, 38vh, 360px); padding-top: var(--hero-band); padding-bottom: 40px; min-height: 0; }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .cal-hero-media.cal-hero-media::before {
    background:
      linear-gradient(rgba(14, 13, 12, var(--hero-veil)), rgba(14, 13, 12, var(--hero-veil))),
      linear-gradient(180deg,
        color-mix(in srgb, var(--bg) 6%, transparent) 0,
        color-mix(in srgb, var(--bg) 22%, transparent) calc(var(--hero-band) - 150px),
        var(--bg) calc(var(--hero-band) - 20px),
        var(--bg) 100%) !important;
  }
  html body .cal-hero-media .cal-hero-picture img { object-position: var(--hero-pos-m, center 30%); }
}

/* Hero type */
html body .brand-title h1 { font-size: clamp(2.8rem, 6.6vw, 5.8rem); font-weight: 750; letter-spacing: -.045em; line-height: .98; }
html body .page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); letter-spacing: -.04em; line-height: 1; max-width: 15ch; }
html body :is(.brand-hero, .page-hero) em { color: var(--accent); font-style: normal; }
html[data-theme="dark"] body :is(.brand-hero, .page-hero) em { color: var(--accent-2); }
html body :is(.brand-hero, .page-hero) :is(.lead, .hero-bottom p) { color: var(--text-2); }

/* Heroes without photo: clean typographic band with a hairline, no pattern. */
html body .page-hero:not(.cal-hero-media) { border-bottom: 1px solid var(--border); }

/* Case-study intro: light surface, image-led. */
html body .case-clean-intro { position: relative; isolation: isolate; overflow: hidden; }
html body .case-clean-intro .case-clean-visual img {
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-2); background: var(--surface);
}

/* Stencil "cuts" entrance (markup in the page, pure CSS, no flash). */
.v8-cuts { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: grid; grid-template-rows: repeat(5, 1fr); }
.v8-cuts i { display: block; background: var(--bg); transform-origin: right center; animation: v8-cut 1s var(--ease) .08s forwards; }
.v8-cuts i:nth-child(2) { box-shadow: inset 0 -2px 0 var(--accent); animation-delay: .14s; }
.v8-cuts i:nth-child(3) { animation-delay: .2s; }
.v8-cuts i:nth-child(4) { box-shadow: inset 0 -2px 0 var(--accent); animation-delay: .26s; }
.v8-cuts i:nth-child(5) { animation-delay: .32s; }
@keyframes v8-cut { to { transform: scaleX(0); visibility: hidden; } }
html body :is(.brand-hero, .page-hero) .cal-hero-picture img { animation: v8-settle 2s var(--ease) both; }
@keyframes v8-settle { from { transform: scale(1.06); } to { transform: scale(1); } }
html body :is(.brand-hero, .page-hero, .case-clean-intro) > .container > * { animation: v8-rise .9s var(--ease) both; }
html body :is(.brand-hero, .page-hero, .case-clean-intro) > .container > :nth-child(1) { animation-delay: .3s; }
html body :is(.brand-hero, .page-hero, .case-clean-intro) > .container > :nth-child(2) { animation-delay: .42s; }
html body :is(.brand-hero, .page-hero, .case-clean-intro) > .container > :nth-child(n+3) { animation-delay: .54s; }
@keyframes v8-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .v8-cuts i { animation-duration: .75s; }
  html body :is(.brand-hero, .page-hero, .case-clean-intro) > .container > * { animation-duration: .65s; }
}

/* ---------------------------------------------------------------------
   5. Buttons & links
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .button {
  font-family: var(--v8-sans); font-weight: 650; border-radius: 999px; padding-inline: 24px; min-height: 48px;
  transition: transform .35s var(--ease), background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .35s ease;
}
/* Legacy paints these with var(--control-bg) !important — so we set the token on the element. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.button-primary, .button-orange, .site-nav .nav-cta) {
  --control-bg: var(--brand-orange); --control-text: #111;
  background: var(--brand-orange); color: #111; border-color: var(--brand-orange);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.button-secondary, .button-light, .language-option, .project-filters button) {
  --control-bg: var(--text); --control-text: var(--bg);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.button-primary, .button-orange):hover {
  --control-bg: var(--brand-orange-hover);
  background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); color: #111;
  transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(255, 90, 31, .65);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.button-secondary, .button-light) {
  background: transparent; color: var(--text); border: 1px solid var(--border-strong);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.button-secondary, .button-light):hover {
  border-color: var(--text); transform: translateY(-2px);
}
html body :is(.text-link, .section-link) {
  color: var(--text); text-decoration: none; padding-bottom: 3px;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat;
  transition: background-size .4s var(--ease);
}
html body :is(.text-link, .section-link):hover { background-size: 35% 2px; }

/* ---------------------------------------------------------------------
   6. Surfaces, cards, grids
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .section-white { background: var(--bg-soft); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.simple-card, .price-card, .project-card, .portfolio-card-clean, .service-choice-card, .cal-testimonial-card, .selected-plan-card, .estimator-shell, .pricing-detail, .process-step) {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s ease;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.simple-card, .service-choice-card, .cal-testimonial-card, .price-card) { padding: var(--card-pad); }
@media (hover: hover) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.simple-card, .price-card, .project-card, .portfolio-card-clean, .service-choice-card, .cal-testimonial-card):hover {
    transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong);
  }
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.simple-grid-3, .price-grid, .compact-price-grid, .compact-service-grid, .plan-choice-grid, .cal-testimonial-grid, .portfolio-grid-clean, .proof-results-grid, .detail-columns, .estimator-result-grid) {
  gap: var(--card-gap);
}
html body :is(.simple-card, .service-choice-card, .price-card) { display: flex; flex-direction: column; }
html body :is(.simple-card, .service-choice-card) h3 { margin-bottom: var(--s-2); }
html body :is(.service-card-action, .price-card .button) { margin-top: auto; }
html body .price-card.is-popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
html body .price-badge { background: var(--accent); color: #111; border-radius: 999px; font-weight: 650; }
html body .cal-project-number { font-family: var(--v8-display); color: var(--accent-2); font-weight: 700; }
html body .proof-result strong { font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 750; letter-spacing: -.05em; color: var(--text); }

/* Project cards: one frame, one ratio, UI kept from the top. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.project-media, .portfolio-card-media) {
  aspect-ratio: 16 / 10; overflow: hidden; border-radius: calc(var(--radius) - 4px);
  background: var(--surface-2); border: 1px solid var(--border);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.project-media, .portfolio-card-media) img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 1.1s var(--ease);
}
@media (hover: hover) {
  html body :is(.project-card, .portfolio-card-clean):hover :is(.project-media, .portfolio-card-media) img { transform: scale(1.03); }
}
html body :is(.project-body, .portfolio-card-caption) { padding-top: var(--s-4); }
html body :is(.project-body, .portfolio-card-caption) h3 { margin: var(--s-1) 0 var(--s-2); }

/* Process: four equal cards in one row, clean sequence on mobile. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .simple-process {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--card-gap); counter-reset: process;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .simple-process .process-step {
  min-height: 0; padding: 64px var(--card-pad) var(--card-pad); border-right: 1px solid var(--border); counter-increment: process;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .simple-process .process-step::before {
  left: var(--card-pad); top: var(--card-pad); color: var(--accent-2);
  font-family: var(--v8-display); font-size: .95rem; font-weight: 750; letter-spacing: 0;
}
@media (max-width: 959px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .simple-process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .simple-process { grid-template-columns: 1fr; }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .simple-process .process-step { padding-top: 56px; }
}

/* Services families: heading column and links column share a top line. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .service-family {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s-7); row-gap: var(--s-5); align-items: start;
}
html body .service-family h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); margin: var(--s-2) 0 var(--s-3); }
html body .service-family .service-infrastructure-note { color: var(--muted); font-size: .95rem; max-width: 52ch; }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .service-family-links { border-top: 1px solid var(--border-strong); margin-top: var(--s-2); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .service-family-links a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s-4);
  padding: 20px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: padding-left .4s var(--ease), color .25s ease;
}
html body .service-family-links a span { color: var(--muted); }
html body .service-family-links a:hover { padding-left: 8px; }
html body .service-family-links a:hover strong { color: var(--accent-2); }
html body .v8-family-media { grid-column: 1 / -1; margin: var(--s-2) 0 0; }
html body .v8-family-media img {
  display: block; width: 100%; aspect-ratio: 21 / 8; object-fit: cover; object-position: center top;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2);
}
@media (max-width: 959px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .service-family { grid-template-columns: 1fr; row-gap: var(--s-4); }
  html body .v8-family-media img { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .service-family-links a { grid-template-columns: 1fr; gap: 4px; }
}

/* Glossary / dense lists: breathing rows instead of tiny text. */
html body :is(.glossary-list, .glossary-grid, .resource-grid) { gap: var(--card-gap); }
html body :is(.glossary-term, .glossary-item, .resource-card, .checklist-card) {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--card-pad);
}
html body :is(.glossary-term, .glossary-item) p { color: var(--text-2); line-height: 1.6; }

/* ---------------------------------------------------------------------
   7. Forms, filters, estimator
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); min-height: 48px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
html body :is(input, textarea, select):focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 90, 31, .18); outline: none; }
html body :is(.project-filters button, .estimator-option) { border-radius: 999px; }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .project-filters [aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------------------------------------------------------------------
   8. Dark feature bands, pre-footer, footer
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.section-dark, .studio-band) {
  background-image: radial-gradient(60% 90% at 100% 0%, rgba(255, 90, 31, .16), transparent 62%);
}
html body :is(.section-dark, .studio-band) .eyebrow { color: var(--accent-2); }

/* Pre-footer CTA: the single orange block in Light Mode. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .prefooter-cta {
  --text: #111; --text-2: #211d1a; --muted: #2d2622; --accent-2: #111; --border: rgba(17, 17, 17, .2);
  background: var(--brand-orange) !important; color: #111 !important;   /* legacy sets !important */
  border-top: 0;
}
html body .prefooter-cta :is(h2, p) { color: #111; }
html body .prefooter-cta .eyebrow::before { background: #111; }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .prefooter-cta :is(.button-primary, .button-orange) {
  --control-bg: #111; --control-text: #f4f0e8;
  background: #111; color: #f4f0e8; border-color: #111;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .prefooter-cta :is(.button-primary, .button-orange):hover {
  --control-bg: #2a2622;
  background: #2a2622; color: #fff; border-color: #2a2622; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .5);
}
/* In Dark Mode the CTA is a raised dark panel with an orange edge. */
html[data-theme="dark"]:is(.js,:not(.js)) body .prefooter-cta {
  --text: #f2eee6; --text-2: #d9d3c9; --muted: #bfb8ad; --accent-2: #ff8a5b; --border: #34302b;
  background: #1a1816 !important; color: var(--text) !important; border-top: 3px solid var(--brand-orange);
}
html[data-theme="dark"]:is(.js,:not(.js)) body .prefooter-cta :is(h2, p) { color: var(--text); }
html[data-theme="dark"]:is(.js,:not(.js)) body .prefooter-cta .eyebrow::before { background: var(--brand-orange); }
html[data-theme="dark"]:is(.js,:not(.js)) body .prefooter-cta :is(.button-primary, .button-orange) { --control-bg: var(--brand-orange); --control-text: #111; background: var(--brand-orange); color: #111; border-color: var(--brand-orange); }

/* Footer: warm light surface in Light Mode, deepest black in Dark Mode. */
/* Legacy paints the footer with var(--inverse-*) !important: re-point those tokens. */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer {
  --inverse-bg: var(--bg-soft); --inverse-text: var(--text); --inverse-muted: var(--muted); --inverse-border: var(--border);
  background: var(--bg-soft); color: var(--muted); border-top: 1px solid var(--border);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer :is(a, .footer-heading, strong) { color: var(--text); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer p { color: var(--muted); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer a:hover { color: var(--accent-2); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer .footer-logo { filter: brightness(0); }   /* cream PNG shown dark */
/* Small orange labels need the darker orange on light surfaces (legacy sets it with !important). */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer .footer-heading { color: var(--accent-2) !important; }
html[data-theme="dark"]:is(.js,:not(.js)) body .site-footer { --inverse-bg: #080807; --inverse-text: var(--text); --inverse-muted: var(--muted); background: #080807; }
html[data-theme="dark"]:is(.js,:not(.js)) body .site-footer .footer-logo { filter: none; }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer .social-icon-link { border-color: var(--border-strong); color: var(--text); }
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .site-footer .social-icon-link:hover { background: var(--brand-orange); color: #111; border-color: var(--brand-orange); }

/* ---------------------------------------------------------------------
   9. Back to top (theme button restyled; v8 fallback if missing)
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body :is(.back-to-top, .v8-top) {
  background: var(--brand-orange); color: #111; border: 0; border-radius: 50%;
  box-shadow: 0 14px 30px -14px rgba(255, 90, 31, .7);
}
html body :is(.back-to-top, .v8-top):hover { background: var(--brand-orange-hover); color: #111; }
.v8-top {
  position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .35s ease, transform .45s var(--ease), visibility 0s linear .35s;
}
.v8-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease, transform .45s var(--ease), visibility 0s; }
.v8-top svg { width: 18px; height: 18px; }
body.nav-open :is(.back-to-top, .v8-top) { opacity: 0; visibility: hidden; }

/* ---------------------------------------------------------------------
   10. Motion safety & print
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .v8-cuts { display: none; }
  html body :is(.brand-hero, .page-hero) .cal-hero-picture img,
  html body :is(.brand-hero, .page-hero, .case-clean-intro) > .container > * { animation: none; }
  html body * { transition-duration: .01ms !important; }
}
@media print {
  .v8-cuts, .v8-top { display: none !important; }
}

/* =====================================================================
   CALYNEVO 0.8.2 — targeted refinements from approved screenshots
   These rules are scoped only to v8-fix-* hooks added to the requested
   sections. Existing site-wide design and business logic stay unchanged.
   ===================================================================== */

/* Homepage selected work: more breathing inside the existing editorial cards. */
html body .v8-fix-featured-work .featured-projects .project-card {
  padding: clamp(24px, 2.8vw, 36px);
  gap: clamp(28px, 4.5vw, 58px);
  margin-bottom: 22px;
  align-items: center;
  overflow: hidden;
}
html body .v8-fix-featured-work .featured-projects .project-card:last-child { margin-bottom: 0; }
html body .v8-fix-featured-work .featured-projects .project-body { min-width: 0; padding: 2px 0; }
html body .v8-fix-featured-work .featured-projects .project-body p { max-width: 38ch; line-height: 1.62; }
html body .v8-fix-featured-work .featured-projects .cal-gallery-open { min-width: 0; }
html body .v8-fix-featured-work .featured-projects .cal-gallery-label { margin-top: 10px; }
@media (max-width: 700px) {
  html body .v8-fix-featured-work .featured-projects .project-card,
  html body .v8-fix-featured-work .featured-projects .project-card:nth-child(even) {
    padding: 18px;
    gap: 20px;
    margin-bottom: 16px;
  }
  html body .v8-fix-featured-work .featured-projects .project-body { padding: 0 2px 4px; }
  html body .v8-fix-featured-work .featured-projects .project-body p { max-width: none; }
}

/* Homepage process only: match the Studio card rhythm without changing content or other sections. */
html body .v8-fix-process .section-head {
  margin-bottom: clamp(34px, 3.2vw, 44px);
}
html body .v8-fix-process .simple-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  border: 0;
  background: transparent;
}
html body .v8-fix-process .simple-process .process-step {
  min-height: 190px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
html body .v8-fix-process .simple-process .process-step::before {
  position: static;
  display: block;
  margin: 0 0 18px;
  color: var(--accent-2);
  font-family: var(--v8-display);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .02em;
}
html body .v8-fix-process .simple-process .process-step::after { display: none; }
html body .v8-fix-process .simple-process .process-step h3 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  line-height: 1.16;
  color: var(--text);
}
html body .v8-fix-process .simple-process .process-step p {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.58;
}
@media (hover: hover) and (pointer: fine) {
  html body .v8-fix-process .simple-process .process-step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
    border-color: var(--border-strong);
  }
  html body .v8-fix-process .simple-process .process-step:hover h3 { color: var(--text); }
}
@media (max-width: 1099px) {
  html body .v8-fix-process .simple-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  html body .v8-fix-process .simple-process .process-step { min-height: 176px; }
}
@media (max-width: 700px) {
  html body .v8-fix-process .section-head { margin-bottom: 28px; }
  html body .v8-fix-process .simple-process {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  html body .v8-fix-process .simple-process .process-step {
    min-height: 0;
    padding: 24px;
  }
  html body .v8-fix-process .simple-process .process-step::before { margin-bottom: 16px; }
}
@media (max-width: 360px) {
  html body .v8-fix-process .simple-process .process-step { padding: 20px; }
}

/* Four approved service-detail scope blocks only. */
html body .v8-fix-service-scope .section-head { margin-bottom: 38px; }
html body .v8-fix-service-scope .deliverable-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  border: 0;
  background: transparent;
}
html body .v8-fix-service-scope.v8-six .deliverable-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html body .v8-fix-service-scope .deliverable-card {
  min-height: 158px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
html body .v8-fix-service-scope .deliverable-card strong {
  display: block;
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
@media (max-width: 1050px) {
  html body .v8-fix-service-scope .deliverable-grid,
  html body .v8-fix-service-scope.v8-six .deliverable-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  html body .v8-fix-service-scope .deliverable-grid,
  html body .v8-fix-service-scope.v8-six .deliverable-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .v8-fix-service-scope .deliverable-card { min-height: 132px; padding: 24px; }
}
@media (max-width: 520px) {
  html body .v8-fix-service-scope .deliverable-grid,
  html body .v8-fix-service-scope.v8-six .deliverable-grid { grid-template-columns: 1fr; gap: 12px; }
  html body .v8-fix-service-scope .deliverable-card { min-height: 0; padding: 20px; }
}

/* Work archive: approved 2 x 2 desktop composition. */
html body .v8-fix-work-grid .portfolio-grid-clean {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 24px;
  align-items: stretch;
}
html body .v8-fix-work-grid .portfolio-card-clean { overflow: hidden; }
html body .v8-fix-work-grid .portfolio-card-media { margin: 18px 18px 0; width: auto; }
html body .v8-fix-work-grid .portfolio-card-caption { padding: 22px 22px 24px; gap: 18px; }
html body .v8-fix-work-grid .portfolio-card-caption p { line-height: 1.5; }
@media (max-width: 760px) {
  html body .v8-fix-work-grid .portfolio-grid-clean { grid-template-columns: 1fr; gap: 20px; }
  html body .v8-fix-work-grid .portfolio-card-media { margin: 14px 14px 0; }
  html body .v8-fix-work-grid .portfolio-card-caption { padding: 18px 18px 20px; }
}

/* Pricing: only the four Other Services cards shown by the user. */
html body .v8-fix-pricing-services .compact-service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  border: 0;
  background: transparent;
  align-items: stretch;
}
html body .v8-fix-pricing-services .service-choice-card { min-width: 0; padding: 30px; }
html body .v8-fix-pricing-services .service-card-kicker { margin-bottom: 16px; }
html body .v8-fix-pricing-services .service-choice-card h3 { margin: 0 0 12px; line-height: 1.25; }
html body .v8-fix-pricing-services .service-choice-card > strong { display: block; margin-bottom: 18px; line-height: 1.35; }
html body .v8-fix-pricing-services .service-choice-card > p { margin: 0; line-height: 1.58; }
html body .v8-fix-pricing-services .service-card-facts { min-height: 0; margin-top: auto; padding-top: 24px; }
html body .v8-fix-pricing-services .service-card-action { margin-top: 16px; padding-top: 14px; }
@media (max-width: 1050px) {
  html body .v8-fix-pricing-services .compact-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  html body .v8-fix-pricing-services .compact-service-grid { grid-template-columns: 1fr; gap: 14px; }
  html body .v8-fix-pricing-services .service-choice-card { padding: 22px; }
}

/* Estimator: Light Mode is light; Dark Mode is dark. All question/answer
   text uses semantic theme colours instead of legacy hard-coded dark greys. */
html:not([data-theme="dark"]) body .v8-fix-estimator {
  --bg: #f4f0e8;
  --bg-soft: #ece6db;
  --surface: #fbf9f4;
  --surface-2: #f1ece3;
  --surface-3: #e6dfd3;
  --text: #151412;
  --text-2: #3a3632;
  --text-secondary: #3a3632;
  --muted: #5b564e;
  --border: #ddd5c8;
  --border-strong: #bdb3a4;
  --accent-2: #b93a0b;
  --paper: var(--bg);
  --white: var(--surface);
  --ink: var(--text);
  --ink-2: var(--text-2);
  --line: var(--border);
  --soft: var(--surface-2);
  background-color: var(--bg);
  color: var(--text);
}
html body .v8-fix-estimator { background-image: none !important; }
html body .v8-fix-estimator .section-head h2 { color: var(--text); }
html body .v8-fix-estimator .section-head p:not(.eyebrow) { color: var(--muted); }
html body .v8-fix-estimator .eyebrow { color: var(--accent-2); }
html body .v8-fix-estimator .estimator-shell {
  gap: 28px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
html body .v8-fix-estimator .estimator-step legend {
  margin-bottom: 18px;
  color: var(--text);
  font-family: var(--v8-display);
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  font-weight: 700;
  line-height: 1.25;
}
html body .v8-fix-estimator .estimator-shell :is(p, label) { color: var(--text-2); }
html body .v8-fix-estimator .estimator-options { gap: 12px; }
html body .v8-fix-estimator .estimator-option {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
}
html body .v8-fix-estimator .estimator-option:hover { border-color: var(--accent); }
html body .v8-fix-estimator .estimator-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}
html body .v8-fix-estimator .estimator-option strong { display: block; color: var(--text); font-size: 1rem; line-height: 1.3; }
html body .v8-fix-estimator .estimator-option small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; line-height: 1.48; }
html body .v8-fix-estimator .estimator-progress span { background: var(--border-strong); }
html body .v8-fix-estimator .estimator-progress span.is-active { background: var(--accent); }
html body .v8-fix-estimator .estimator-nav { gap: 12px; margin-top: 22px; }
html body .v8-fix-estimator .estimator-nav .button-light { background: var(--text); color: var(--bg); border-color: var(--text); }
html body .v8-fix-estimator .estimator-nav .button-light:hover { opacity: .9; }
html body .v8-fix-estimator .estimator-result {
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
}
html body .v8-fix-estimator .estimator-result h3,
html body .v8-fix-estimator .estimator-result-grid strong { color: var(--text); }
html body .v8-fix-estimator .estimator-result p,
html body .v8-fix-estimator .estimator-result-grid span { color: var(--muted); }
html body .v8-fix-estimator .estimator-result-grid div { padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
html body .v8-fix-estimator .estimator-result-price { color: var(--accent-2); }
@media (max-width: 700px) {
  html body .v8-fix-estimator .estimator-shell { padding: 20px; gap: 22px; }
  html body .v8-fix-estimator .estimator-options { grid-template-columns: 1fr; }
  html body .v8-fix-estimator .estimator-option { padding: 16px; }
  html body .v8-fix-estimator .estimator-nav { position: static; padding: 0; background: transparent; flex-direction: column; }
  html body .v8-fix-estimator .estimator-nav .button { width: 100%; }
}

/* Studio: only the two simple-card rows shown in the screenshots. */
html body .v8-fix-studio-cards .simple-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border: 0;
  background: transparent;
}
html body .v8-fix-studio-cards .simple-card { min-height: 176px; padding: 30px; justify-content: flex-start; }
html body .v8-fix-studio-cards .simple-card h3 { margin: 0 0 14px; font-size: clamp(1.35rem, 2vw, 1.65rem); }
html body .v8-fix-studio-cards .simple-card p { margin: 0; max-width: 34ch; color: var(--muted); line-height: 1.58; }
@media (max-width: 820px) {
  html body .v8-fix-studio-cards .simple-grid-3 { grid-template-columns: 1fr; gap: 14px; }
  html body .v8-fix-studio-cards .simple-card { min-height: 0; padding: 24px; }
}

/* Start Project chooser only: spacing/hierarchy, preserving all data hooks. */
html body .v8-fix-plan-chooser {
  padding: clamp(24px, 3.5vw, 36px);
  border-color: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
html body .v8-fix-plan-chooser .plan-chooser-head { gap: 24px; margin-bottom: 32px; }
html body .v8-fix-plan-chooser .plan-chooser-head h2 { margin-top: 8px; max-width: 15ch; line-height: 1.06; }
html body .v8-fix-plan-chooser .plan-choice-groups { grid-template-columns: 1fr; gap: 30px; }
html body .v8-fix-plan-chooser .plan-choice-groups section h3 { margin-bottom: 12px; }
html body .v8-fix-plan-chooser .plan-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
html body .v8-fix-plan-chooser .plan-choice-grid--audit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html body .v8-fix-plan-chooser .plan-choice {
  min-height: 116px;
  gap: 7px;
  padding: 18px;
  border-color: var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
html body .v8-fix-plan-chooser .plan-choice:hover,
html body .v8-fix-plan-chooser .plan-choice:focus-visible { border-color: var(--accent); }
html body .v8-fix-plan-chooser .plan-choice strong { color: var(--text); font-size: 1rem; line-height: 1.3; }
html body .v8-fix-plan-chooser .plan-choice span { color: var(--muted); font-size: .82rem; line-height: 1.45; }
html body .v8-fix-plan-chooser .plan-choice small { margin-top: 3px; color: var(--text-2); font-size: .75rem; line-height: 1.35; }
html body .v8-fix-plan-chooser .plan-choice-standalone { gap: 14px; margin-top: 18px; }
html body .v8-fix-plan-chooser .plan-choice--custom { margin-top: 0; }
@media (max-width: 900px) {
  html body .v8-fix-plan-chooser .plan-choice-grid,
  html body .v8-fix-plan-chooser .plan-choice-grid--audit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  html body .v8-fix-plan-chooser { padding: 20px; }
  html body .v8-fix-plan-chooser .plan-chooser-head { display: block; margin-bottom: 26px; }
  html body .v8-fix-plan-chooser .plan-choice-grid,
  html body .v8-fix-plan-chooser .plan-choice-grid--audit,
  html body .v8-fix-plan-chooser .plan-choice-standalone { grid-template-columns: 1fr; }
  html body .v8-fix-plan-chooser .plan-choice { min-height: 0; padding: 16px; }
}

/* ==========================================================================
   CALYNEVO v0.8.4 - Guides / Audit offers / Glossary targeted refinement
   Scope is intentionally limited to the user-approved areas below.
   No global header/footer/hero/pricing/process/business logic changes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   GUIDE ARTICLES
   Fix metadata overlap, improve article rhythm and add restrained reveal motion.
   -------------------------------------------------------------------------- */
html body .v8-fix-guide-layout {
  grid-template-columns:minmax(0,1fr) minmax(240px,280px);
  gap:clamp(44px,5vw,72px);
  align-items:start;
}
html body .v8-fix-guide-layout .resource-article-copy {
  max-width:820px;
  min-width:0;
}
html body .v8-fix-guide-layout .resource-quick {
  margin:0 0 44px;
  padding:26px 28px;
  border-left:3px solid var(--accent);
  border-radius:0 12px 12px 0;
  background:var(--surface-2);
}
html body .v8-fix-guide-layout .resource-quick strong {
  margin-bottom:10px;
  line-height:1.3;
}
html body .v8-fix-guide-layout .resource-quick p {
  line-height:1.72;
}
html body .v8-fix-guide-layout .resource-content-section {
  margin-bottom:34px;
  padding-bottom:34px;
}
html body .v8-fix-guide-layout .resource-content-section h2 {
  margin-bottom:14px;
  line-height:1.08;
}
html body .v8-fix-guide-layout .resource-content-section p {
  line-height:1.75;
}
html body .v8-fix-guide-layout .resource-aside {
  position:sticky;
  top:110px;
  display:grid;
  gap:12px;
  border-top:0;
  min-width:0;
}
html body .v8-fix-guide-layout .resource-aside-block {
  min-width:0;
  padding:18px 20px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
html body .v8-fix-guide-layout .resource-aside-block .eyebrow {
  display:flex;
  width:100%;
  margin:0 0 9px;
  font-size:.73rem;
  line-height:1.35;
}
html body .v8-fix-guide-layout .resource-aside-block strong {
  display:block;
  min-width:0;
  color:var(--text);
  font-size:.96rem;
  line-height:1.45;
  overflow-wrap:anywhere;
  word-break:normal;
}
html body .v8-fix-guide-layout .resource-aside-block:nth-child(2) { --reveal-delay:70ms; }
html body .v8-fix-guide-layout .resource-aside-block:nth-child(3) { --reveal-delay:140ms; }

@media (hover:hover) and (pointer:fine) {
  html body .v8-fix-guide-layout .resource-aside-block {
    transition:transform .38s var(--ease),border-color .3s ease,box-shadow .38s var(--ease);
  }
  html body .v8-fix-guide-layout .resource-aside-block:hover {
    transform:translateY(-2px);
    border-color:var(--border-strong);
    box-shadow:var(--shadow-1);
  }
}
@media (max-width:1000px) {
  html body .v8-fix-guide-layout {
    grid-template-columns:1fr;
    gap:40px;
  }
  html body .v8-fix-guide-layout .resource-aside {
    position:static;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
  }
}
@media (max-width:700px) {
  html body .v8-fix-guide-layout {
    gap:32px;
  }
  html body .v8-fix-guide-layout .resource-quick {
    margin-bottom:34px;
    padding:22px;
    border-radius:0 10px 10px 0;
  }
  html body .v8-fix-guide-layout .resource-content-section {
    margin-bottom:28px;
    padding-bottom:28px;
  }
  html body .v8-fix-guide-layout .resource-aside {
    grid-template-columns:1fr;
    gap:10px;
  }
  html body .v8-fix-guide-layout .resource-aside-block {
    padding:16px 18px;
  }
}
@media (max-width:360px) {
  html body .v8-fix-guide-layout .resource-quick { padding:19px; }
  html body .v8-fix-guide-layout .resource-aside-block { padding:15px 16px; }
}

/* --------------------------------------------------------------------------
   AUDIT OFFERS
   Only "Already have a website? / Choose how much help you need."
   -------------------------------------------------------------------------- */
html body .v8-fix-audit-offers .price-section-head {
  grid-template-columns:minmax(0,.9fr) minmax(320px,1.1fr);
  gap:clamp(36px,6vw,78px);
  align-items:end;
  margin-bottom:38px;
}
html body .v8-fix-audit-offers .price-section-head h2 {
  max-width:11ch;
  margin-bottom:0;
  line-height:1.03;
}
html body .v8-fix-audit-offers .price-section-head > div:last-child {
  align-self:end;
  padding-bottom:4px;
}
html body .v8-fix-audit-offers .price-section-head > div:last-child p {
  max-width:58ch;
  margin:0;
  line-height:1.65;
}
html body .v8-fix-audit-offers .audit-offer-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  align-items:stretch;
  border:0;
  background:transparent;
}
html body .v8-fix-audit-offers .audit-offer-card {
  min-width:0;
  min-height:286px;
  padding:28px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
html body .v8-fix-audit-offers .audit-offer-card h3 {
  margin:0 0 10px;
  line-height:1.25;
}
html body .v8-fix-audit-offers .audit-offer-card > strong {
  display:block;
  margin:0 0 14px;
  line-height:1.32;
}
html body .v8-fix-audit-offers .audit-offer-card p {
  margin:0 0 24px;
  max-width:62ch;
  line-height:1.62;
}
html body .v8-fix-audit-offers .audit-offer-action {
  margin-top:auto;
}
html body .v8-fix-audit-offers .audit-offer-card:nth-child(2) { --reveal-delay:80ms; }
html body .v8-fix-audit-offers .audit-maintenance-note {
  margin-top:18px;
  padding:20px 22px;
  gap:24px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
html body .v8-fix-audit-offers .audit-maintenance-note p {
  max-width:78ch;
  font-size:.86rem;
  line-height:1.62;
}
html body .v8-fix-audit-offers .audit-maintenance-note .text-link {
  flex:0 0 auto;
  white-space:nowrap;
}
@media (hover:hover) and (pointer:fine) {
  html body .v8-fix-audit-offers .audit-offer-card {
    transition:transform .4s var(--ease),border-color .3s ease,box-shadow .4s var(--ease);
  }
  html body .v8-fix-audit-offers .audit-offer-card:hover {
    transform:translateY(-3px);
    border-color:var(--border-strong);
    box-shadow:var(--shadow-2);
  }
}
@media (max-width:820px) {
  html body .v8-fix-audit-offers .price-section-head {
    grid-template-columns:1fr;
    gap:18px;
    margin-bottom:30px;
  }
  html body .v8-fix-audit-offers .price-section-head h2 {
    max-width:15ch;
  }
  html body .v8-fix-audit-offers .price-section-head > div:last-child {
    padding-bottom:0;
  }
}
@media (max-width:700px) {
  html body .v8-fix-audit-offers .audit-offer-grid {
    grid-template-columns:1fr;
    gap:14px;
  }
  html body .v8-fix-audit-offers .audit-offer-card {
    min-height:0;
    padding:22px;
  }
  html body .v8-fix-audit-offers .audit-maintenance-note {
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
    padding:18px 20px;
  }
  html body .v8-fix-audit-offers .audit-maintenance-note .text-link {
    white-space:normal;
  }
}
@media (max-width:360px) {
  html body .v8-fix-audit-offers .audit-offer-card { padding:19px; }
  html body .v8-fix-audit-offers .audit-maintenance-note { padding:17px; }
}

/* --------------------------------------------------------------------------
   GLOSSARY
   Better heading balance, card breathing and responsive rhythm.
   -------------------------------------------------------------------------- */
html body .v8-fix-glossary .resource-section-head {
  grid-template-columns:minmax(0,1.05fr) minmax(300px,.95fr);
  gap:clamp(34px,5vw,68px);
  align-items:end;
  margin-bottom:40px;
}
html body .v8-fix-glossary .resource-section-head h2 {
  max-width:12ch;
  margin-top:10px;
  line-height:1.02;
}
html body .v8-fix-glossary .resource-section-head > p {
  max-width:54ch;
  margin:0 0 4px;
  line-height:1.65;
}
html body .v8-fix-glossary .glossary-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 20px;
  align-items:stretch;
  border:0;
  background:transparent;
}
html body .v8-fix-glossary .glossary-item {
  min-width:0;
  padding:26px 28px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
html body .v8-fix-glossary .glossary-item h3 {
  margin:0 0 10px;
  font-size:1.06rem;
  line-height:1.3;
}
html body .v8-fix-glossary .glossary-item p {
  margin:0;
  color:var(--text-2);
  font-size:.91rem;
  line-height:1.62;
}
html body .v8-fix-glossary .glossary-item p + p {
  margin-top:6px;
}
html body .v8-fix-glossary .glossary-item:nth-child(2n) { --reveal-delay:70ms; }

@media (hover:hover) and (pointer:fine) {
  html body .v8-fix-glossary .glossary-item {
    transition:transform .38s var(--ease),border-color .3s ease,box-shadow .38s var(--ease);
  }
  html body .v8-fix-glossary .glossary-item:hover {
    transform:translateY(-2px);
    border-color:var(--border-strong);
    box-shadow:var(--shadow-1);
  }
}
@media (max-width:820px) {
  html body .v8-fix-glossary .resource-section-head {
    grid-template-columns:1fr;
    gap:16px;
    margin-bottom:30px;
  }
  html body .v8-fix-glossary .resource-section-head h2 {
    max-width:15ch;
  }
  html body .v8-fix-glossary .resource-section-head > p {
    margin-bottom:0;
  }
}
@media (max-width:700px) {
  html body .v8-fix-glossary .glossary-grid {
    grid-template-columns:1fr;
    gap:12px;
  }
  html body .v8-fix-glossary .glossary-item {
    padding:21px;
  }
}
@media (max-width:360px) {
  html body .v8-fix-glossary .glossary-item { padding:18px; }
}

/* Reduced motion remains fully respected for the targeted refinements. */
@media (prefers-reduced-motion:reduce) {
  html body .v8-fix-guide-layout .resource-aside-block,
  html body .v8-fix-audit-offers .audit-offer-card,
  html body .v8-fix-glossary .glossary-item {
    transition:none!important;
    transform:none!important;
  }
}


/* ---------------------------------------------------------------------
   0.8.8 — client-clarity blocks (reuse existing tokens, cards and rhythm)
   --------------------------------------------------------------------- */
/* Services: need-first cards — link sits at the bottom of each card */
html body .v8-need-section .simple-card .eyebrow { margin-bottom: var(--s-2); }
html body .v8-need-section .v8-need-link { margin-top: auto; align-self: flex-start; padding-top: var(--s-2); font-weight: 600; }

/* Studio: suitable client profiles */
html body .v8-audience-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--card-gap);
}
html body .v8-audience-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; font-weight: 600; color: var(--text); line-height: 1.35;
}
@media (max-width: 1099px) { html body .v8-audience-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { html body .v8-audience-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px)  { html body .v8-audience-list { grid-template-columns: 1fr; } }

/* Audit: deliverables inside the existing offer cards */
html body .audit-offer-card .v8-deliverables { list-style: none; margin: 10px 0 10px; padding: 0; display: grid; gap: 6px; }
html body .audit-offer-card .v8-deliverables li { position: relative; padding-left: 18px; font-size: .92rem; line-height: 1.45; color: var(--text-2); }
html body .audit-offer-card .v8-deliverables li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 2px; background: var(--accent);
}

/* Case studies: compact "at a glance" summary */
html body .case-glance-list {
  margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--card-gap);
}
html body .case-glance-list > div { border-top: 2px solid var(--accent); padding-top: var(--s-3); }
html body .case-glance-list dt { font-weight: 700; color: var(--text); margin-bottom: 6px; }
html body .case-glance-list dd { margin: 0; color: var(--text-2); font-size: .95rem; line-height: 1.5; }
@media (max-width: 1099px) { html body .case-glance-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { html body .case-glance-list { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------
   0.8.9 — Services need-first card breathing room
   Scope: Services only. Content, destinations and all other systems unchanged.
   --------------------------------------------------------------------- */
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .section-head {
  margin-bottom: clamp(42px, 4.2vw, 56px);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-grid-3 {
  gap: clamp(18px, 2vw, 24px);
  border: 0;
  background: transparent;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card {
  min-height: 286px;
  padding: clamp(28px, 2.4vw, 34px);
  border-radius: var(--radius);
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card .eyebrow {
  margin: 0 0 16px;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card h3 {
  margin: 0 0 16px;
  max-width: 15ch;
  line-height: 1.08;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card > p:not(.eyebrow) {
  margin: 0;
  max-width: 36ch;
  line-height: 1.62;
}
html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .v8-need-link {
  margin-top: auto;
  align-self: flex-start;
  padding-top: 28px;
  font-weight: 600;
}

@media (min-width: 700px) and (max-width: 1099px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .section-head {
    margin-bottom: 32px;
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card {
    min-height: 0;
    padding: 24px;
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card h3 {
    max-width: none;
  }
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .v8-need-link {
    padding-top: 24px;
  }
}

@media (hover: hover) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:is(.js,:not(.js)):is([data-theme],:not([data-theme])) body .v8-need-section .simple-card:hover {
    transform: none;
  }
}

/* 0.8.11 — case studies: consecutive decision paragraphs (Pamir-Lux automation block) */
html body .case-decision-copy + .case-decision-copy { margin-top: var(--s-3); }
