/* ==========================================================================
   CAVAS 2.0 — DESIGN SYSTEM
   Premium minimalist / editorial. Portfolio-first. Restraint over decoration.
   ========================================================================== */

/* ---- Design tokens (Brief §3.4–§3.11) ---------------------------------- */
:root {
  --bg-primary:      #0F1115;
  --bg-secondary:    #171A20;
  --surface:         #20242C;
  --text-primary:    #F5F5F3;
  --text-secondary:  #B5BAC4;
  --accent:          #C9A96A;
  --accent-ink:      #16181C; /* dark text on accent surfaces */
  --divider:         rgba(255,255,255,0.08);

  --font-heading: 'Manrope', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* 8-point spacing scale */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 48px;
  --sp-8: 64px;
  --sp-12: 96px;
  --sp-16: 128px;

  --radius-card:   14px;
  --radius-button: 12px;
  --radius-image:  14px;
  --radius-input:  10px;

  --content-max: 1360px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med:  250ms;
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overscroll-behavior-y: none; }
@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; }
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

/* ---- Utility ------------------------------------------------------------ */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: var(--sp-2);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-button);
  font-family: var(--font-heading);
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus {
  left: var(--sp-2);
  top: var(--sp-2);
}

/* Visible keyboard focus everywhere (Brief §5.18, §6.8) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Typography scale (Brief §3.5) -------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-primary); line-height: 1.15; }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; }
p  { color: var(--text-secondary); }
.caption { font-size: 15px; color: var(--text-secondary); }

/* ---- Header / Navigation (Brief §5.4) ----------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 0;
  transition: padding var(--dur-med) var(--ease-out);
}
/* Blur lives on a pseudo-element, not on .site-header itself — a
   backdrop-filter on .site-header would otherwise become the containing
   block for any position:fixed descendant (e.g. the mobile nav overlay),
   breaking its full-viewport coverage. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(15,17,21,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
}
.site-header.is-scrolled .container { padding-block: var(--sp-2); }

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.primary-nav { display: flex; align-items: center; gap: var(--sp-4); }
.primary-nav ul { display: flex; gap: var(--sp-3); }
.primary-nav a {
  white-space: nowrap;
  font-size: 14px;
  text-decoration: none;
  color: var(--text-secondary);
  padding: var(--sp-1) 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--text-primary); border-color: var(--accent); }

.nav-toggle {
  display: none;
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--divider);
  border-radius: var(--radius-button);
  overflow: hidden;
}
.lang-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--sp-1) var(--sp-2);
  min-width: 44px; min-height: 40px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--text-primary); }

/* ---- Buttons (Brief §3.11) ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  min-height: 48px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-button);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-2px); opacity: 0.92; }
.btn-secondary { background: transparent; border: 1px solid var(--divider); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-text { color: var(--accent); min-height: 44px; padding: 0 var(--sp-1); }
.btn-text:hover { opacity: 0.8; }

/* Homepage final art direction: one graphite/navy environment with restrained
   warm source light, cool fill, and a soft reflective floor. */
body[data-page="home"] {
  --home-graphite: #0b0e13;
  --home-navy: #0c1620;
  --home-warm-source: rgba(163, 119, 67, .105);
  --home-cool-fill: rgba(39, 75, 100, .16);
  --home-divider: rgba(190, 205, 218, .12);
  --home-section-space: clamp(60px, 5vw, 76px);
  --home-scene-width: 1460px;
}
body[data-page="home"] .story-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 72% 78% at 67% 83%, var(--home-cool-fill), transparent 74%),
    linear-gradient(108deg, #0b0e13 0%, #0d1218 40%, #0d1720 74%, #090d12 100%);
}
body[data-page="home"] .story-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 72% at 75% 43%, var(--home-warm-source), transparent 72%),
    radial-gradient(ellipse 72% 54% at 42% 70%, rgba(33, 62, 81, .10), transparent 76%);
}
body[data-page="home"] .story-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 56% 20% at 76% 88%, rgba(139, 102, 62, .075), transparent 72%),
    linear-gradient(180deg, transparent 66%, rgba(4, 8, 12, .20) 100%);
}
body[data-page="home"] #contact::before {
  background:
    radial-gradient(ellipse 64% 76% at 73% 48%, rgba(176, 130, 76, .14), transparent 72%),
    radial-gradient(ellipse 70% 58% at 45% 75%, rgba(43, 72, 90, .11), transparent 76%);
}
body[data-page="home"] .story-scene > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--home-scene-width);
  padding-inline: clamp(32px, 4vw, 64px);
}
body[data-page="home"] .hero { min-height: 0; padding-block: 22px 20px; }
body[data-page="home"] .hero__layout { position: relative; min-height: 510px; }
body[data-page="home"] .hero__content {
  position: relative;
  z-index: 3;
  width: min(43%, 620px);
  padding-top: 27px;
}
body[data-page="home"] .hero .eyebrow { margin-bottom: 12px; font-size: 12px; letter-spacing: .105em; }
body[data-page="home"] .hero h1 {
  max-width: 620px;
  margin-block: 12px 18px;
  color: #f1f0ec;
  font-size: clamp(52px, 3.7vw, 59px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.045;
}
body[data-page="home"] .hero__subtitle {
  max-width: 600px;
  margin-bottom: 22px;
  color: #c1c8cf;
  font-size: 18px;
  line-height: 1.48;
}
body[data-page="home"] .hero .page-hero__ctas {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 0;
}
body[data-page="home"] .hero .page-hero__ctas .btn {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: 12px;
  font-size: 14px;
  white-space: nowrap;
}
body[data-page="home"] .hero__visual,
body[data-page="home"] .home-story__visual {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
body[data-page="home"] .hero__visual {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -2%;
  width: min(61vw, 850px);
  transform: translateY(-49%);
}
body[data-page="home"] .story-scene img[data-home-asset] {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: saturate(.58) brightness(.88) contrast(.96);
}
body[data-page="home"] .section.home-story-section { padding-block: var(--home-section-space); }
body[data-page="home"] #how-it-works.section { padding-bottom: 36px; }
body[data-page="home"] #home-flagship-case.section { padding-block: 36px; }
body[data-page="home"] #why-cavas.section { padding-block: 36px; }
body[data-page="home"] #contact.section { padding-top: 36px; }
body[data-page="home"] .home-story__layout { position: relative; min-height: 480px; }
body[data-page="home"] .home-story__copy {
  position: relative;
  z-index: 3;
  width: 45%;
  max-width: 620px;
}
body[data-page="home"] #how-heading { font-size: clamp(36px, 2.6vw, 40px); }
body[data-page="home"] .home-story__copy h2 {
  max-width: 620px;
  margin-block: 12px 18px;
  color: #f0efeb;
  font-size: clamp(38px, 2.8vw, 43px);
  font-weight: 620;
  letter-spacing: -.03em;
  line-height: 1.08;
}
body[data-page="home"] .home-story__copy > p,
body[data-page="home"] .home-story__head > p {
  color: #bac3cc;
  font-size: 17px;
  line-height: 1.5;
}
body[data-page="home"] .home-story__visual {
  position: absolute;
  z-index: 2;
  right: -2%;
  width: min(60vw, 830px);
}
body[data-page="home"] .home-story__head { max-width: 620px; margin-bottom: 18px; }
body[data-page="home"] .home-story__head p { margin-top: 12px; }
body[data-page="home"] #how-it-works .home-story__layout { min-height: 580px; }
body[data-page="home"] .process-copy { width: 45%; max-width: 620px; }
body[data-page="home"] .process-steps {
  position: relative;
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
body[data-page="home"] .process-steps::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 24px;
  bottom: 24px;
  left: 28px;
  width: 1px;
  background: linear-gradient(180deg, rgba(190, 151, 94, .58), rgba(151, 169, 182, .28));
}
body[data-page="home"] .process-step { position: relative; z-index: 1; }
body[data-page="home"] .process-step__button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 7px 12px;
  border: 1px solid rgba(174, 190, 204, .075);
  border-radius: 11px;
  background: rgba(14, 20, 27, .20);
  color: #b9c2cb;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-med) ease, border-color var(--dur-med) ease, color var(--dur-med) ease;
}
body[data-page="home"] .process-step__button > * { grid-row: 1; }
body[data-page="home"] .process-step__icon { grid-column: 1; }
body[data-page="home"] .process-step__num { grid-column: 2; }
body[data-page="home"] .process-step__copy { grid-column: 3; }
body[data-page="home"] .process-step__button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body[data-page="home"] .process-step__button:hover { border-color: rgba(190, 151, 94, .25); background: rgba(30, 35, 39, .38); }
body[data-page="home"] .process-step.is-active .process-step__button {
  border-color: rgba(190, 151, 94, .50);
  background: linear-gradient(100deg, rgba(87, 70, 48, .28), rgba(18, 27, 34, .42));
  box-shadow: inset 0 0 16px rgba(155, 119, 70, .055), 0 0 14px rgba(155, 119, 70, .08);
  color: #e4e3df;
}
body[data-page="home"] .process-step__icon,
body[data-page="home"] .process-step__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111820;
}
body[data-page="home"] .process-step__icon { color: #87939e; }
body[data-page="home"] .process-step.is-active .process-step__icon { color: #d0b27b; }
body[data-page="home"] .process-step__num {
  border: 1px solid rgba(174, 190, 204, .20);
  color: #aeb9c2;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 650;
}
body[data-page="home"] .process-step.is-active .process-step__num {
  border-color: rgba(197, 161, 102, .72);
  color: #dfc58e;
}
body[data-page="home"] .home-icon { display: block; width: 22px; height: 22px; flex: none; }
body[data-page="home"] .process-step__copy { display: grid; gap: 2px; }
body[data-page="home"] .process-step__copy strong {
  color: #eeede9;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}
body[data-page="home"] .process-step__copy > span { color: #aeb8c1; font-size: 12px; line-height: 1.35; }
body[data-page="home"] .process-visual { top: 22px; right: -3%; width: min(60vw, 820px); }
body[data-page="home"] .process-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid rgba(180, 197, 210, .13);
  border-radius: 13px;
  background: linear-gradient(105deg, rgba(17, 25, 33, .78), rgba(12, 20, 28, .78));
}
body[data-page="home"] .process-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 16px;
}
body[data-page="home"] .process-benefit + .process-benefit { border-left: 1px solid var(--home-divider); }
body[data-page="home"] .process-benefit > .home-icon { width: 30px; height: 30px; color: #c9aa72; }
body[data-page="home"] .process-benefit span,
body[data-page="home"] .control-feature span { display: grid; gap: 3px; }
body[data-page="home"] .process-benefit strong,
body[data-page="home"] .control-feature strong {
  color: #eeede9;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}
body[data-page="home"] .process-benefit small,
body[data-page="home"] .control-feature small { color: #aeb8c1; font-size: 12px; line-height: 1.35; }
body[data-page="home"] .flagship-layout { min-height: 510px; }
body[data-page="home"] .flagship-layout .home-story__copy { width: 44%; max-width: 600px; padding-top: 24px; }
body[data-page="home"] .flagship-media { position: absolute; z-index: 2; top: 0; right: -3%; width: min(60vw, 820px); }
body[data-page="home"] .flagship-media .case-visual { position: relative; inset: auto; width: 100%; }
body[data-page="home"] .home-case-proof { display: grid; gap: 7px; margin: 20px 0; padding: 0; }
body[data-page="home"] .home-case-proof li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #c0c7cd;
  font-size: 14px;
  line-height: 1.4;
}
body[data-page="home"] .home-case-proof .home-icon { width: 17px; height: 17px; color: #c9aa72; }
body[data-page="home"] .demo-access { margin-top: 2px; text-align: left; }
body[data-page="home"] .demo-access summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #c9aa72;
  font-size: 14px;
  cursor: pointer;
  transition: color var(--dur-fast) ease;
}
body[data-page="home"] .demo-access summary:hover { color: #e0c28a; }
body[data-page="home"] .demo-access video { display: block; width: 100%; height: auto; max-height: 75vh; margin-top: 10px; background: #080c11; }
body[data-page="home"] .control-layout { min-height: 480px; }
body[data-page="home"] .control-layout .home-story__copy { width: 46%; max-width: 620px; padding-top: 20px; }
body[data-page="home"] .control-visual { top: 0; right: -3%; width: min(60vw, 820px); }
body[data-page="home"] .control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  margin: 24px 0 0;
  padding: 0;
}
body[data-page="home"] .control-feature { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 8px 10px 8px 0; }
body[data-page="home"] .control-feature:nth-child(odd) { border-right: 1px solid var(--home-divider); }
body[data-page="home"] .control-feature:nth-child(n+3) { border-top: 1px solid var(--home-divider); padding-top: 15px; }
body[data-page="home"] .control-feature > .home-icon {
  width: 31px;
  height: 31px;
  padding: 5px;
  border: 1px solid rgba(180, 197, 210, .16);
  border-radius: 8px;
  color: #c9aa72;
}
body[data-page="home"] .final-cta-layout { min-height: 470px; }
body[data-page="home"] .final-cta-layout .home-story__copy { width: 43%; max-width: 600px; padding-top: 24px; }
body[data-page="home"] .final-cta-visual { top: 0; right: -3%; width: min(61vw, 840px); }
body[data-page="home"] .home-final-cta .page-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
body[data-page="home"] .final-support { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 20px 0 0; padding: 0; }
body[data-page="home"] .final-support li { display: flex; align-items: center; gap: 7px; color: #b7c0c8; font-size: 13px; }
body[data-page="home"] .final-support .home-icon { width: 17px; height: 17px; color: #c9aa72; }
body[data-page="home"] .home-story__visual[hidden] { display: none; }
/* Keep major section boundaries continuous on the requested pages. */
body[data-page="home"] main > section,
body[data-page="aiAutomationConsulting"] main > section,
body[data-page="caseDetail"] main > section { border-block: 0; }
body[data-page="home"] .footer-bottom,
body[data-page="aiAutomationConsulting"] .footer-bottom,
body[data-page="caseDetail"] .footer-bottom { border-top: 0; }
body[data-page="home"] main > section::before,
body[data-page="home"] main > section::after,
body[data-page="aiAutomationConsulting"] main > section::before,
body[data-page="aiAutomationConsulting"] main > section::after,
body[data-page="caseDetail"] main > section::before,
body[data-page="caseDetail"] main > section::after { content: none; }

/* ---- Section shell --------------------------------------------------------- */
.section {
  padding-block: var(--sp-12);
}
.section__head { max-width: 720px; margin-bottom: var(--sp-6); }
.section__head p { margin-top: var(--sp-2); }

/* ---- Filters (Brief §5.11) -------------------------------------------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: var(--sp-1);
  margin-bottom: var(--sp-4);
}
.filter-btn {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  border-radius: var(--radius-button);
  padding: var(--sp-1) var(--sp-3);
  min-height: 44px;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.filter-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.filter-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---- Gallery grid (Brief §4.6) --------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 1023px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .gallery { grid-template-columns: 1fr; } }

.card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  transition: opacity var(--dur-med) ease;
}
.card[hidden] { display: none; }

.card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
  background: var(--surface);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
.visual-capability-card__media {
  background: var(--bg-secondary);
}
.visual-capability-card__media img {
  object-fit: contain;
  object-position: center center;
}
.card:hover .card-media img,
.card:focus-within .card-media img { transform: scale(1.04); }

.card-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-1);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.card-placeholder svg { opacity: 0.5; }

.card-btn {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  cursor: pointer;
}

.card-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--sp-2);
  display: flex; justify-content: space-between; align-items: baseline;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  pointer-events: none;
}
.card:hover .card-caption,
.card:focus-within .card-caption { opacity: 1; transform: translateY(0); }
.card-title { font-family: var(--font-heading); font-weight: 600; font-size: 14px; color: var(--text-primary); }
.card-tag { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* Featured cards slightly larger emphasis */
.featured-gallery { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .featured-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .featured-gallery { grid-template-columns: 1fr; } }

#home-visual-grid { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 1023px) { #home-visual-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 640px) { #home-visual-grid { grid-template-columns: 1fr !important; } }

/* ---- About & Contact --------------------------------------------------------- */
.about .container,
.contact .container { max-width: 720px; }
.home-final-cta .container { max-width: 1480px; }
.contact-links {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.contact-links a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.contact-links a:hover { color: var(--accent); border-color: var(--accent); }
.contact-cta { margin-top: var(--sp-6); }

/* ---- Footer ------------------------------------------------------------------ */
.site-footer {
  padding-block: var(--sp-6);
}
.site-footer .container {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  align-items: center; justify-content: space-between;
}
.site-footer nav ul { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.site-footer a { font-size: 14px; color: var(--text-secondary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--text-secondary); }

/* ---- Lightbox (Brief §4.8, §5.8) --------------------------------------------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,11,13,0.94);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  display: flex; flex-direction: column; gap: var(--sp-2);
  transform: scale(0.97);
  transition: transform var(--dur-med) var(--ease-out);
}
.lightbox.is-open .lightbox__figure { transform: scale(1); }
.lightbox__figure img {
  max-height: 76vh;
  width: auto; margin-inline: auto;
  border-radius: var(--radius-image);
  object-fit: contain;
}
.lightbox__figure.is-loading,
.home-visual-lightbox__figure.is-loading,
.case-slide-lightbox__figure.is-loading {
  min-height: min(62vh, 620px);
  justify-content: center;
}
.lightbox__figure.is-loading::before,
.home-visual-lightbox__figure.is-loading::before,
.case-slide-lightbox__figure.is-loading::before {
  content: "";
  width: 34px;
  height: 34px;
  border: 2px solid rgba(245,245,243,0.28);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: lightbox-spin 0.8s linear infinite;
}
.lightbox__figure.is-loading img,
.home-visual-lightbox__figure.is-loading img,
.case-slide-lightbox__figure.is-loading img {
  visibility: hidden;
}
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
.lightbox__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-heading); font-size: 14px; color: var(--text-secondary);
}
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  min-width: 48px; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  transition: background var(--dur-fast) ease;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.14); }
.lightbox__close { top: -8px; right: -8px; }
.lightbox__prev { left: -64px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: -64px; top: 50%; transform: translateY(-50%); }
@media (max-width: 900px) {
  .site-footer a, .btn-text, .article-back { min-height:44px; display:inline-flex; align-items:center; padding-block:10px; }
  .lightbox__prev { left: var(--sp-1); }
  .lightbox__next { right: var(--sp-1); }
  .lightbox__close { top: var(--sp-1); right: var(--sp-1); }
}

/* Skeleton loading state (Brief §5.19) */
.card-media.is-loading { background: linear-gradient(100deg, var(--surface) 30%, #262b34 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---- Mobile nav ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .lang-switch button { min-height: 44px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav ul {
    position: fixed; inset: 64px 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-primary);
    padding: var(--sp-4);
    transform: translateX(100%);
    transition: transform var(--dur-med) var(--ease-out);
  }
  .primary-nav[data-open="true"] ul { transform: translateX(0); }
  .primary-nav ul a { width: 100%; padding-block: var(--sp-2); border-bottom: 1px solid var(--divider); }
}

/* ==========================================================================
   CAVAS 3.0 — REPOSITIONING COMPONENTS
   New commercial-site components. Old gallery/card/lightbox/filter styles
   above are preserved as-is and reused by visual-work.html.
   ========================================================================== */

/* ---- Services dropdown (native <details>/<summary> — accessible by default) */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; white-space: nowrap;
  font-size: 14px; color: var(--text-secondary);
  padding: var(--sp-1) 2px; min-height: 44px; display: inline-flex; align-items: center; gap: 4px;
  border-bottom: 1px solid transparent;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: "\25BE"; font-size: 10px; opacity: .7; }
.nav-dropdown summary:hover, .nav-dropdown[open] summary { color: var(--text-primary); border-color: var(--accent); }
.nav-dropdown__panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  background: var(--bg-secondary); border: 1px solid var(--divider); border-radius: var(--radius-card);
  min-width: 240px; padding: var(--sp-1);
  display: flex; flex-direction: column; gap: 2px;
}
.nav-dropdown__panel a { display: flex; align-items: center; min-height: 40px; padding: var(--sp-1) var(--sp-2); font-size: 14px; color: var(--text-secondary); text-decoration: none; border-radius: 8px; }
.nav-dropdown__panel a:hover, .nav-dropdown__panel a:focus-visible { background: var(--surface); color: var(--text-primary); }

.nav-cta { display: inline-flex; white-space: nowrap; }
.nav-cta-mobile { display: none; }
@media (max-width: 1180px) {
  .nav-cta { display: none; }
  .nav-cta-mobile { display: block; margin-top: var(--sp-2); }
  .nav-cta-mobile .btn { width: 100%; justify-content: center; }
  .nav-dropdown__panel { position: static; margin-top: var(--sp-1); border: none; padding-left: var(--sp-2); background: transparent; }
}

/* ---- Footer (three-column) ---- */
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); padding-block: var(--sp-8) var(--sp-6); }
.footer-heading { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-primary); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-2); }
.footer-col a { font-size: 14px; color: var(--text-secondary); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding-block: var(--sp-3) var(--sp-6); border-top: 1px solid var(--divider); }
.footer-bottom a { font-size: 14px; color: var(--text-secondary); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* ---- Page hero (inner/service pages — smaller than homepage hero) ---- */
.page-hero { padding-block: var(--sp-12) var(--sp-8); }
.page-hero .container { max-width: 820px; }
.page-hero h1 { margin-block: var(--sp-2) var(--sp-3); }
.page-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.audit-offer{width:100%;max-width:560px;display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1fr) minmax(0,1.7fr);margin-top:18px;padding:12px 0;border-top:1px solid rgba(201,163,95,.7);border-bottom:1px solid rgba(255,255,255,.12)}
.audit-offer__cell{min-width:0;padding:0 18px;color:#d3d9e0;font:14px/1.35 Inter,sans-serif}.audit-offer__cell:first-child{padding-left:0}.audit-offer__cell+.audit-offer__cell{border-left:1px solid rgba(255,255,255,.16)}.audit-offer__cell strong{color:var(--accent);font:700 22px/1 Manrope,sans-serif}.audit-offer__cell small{display:block;color:#9eaab6;font:12px/1.35 Inter,sans-serif}.audit-offer__note{align-self:center}
@media (max-width:600px){.audit-offer{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:10px}.audit-offer__cell{padding-inline:12px}.audit-offer__cell:first-child{padding-left:0}.audit-offer__note{grid-column:1 / -1;padding-left:0;border-left:0;border-top:1px solid rgba(255,255,255,.16);padding-top:10px}}

/* ---- Checklists (problem points, visual-capability list, etc.) ---- */
.check-list { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1); }
.check-list li { color: var(--text-secondary); padding-left: var(--sp-3); position: relative; }
.check-list li::before { content: "\2014"; position: absolute; left: 0; color: var(--accent); }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-3); }
.chip { font-family: var(--font-heading); font-size: 13px; color: var(--text-secondary); border: 1px solid var(--divider); border-radius: var(--radius-button); padding: 6px var(--sp-2); }

/* ---- Service cards (homepage + /services) ---- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-6); }
.service-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out); }
.service-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.service-card.is-featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(201,169,106,0.10), transparent); }
.service-card p { flex: 1; }
@media (max-width: 1023px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }

/* ---- Workflow steps (How It Works) ---- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4) var(--sp-3); margin-top: var(--sp-6); }
.step-card { padding-top: var(--sp-3); border-top: 1px solid var(--divider); }
.step-num { font-family: var(--font-heading); color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; }
.step-card h3 { margin-block: var(--sp-1); }
@media (max-width: 1023px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; } }

/* ---- Case study cards ---- */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin-top: var(--sp-6); }
.case-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--sp-4); }
.case-card[hidden] { display: none; }
.case-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: var(--sp-2);
  white-space: normal;
}
.case-focus { font-size: 13px; color: var(--text-secondary); margin-top: var(--sp-3); border-top: 1px solid var(--divider); padding-top: var(--sp-2); }
@media (max-width: 768px) { .case-grid { grid-template-columns: 1fr; } }

/* ---- Why CAVAS principles ---- */
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-6); }
.principle-card h2 { font-size: 18px; margin-bottom: var(--sp-1); }
.principle-card p { max-width: 30ch; text-wrap: balance; }
@media (max-width: 1023px) { .principles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .principles-grid { grid-template-columns: 1fr; } }

/* ---- FAQ (native <details>/<summary>) ---- */
.faq-item { border-bottom: 1px solid var(--divider); padding-block: var(--sp-3); }
.faq-item summary { cursor: pointer; list-style: none; font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--text-primary); display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: var(--sp-2); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); flex-shrink: 0; transition: transform var(--dur-fast) ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: var(--sp-2); max-width: 680px; }

/* ---- Workflow flow-chain (Example Workflow diagrams) ---- */
.flow-chain { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-top: var(--sp-3); }
.flow-chain .flow-step { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-button); padding: var(--sp-1) var(--sp-3); font-family: var(--font-heading); font-size: 14px; color: var(--text-primary); }
.flow-chain .flow-arrow { color: var(--accent); font-family: var(--font-heading); }

/* ---- Decision framework / audit deliverables ---- */
.framework-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-top: var(--sp-4); }
.framework-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--sp-3); }
.framework-card h3 { font-size: 16px; color: var(--accent); }
@media (max-width: 768px) { .framework-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .framework-grid { grid-template-columns: 1fr; } }

.deliverable-list { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.deliverable-item { display: flex; gap: var(--sp-3); }
.deliverable-item .num { font-family: var(--font-heading); color: var(--accent); font-weight: 700; font-size: 20px; min-width: 28px; }

/* ---- Chatbot-vs-workflow comparison (Telegram page) ---- */
.compare-flow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
.compare-flow .col { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--sp-3); }
.compare-flow .col.cavas { border-color: var(--accent); }
.compare-flow .col-label { font-family: var(--font-heading); font-weight: 600; font-size: 13px; color: var(--text-secondary); display: block; margin-bottom: var(--sp-1); }
.compare-flow .flow-chain { margin-top: var(--sp-1); }
@media (max-width: 640px) { .compare-flow { grid-template-columns: 1fr; } }

/* ---- Problem→Service mapping (/services) ---- */
.mapping-list { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.mapping-item { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--sp-3); }
.mapping-item .problem { color: var(--text-secondary); }
.mapping-item a { font-family: var(--font-heading); font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
@media (max-width: 640px) { .mapping-item { flex-direction: column; align-items: flex-start; } }

/* ---- Insights / Articles ------------------------------------------------ */
.insight-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.related-grid { grid-template-columns: repeat(2, 1fr); }
.insight-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.insight-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.insight-card h2,
.insight-card h3 {
  font-size: clamp(20px, 2.2vw, 26px);
}
.insight-card p { flex: 1; }
.insight-card__meta {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-secondary);
}

.article-page { border-bottom: 1px solid var(--divider); }
.article-container { max-width: 860px; }
.article-hero {
  padding-block: var(--sp-10, 80px) var(--sp-8);
  border-bottom: 1px solid var(--divider);
}
.article-back { margin-bottom: var(--sp-3); }
.article-hero h1 {
  margin-block: var(--sp-3);
  font-size: clamp(36px, 5vw, 58px);
}
.article-excerpt {
  font-size: 20px;
  max-width: 760px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
  margin-top: var(--sp-3);
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text-secondary);
}
.article-content {
  padding-block: var(--sp-8);
}
.article-content h2 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-2);
  font-size: clamp(26px, 3vw, 36px);
}
.article-content h3 {
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-1);
  font-size: 20px;
  color: var(--accent);
}
.article-content p,
.article-content li {
  color: var(--text-secondary);
}
.article-content p + p { margin-top: var(--sp-2); }
.article-content ul,
.article-content ol {
  list-style: revert;
  padding-left: var(--sp-4);
  margin-block: var(--sp-3);
}
.article-content li + li { margin-top: 6px; }
.article-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,169,106,0.42);
}
.article-content a:hover { border-color: var(--accent); }
.article-cta {
  margin-bottom: var(--sp-8);
  padding: var(--sp-4);
  border: 1px solid rgba(201,169,106,0.48);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(201,169,106,0.10), rgba(201,169,106,0.035));
}
.article-cta h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: var(--sp-2);
}
.article-cta .btn { margin-top: var(--sp-3); }
.article-section {
  margin-bottom: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--divider);
}
.article-section > h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: var(--sp-3);
}
.article-faq .faq-item p { max-width: 780px; }
@media (max-width: 1023px) {
  .insight-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .insight-grid,
  .related-grid { grid-template-columns: 1fr; }
  .article-hero { padding-block: var(--sp-8) var(--sp-6); }
  .article-excerpt { font-size: 18px; }
}

/* ---- Contact form ---- */
.contact-form { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-6); max-width: 640px; }
.form-field label { display: block; font-family: var(--font-heading); font-size: 13px; font-weight: 600; margin-bottom: var(--sp-1); color: var(--text-primary); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-input);
  color: var(--text-primary); padding: var(--sp-1) var(--sp-2); font-family: var(--font-body); font-size: 16px; min-height: 48px;
}
.form-field textarea { min-height: 120px; resize: vertical; padding-top: var(--sp-1); }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--accent); }
.radio-group { display: flex; flex-wrap: wrap; gap: var(--sp-1); align-items: stretch; }
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  font-family: var(--font-body);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-button);
  padding: var(--sp-1) var(--sp-2);
  min-height: 40px;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.radio-group input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.radio-group label::before {
  content: "";
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  max-width: 10px;
  max-height: 10px;
  flex: 0 0 10px;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgba(245,245,243,0.86);
  background: transparent;
}
.radio-group label.is-recommended::before { background: var(--accent); border-color: var(--accent); }
.radio-group label.is-standard::before { background: transparent; border-color: rgba(245,245,243,0.86); }
.radio-group label.is-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(201,169,106,0.10), rgba(201,169,106,0.035));
  box-shadow: 0 0 0 1px rgba(201,169,106,0.28), 0 10px 28px rgba(201,169,106,0.08);
  color: var(--text-primary);
}
.radio-group label:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-note { margin-top: var(--sp-2); font-size: 14px; }
.form-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-status {
  margin-top: var(--sp-2);
  padding: var(--sp-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 15px;
}
.form-status.is-success { border-color: rgba(201,169,106,0.62); }
.form-status.is-error { border-color: rgba(245,112,112,0.72); }
.contact-form button[disabled] {
  cursor: progress;
  opacity: 0.72;
}


/* ---- Case study media cards and detail pages ---- */
.case-card--with-media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.case-card--text-only { display: flex; flex-direction: column; min-height: 100%; }
.case-card--featured { border-color: var(--accent); }
.case-card__media-link { display: block; background: var(--bg-secondary); text-decoration: none; }
.case-card__media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-fast) ease; }
.case-card__media-link:hover .case-card__media,
.case-card__media-link:focus-visible .case-card__media { transform: scale(1.025); opacity: 0.92; }
.case-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.case-card__body .case-label { align-self: flex-start; margin-bottom: 0; }
.case-card__body h2 { margin-top: 0; }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-1); }
.case-tags li { font-family: var(--font-heading); font-size: 12px; color: var(--text-secondary); border: 1px solid var(--divider); border-radius: var(--radius-button); padding: 4px 10px; }
.case-card__cta { margin-top: auto; align-self: flex-start; text-decoration: none; }
@media (min-width: 900px) {
  .case-grid .case-card--featured { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .case-grid .case-card--featured .case-card__media-link,
  .case-grid .case-card--featured .case-card__media { height: 100%; }
}

.case-detail__hero .container { max-width: 920px; }
.case-detail__back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: var(--sp-3); text-decoration: none; }
.case-detail__hero .case-label { margin-bottom: var(--sp-2); }
.case-detail__hero h1 { margin-block: var(--sp-2) var(--sp-3); }
.case-detail__hero .case-tags { margin-top: var(--sp-3); }
.case-detail__hero .case-focus { max-width: 760px; }
.case-detail__gallery-head { margin-top: var(--sp-6); margin-bottom: var(--sp-4); }
.case-study-content .container { max-width: 980px; }
.case-study-block { margin-bottom: var(--sp-8); }
.case-study-block > h2 { margin-bottom: var(--sp-2); }
.case-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin-top: var(--sp-4); }
.case-media-inline { margin-top: var(--sp-4); }
.case-result-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin-top: var(--sp-4); }
.case-result-list { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-3); }
.case-result-list div { display: grid; grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-2); padding-block: var(--sp-1); border-top: 1px solid var(--divider); }
.case-result-list dt { font-family: var(--font-heading); font-size: 13px; color: var(--text-secondary); }
.case-result-list dd { color: var(--text-primary); overflow-wrap: anywhere; }
.case-mobile-cta-section { display: none; border-bottom: 1px solid var(--divider); padding-block: 0 var(--sp-6); }
.case-mobile-cta-section .btn { width: 100%; }
.case-video { margin-bottom: var(--sp-6); }
.case-video video { width: 100%; max-height: 78vh; border-radius: var(--radius-image); background: var(--bg-secondary); border: 1px solid var(--divider); }
.case-slide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.case-slide { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); overflow: hidden; }
.case-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-secondary); }
.case-slide figcaption { font-family: var(--font-heading); font-size: 12px; color: var(--text-secondary); padding: var(--sp-1) var(--sp-2); border-top: 1px solid var(--divider); }
@media (max-width: 768px) {
  .case-slide-grid { grid-template-columns: 1fr; }
  .case-result-grid { grid-template-columns: 1fr; }
  .case-result-media-grid { grid-template-columns: 1fr; }
  .case-result-list div { grid-template-columns: 1fr; gap: 2px; }
  .case-mobile-cta-section { display: block; }
}


/* ---- Owner visual review corrective pass ---- */
html {
  --type-large: clamp(34px, 4vw, 58px);
  --type-section: clamp(28px, 3vw, 38px);
  --type-medium: 21px;
  --type-body: 17px;
  --type-small: 13px;
}

body { font-size: var(--type-body); }
h1 { font-size: var(--type-large); }
h2 { font-size: var(--type-section); }
h3,
.service-card h3,
.case-card h2,
.framework-card h3,
.principle-card h2,
.step-card h3,
.faq-item summary { font-size: var(--type-medium); }
p,
li,
.service-card p,
.case-card p,
.framework-card p,
.principle-card p,
.step-card p,
.mapping-item .problem,
.form-field input,
.form-field textarea,
.form-field select { font-size: var(--type-body); line-height: 1.6; }
.btn,
.btn-text,
.mapping-item a { font-size: 15px; }
.hero__subtitle { font-size: 20px; }
.eyebrow,
.case-label,
.case-tags li,
.chip,
.filter-btn,
.step-num,
.footer-heading,
.form-field label,
.card-tag { font-size: var(--type-small); }
.case-focus,
.form-note,
.caption,
.case-slide figcaption,
.card-title,
.site-footer a,
.footer-bottom a,
.footer-copy { font-size: 15px; line-height: 1.55; }

.framework-card h3 { display: flex; align-items: center; gap: 10px; }
.framework-card h3::before {
  content: "";
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  max-width: 10px;
  max-height: 10px;
  flex: 0 0 10px;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid rgba(245,245,243,0.86);
  background: transparent;
}
.framework-card.is-recommended h3::before { background: var(--accent); border-color: var(--accent); }
.framework-card.is-standard h3::before { background: transparent; border-color: rgba(245,245,243,0.86); }

.home-visual-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: rgba(7,8,10,0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med) var(--ease-out);
}
.home-visual-lightbox.is-open { opacity: 1; visibility: visible; }
.home-visual-lightbox__figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  max-width: 100%;
  max-height: 94vh;
}
.home-visual-lightbox__figure img {
  max-width: 100%;
  max-height: calc(94vh - 44px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-image);
  background: var(--bg-secondary);
}
.home-visual-lightbox__figure figcaption { font-family: var(--font-heading); font-size: 15px; color: var(--text-secondary); }
.home-visual-lightbox__close,
.home-visual-lightbox__nav {
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-size: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-visual-lightbox__close { position: absolute; top: var(--sp-3); right: var(--sp-3); }
.home-visual-lightbox__prev { grid-column: 1; justify-self: center; }
.home-visual-lightbox__next { grid-column: 3; justify-self: center; }
.home-visual-lightbox__close:hover,
.home-visual-lightbox__nav:hover { background: rgba(255,255,255,0.16); }

.case-slide__button { display: block; width: 100%; border: 0; padding: 0; background: var(--bg-secondary); cursor: zoom-in; }
.case-slide__button img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--bg-secondary); }
.case-slide__button:hover img,
.case-slide__button:focus-visible img { opacity: 0.9; }

.case-slide-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: rgba(7,8,10,0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med) var(--ease-out);
}
.case-slide-lightbox.is-open { opacity: 1; visibility: visible; }
.case-slide-lightbox__figure { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); max-width: 100%; max-height: 94vh; }
.case-slide-lightbox__figure img { max-width: 100%; max-height: calc(94vh - 44px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-image); background: var(--bg-secondary); }
.case-slide-lightbox__figure figcaption { font-family: var(--font-heading); font-size: 15px; color: var(--text-secondary); }
.case-slide-lightbox__close,
.case-slide-lightbox__nav { min-width: 56px; min-height: 56px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--text-primary); font-size: 34px; display: inline-flex; align-items: center; justify-content: center; }
.case-slide-lightbox__close { position: absolute; top: var(--sp-3); right: var(--sp-3); }
.case-slide-lightbox__prev { grid-column: 1; justify-self: center; }
.case-slide-lightbox__next { grid-column: 3; justify-self: center; }
.case-slide-lightbox__close:hover,
.case-slide-lightbox__nav:hover { background: rgba(255,255,255,0.16); }

@media (min-width: 820px) and (max-width: 1399px) {
  body[data-page="home"] .hero { padding-block: var(--sp-4); }
  body[data-page="home"] .hero__subtitle { margin-bottom: var(--sp-3); }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .container { padding-inline: var(--sp-2); }
  .hero, .page-hero { padding-block: var(--sp-8) var(--sp-6); }
  body[data-page="home"] .hero .container { padding-inline: var(--sp-2); }
  .home-final-cta .page-hero__ctas { display: grid; }
  .home-final-cta .page-hero__ctas .btn { width: 100%; }
  .section { padding-block: var(--sp-8); }
  .case-card__body, .service-card, .framework-card { padding: var(--sp-3); }
  .case-slide-lightbox { grid-template-columns: 56px minmax(0, 1fr) 56px; padding: var(--sp-1); gap: 4px; }
  .case-slide-lightbox__figure { grid-column: 1 / -1; }
  .case-slide-lightbox__figure img { max-height: calc(90vh - 56px); }
  .case-slide-lightbox__prev, .case-slide-lightbox__next { position: fixed; top: 50%; transform: translateY(-50%); z-index: 1; }
  .case-slide-lightbox__prev { left: var(--sp-1); }
  .case-slide-lightbox__next { right: var(--sp-1); }
  .case-slide-lightbox__close { top: var(--sp-1); right: var(--sp-1); }
  .home-visual-lightbox { grid-template-columns: 56px minmax(0, 1fr) 56px; padding: var(--sp-1); gap: 4px; }
  .home-visual-lightbox__figure { grid-column: 1 / -1; }
  .home-visual-lightbox__figure img { max-height: calc(90vh - 56px); }
  .home-visual-lightbox__prev, .home-visual-lightbox__next { position: fixed; top: 50%; transform: translateY(-50%); z-index: 1; }
  .home-visual-lightbox__prev { left: var(--sp-1); }
  .home-visual-lightbox__next { right: var(--sp-1); }
  .home-visual-lightbox__close { top: var(--sp-1); right: var(--sp-1); }
}

@media (max-width: 600px) {
  #disciplines-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    gap: var(--sp-3);
  }

  #disciplines-grid > * {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}


@media (max-width: 819px) {
  body[data-page="home"] .story-scene { min-height:0; overflow:hidden; }
  body[data-page="home"] .hero,
  body[data-page="home"] .section.home-story-section { padding:40px 20px; }
  body[data-page="home"] .story-scene > .container { padding-inline:0; }
  body[data-page="home"] .hero__layout,
  body[data-page="home"] .home-story__layout { display:flex; flex-direction:column; min-height:0; gap:22px; }
  body[data-page="home"] .hero__content,
  body[data-page="home"] .home-story__copy,
  body[data-page="home"] .process-copy,
  body[data-page="home"] .flagship-layout .home-story__copy,
  body[data-page="home"] .control-layout .home-story__copy,
  body[data-page="home"] .final-cta-layout .home-story__copy { width:100%; max-width:none; padding-top:0; }
  body[data-page="home"] .hero h1 { font-size:clamp(36px,8vw,50px); }
  body[data-page="home"] #how-heading { font-size:clamp(30px,8vw,35px); line-height:1.08; }
  body[data-page="home"] .home-story__copy h2 { font-size:clamp(30px,8vw,35px); line-height:1.08; }
  body[data-page="home"] .hero__subtitle { font-size:18px; }
  body[data-page="home"] .hero .page-hero__ctas { flex-direction:column; gap:10px; }
  body[data-page="home"] .hero .page-hero__ctas .btn { width:100%; flex:auto; }
  body[data-page="home"] .hero__visual,
  body[data-page="home"] .home-story__visual,
  body[data-page="home"] .flagship-media,
  body[data-page="home"] .flagship-media .case-visual { position:relative; inset:auto; top:auto; right:auto; transform:none; width:100%; max-width:none; margin:0; }
  body[data-page="home"] .process-benefits { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-page="home"] .process-benefit:nth-child(3) { border-left:0; }
  body[data-page="home"] .process-benefit:nth-child(n+3) { border-top:1px solid var(--home-divider); }
  body[data-page="home"] .control-grid { grid-template-columns:1fr; }
  body[data-page="home"] .control-feature:nth-child(odd) { border-right:0; }
  body[data-page="home"] .control-feature:nth-child(n+2) { border-top:1px solid var(--home-divider); padding-top:14px; }
  body[data-page="home"] .final-support { display:grid; gap:10px; }
}

@media (max-width: 520px) {
  body[data-page="home"] .process-benefits { grid-template-columns:1fr; }
  body[data-page="home"] .process-benefit + .process-benefit,
  body[data-page="home"] .process-benefit:nth-child(n+3) { border-left:0; border-top:1px solid var(--home-divider); }
  body[data-page="home"] .process-benefit { padding:11px 12px; }
}


/* About page: align heading with cards, tighten the gap */
body[data-page="about"] .page-hero { padding-bottom: var(--sp-4); }
body[data-page="about"] .page-hero .container { max-width: var(--content-max); }
body[data-page="about"] .page-hero + .section { padding-top: var(--sp-4); }
body[data-page="about"] #disciplines-grid { margin-top: 0; }
/* Footer: service heading is a link, keep it the same height as the other headings */
.site-footer a.footer-heading { min-height: 0; display: block; }
/* Mobile menu: full-width rows */
@media (max-width: 1180px) { .primary-nav ul { align-items: stretch; } }
