/* Shared presentation contract for the production site.
   Page styles own composition; this file owns reveal motion, glass, dividers
   and section rhythm. Chrome/buttons remain owned by lex-nav.css. */
:root {
  --content-space: var(--space-action);
  --heading-space: var(--space-heading);
  --surface-glass: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  --surface-border: rgba(143,179,204,.18);
  --surface-blur: blur(14px) saturate(120%);
  --surface-hover: rgba(255,255,255,.032);
  --surface-ease: cubic-bezier(.22,.61,.36,1);
  --surface-duration: 550ms;
  --surface-glow: 0 0 28px rgba(255,255,255,.06), 0 0 42px rgba(143,179,204,.055);
  --section-divider: linear-gradient(90deg, transparent, rgba(143,179,204,.22) 15%, rgba(143,179,204,.40) 50%, rgba(143,179,204,.22) 85%, transparent);
  --section-pad: var(--section-space);
  --section-y: var(--section-space);
  --gap-body-blocks: var(--content-space);
  --section-stack-gap: var(--content-space);
}

/* The shared observer uses the same 14px rise and 720ms fade for every entry.
   No blur, scale or per-card delays. Hover transforms are independent. */
html.js [data-reveal-state="pending"] { opacity: 0 !important; }
.hero-left, .hero-stats, .rs-stat { animation: none !important; }
.cs-card:nth-child(n) { transition-delay: 0s !important; }
body[data-page="home"] .cs-ribbon { container-type: inline-size; }
body[data-page="home"] .cs-metric { min-width: 0; container-type: normal; }
body[data-page="home"] .cs-value {
  font-size: var(--type-metric-box) !important;
  white-space: nowrap;
}

/* One divider across home and service sections. The alternating page/section
   backgrounds remain intact. No opaque edge or page-specific separator. */
body[data-page="home"] main > section,
body:not([data-page="home"]) :is(.section, .consultation) { border-block: 0; }
body[data-page="home"] main > section::before,
body:not([data-page="home"]) :is(.section, .consultation)::before {
  content: ''; position: absolute; inset: 0 0 auto; width: 100%; height: 1px;
  margin: 0; transform: none; background: var(--section-divider);
  opacity: 1; pointer-events: none; z-index: 3;
}
body:not([data-page="home"]) .section::after { display: none; }
body:not([data-page="home"]) .hero::after {
  width: 100%; left: 0; transform: none; background: var(--section-divider);
}
body[data-page="home"] :is(.rs-in, .gs-in, .about-in, .cs-in, .whyus-live-in, .talk-in, .faqx-in) {
  padding-block: var(--section-space) !important;
  padding-inline: var(--shell-pad) !important;
  margin-block: 0 !important;
}
body[data-page="home"] .why-section { padding-block: var(--section-space) !important; }
body:not([data-page="home"]) :is(.section, .consultation) { padding-block: var(--section-space) !important; }
body[data-page="home"] :is(.why-head, .gs-head, .cs-head, .about-intro, .faqx-head) {
  margin-bottom: var(--content-space) !important;
}
body[data-page="home"] :is(.why-cta, .about-cta, .cs-foot, .whyus-live-actions) {
  margin-top: var(--content-space) !important; margin-bottom: 0 !important;
}
body[data-page="home"] :is(.gs-head, .cs-head, .why-head, .about-intro) > p,
.section-copy { margin-top: var(--heading-space) !important; }
body[data-page="home"] :is(.gs-head, .cs-head, .why-head, .about-intro) > :is(h1,h2),
.section h2 { margin-top: var(--heading-space); }
body[data-page="home"] main :is(.eye, .h-eye) { margin-block: 0; }
body[data-page="home"] .about-intro { gap: 0; }
body[data-page="home"] :is(.why-mega, .gs-h1, .about-h, .proto-h, .cs-h, .whyus-live-h, .talk-h, .faqx-h) {
  margin-block: var(--heading-space) 0;
}
body[data-page="home"] .why-head { margin-bottom: var(--heading-space) !important; }
body[data-page="home"] .why-sub { margin-block: 0 var(--content-space); }
body[data-page="home"] :is(.proto-desc, .whyus-live-sub, .faqx-copy) { margin-block: var(--heading-space) 0; }
.section-heading, .process-heading { margin-bottom: var(--content-space); }
.ranking-points, .section-cta { margin-top: var(--content-space) !important; }
.section-footer-cta { margin-top: var(--content-space) !important; margin-bottom: 0; }

/* Who We Are is the reference surface. All equivalent home panels share it. */
body[data-page="home"] :is(.stat-strip, .metrics-panel, .why-card, .cs-card, .monolith),
.include-grid, .process-system {
  background-image: var(--surface-glass) !important;
  background-color: transparent;
  border: 1px solid var(--surface-border) !important;
  backdrop-filter: var(--surface-blur) !important;
  -webkit-backdrop-filter: var(--surface-blur) !important;
  box-shadow: none;
}
body[data-page="home"] :is(.why-card, .cs-card) {
  transition: transform var(--surface-duration) var(--surface-ease),
    background-color var(--surface-duration) ease, border-color var(--surface-duration) ease,
    box-shadow var(--surface-duration) ease;
}
body[data-page="home"] :is(.stat-item, .metric),
body[data-page="home"] .rs.rs-quote-led .metrics-panel .metric,
.include-card, .process-step {
  background: transparent;
  transition: background-color var(--surface-duration) ease, box-shadow var(--surface-duration) ease;
}
body[data-page="home"] :is(.wc-new, .wc-old, .wc-desc, .cs-title, .cs-detail, .cs-body, .cs-kicker) {
  transition-duration: var(--surface-duration);
}
body[data-page="home"] :is(.stat-n, .mval, .rs-n), .hero-stat strong {
  color: #fff; opacity: .68; transform: translateY(0);
  transition: transform var(--surface-duration) var(--surface-ease),
    opacity var(--surface-duration) ease, text-shadow var(--surface-duration) ease;
}
body[data-page="home"] :is(.stat-l, .mlbl, .rs-l), .hero-stat span {
  color: #989da4;
  transition: color var(--surface-duration) ease;
}
.hero-stat, .rs-stat { transition: transform var(--surface-duration) var(--surface-ease); }
@keyframes shared-panel-enter {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}
.gs .v-mid-content.panel-in, .gs .panel.active {
  animation: shared-panel-enter 720ms var(--surface-ease);
}
@media (hover: hover) and (pointer: fine) {
  body[data-page="home"] :is(.why-card, .cs-card):hover {
    transform: translateY(-3px); border-color: rgba(143,179,204,.38) !important;
    background-color: var(--surface-hover);
    box-shadow: var(--surface-glow);
  }
  body[data-page="home"] :is(.stat-item, .metric):hover,
  .include-card:hover, .process-step:hover { background: var(--surface-hover); }
  body[data-page="home"] :is(.stat-item, .metric):hover :is(.stat-n, .mval),
  body[data-page="home"] .rs-stat:hover .rs-n, .hero-stat:hover strong {
    opacity: 1; transform: translateY(-2px);
    text-shadow: 0 0 28px rgba(255,255,255,.14), 0 0 42px rgba(143,179,204,.12);
  }
  body[data-page="home"] :is(.stat-item, .metric, .rs-stat):hover :is(.stat-l, .mlbl, .rs-l),
  .hero-stat:hover span { color: #c6cbd1; }
  .hero-stat:hover, .rs-stat:hover { transform: translateY(-2px); }
}

/* Results must fit their column, rather than borrowing space from the quote. */
body[data-page="home"] .rs.rs-quote-led .divide {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 4vw, 64px);
}
body[data-page="home"] .rs.rs-quote-led :is(.rs-left, .rs-right) {
  min-width: 0; min-height: 0; width: 100%; padding: 0; margin: 0;
}
body[data-page="home"] .rs.rs-quote-led .rs-left { container-type: inline-size; }
body[data-page="home"] .rs.rs-quote-led .rs-h1 {
  width: 100%; max-width: 100%; font-size: clamp(1.75rem, 6.35cqi, 3.2rem);
  line-height: 1.06; margin: var(--heading-space) 0 0;
}
body[data-page="home"] .rs.rs-quote-led .rs-h1 :is(.rs-main-line, .serif) {
  display: block; white-space: normal; overflow-wrap: normal;
}
body[data-page="home"] .rs.rs-quote-led .big-num {
  font-size: var(--type-metric-hero) !important;
  white-space: nowrap; max-width: 100%; line-height: 1.05; margin: 0;
}
body[data-page="home"] .rs.rs-quote-led .rs-left-main .num-block { margin-block: var(--content-space) 0; gap: 0; }
body[data-page="home"] .rs .attrib-txt { max-width: 100%; margin-top: var(--heading-space); }
body[data-page="home"] .rs .rs-left-main + .btn-p { margin-top: var(--content-space); align-self: flex-start; }
body[data-page="home"] .rs.rs-quote-led .rs-right {
  display: grid; gap: var(--content-space); align-content: center;
}
body[data-page="home"] .rs.rs-quote-led .rs-feature-quote {
  width: 100%; margin: 0; padding: 0 0 0 clamp(20px, 2vw, 32px);
}
body[data-page="home"] .rs.rs-quote-led .qbody {
  font-size: var(--type-quote) !important;
  line-height: 1.5; letter-spacing: 0; overflow-wrap: normal;
}
body[data-page="home"] .rs .qattr { margin-top: var(--heading-space); line-height: 1.5; }
body[data-page="home"] .rs.rs-quote-led .metrics-panel {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%; margin: 0; gap: 0;
}
body[data-page="home"] .rs.rs-quote-led .metric {
  min-width: 0; min-height: clamp(110px, 10vw, 140px); padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; container-type: inline-size;
  border: 0; border-left: 1px solid var(--surface-border);
}
body[data-page="home"] .rs.rs-quote-led .metric:first-child { border-left: 0; }
body[data-page="home"] .rs .mval { font-size: var(--type-metric-box); line-height: 1; white-space: nowrap; }
body[data-page="home"] .rs .mlbl { font-size: var(--type-metric-label); line-height: var(--leading-caption); margin: 0; max-width: 16ch; min-height: 2.8em; }

/* Equal-sized, content-responsive 3x2 stats. Stack the two content columns
   before the table becomes too narrow, not after the text has overflowed. */
body[data-page="home"] .about-layout-b { display: block; }
body[data-page="home"] .about-v3-body-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 4vw, 64px); margin-top: 0;
}
body[data-page="home"] :is(.about-col-left, .about-col-right) { min-width: 0; padding: 0; }
body[data-page="home"] .about-b-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 1fr); height: auto; width: 100%; min-width: 0;
}
body[data-page="home"] .about-b-stats .stat-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  container-type: inline-size; min-width: 0; min-height: clamp(124px, 12vw, 162px);
  padding: clamp(16px, 1.9vw, 28px) clamp(8px, 1vw, 16px); gap: 12px; text-align: center;
  border: 0; border-left: 1px solid var(--surface-border); border-top: 1px solid var(--surface-border);
}
body[data-page="home"] .about-b-stats .stat-item:nth-child(3n+1) { border-left: 0; }
body[data-page="home"] .about-b-stats .stat-item:nth-child(-n+3) { border-top: 0; }
body[data-page="home"] .about-b-stats .stat-n { font-size: var(--type-metric-box); line-height: 1; white-space: nowrap; margin: 0; }
body[data-page="home"] .about-b-stats .stat-l { font-size: var(--type-metric-label); line-height: var(--leading-caption); margin: 0; max-width: 18ch; min-height: 4.35em; }

/* Protocol is a normal document flow. Its steps use the same reveal as cards,
   without a fixed column, artificial scroll height or timed catch-up. */
body[data-page="home"] .proto-section { padding: var(--section-space) 0; }
body[data-page="home"] :is(.scroll-wrap, .scroll-pin) { position: relative; top: auto; height: auto !important; overflow: visible; }
body[data-page="home"] .pin-inner {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  width: 100%; max-width: var(--shell); height: auto; margin: 0 auto;
  padding: 0 var(--shell-pad); align-items: start; gap: clamp(32px, 5vw, 72px);
}
body[data-page="home"] .pin-left { position: static; top: auto; left: auto; width: auto; min-width: 0; transform: none; padding: 0; }
body[data-page="home"] .proto-desc { margin-top: var(--heading-space); }
body[data-page="home"] .prog { display: none; }
body[data-page="home"] .pin-right { width: auto; padding: 0; min-width: 0; transform: none !important; }
body[data-page="home"] .pin-right::before,
body[data-page="home"] .pstep::before,
body[data-page="home"] .pstep::after { display: none; }
body[data-page="home"] .pstep {
  opacity: 1; margin: 0; padding: var(--content-space) 0;
  border-top: 1px solid var(--surface-border); transform: none;
}
body[data-page="home"] .pstep:first-child { padding-top: 0; border-top: 0; }
body[data-page="home"] .pstep:last-child { padding-bottom: 0; }
body[data-page="home"] .ps-text { color: var(--body-copy-color); }
body[data-page="home"] .proto-cta { display: block; opacity: 1; transform: none; pointer-events: auto; margin-top: var(--content-space); }

/* Closing CTA keeps the approved copy, centered. The unchanged form is a
   native modal, shared by all homepage contact links. */
body[data-page="home"] .talk-panel {
  display: block; width: min(100%, 860px); margin: 0 auto; padding: 0;
  min-height: 0; background: none; border: 0; box-shadow: none;
}
body[data-page="home"] .talk-panel::before { display: none; }
body[data-page="home"] .talk-main { text-align: center; width: 100%; min-width: 0; }
body[data-page="home"] .talk-head { margin: 0 auto; text-align: center; }
body[data-page="home"] .talk-head .eye { justify-content: center; }
body[data-page="home"] .talk-copy { max-width: 64ch; margin: var(--heading-space) auto 0; }
body[data-page="home"] .talk-kicker { margin-top: var(--heading-space); }
body[data-page="home"] .consult-process {
  max-width: 60ch; margin: var(--content-space) auto 0; text-align: left;
}
body[data-page="home"] .talk-action { margin-top: var(--content-space); }
.home-consult-dialog {
  color: var(--text); background: #0b0e11; border: 1px solid var(--surface-border);
  width: min(720px, calc(100% - 32px)); max-width: none;
  max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  overflow: auto; overscroll-behavior: contain;
}
.home-consult-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
body.home-dialog-open { overflow: hidden; }
.home-consult-dialog .consult-form { padding: clamp(24px, 4vw, 40px); margin: 0; border: 0; min-width: 0; background: none; }
.home-consult-dialog .consult-form-head { padding-right: 22px; }
.home-consult-dialog .dialog-close {
  position: absolute; z-index: 2; top: 6px; right: 6px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; background: none; color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.home-consult-dialog .consult-fields { min-width: 0; }
.home-consult-dialog input, .home-consult-dialog select, .home-consult-dialog textarea { max-width: 100%; font-size: 16px; }
.consult-modal-dialog {
  transform: translateY(14px);
  transition: transform 720ms var(--surface-ease);
}
.home-consult-dialog[open] { animation: shared-panel-enter 720ms var(--surface-ease); }

@media (max-width: 1100px) {
  body[data-page="home"] .rs.rs-quote-led .divide,
  body[data-page="home"] .about-v3-body-grid { grid-template-columns: minmax(0, 1fr); gap: var(--content-space); }
  body[data-page="home"] .rs.rs-quote-led .rs-h1 { font-size: clamp(1.75rem, 5.5cqi, 3.2rem); }
  body[data-page="home"] .rs.rs-quote-led .big-num { font-size: var(--type-metric-hero) !important; }
  body[data-page="home"] .rs.rs-quote-led .rs-left-main { width: 100%; }
  body[data-page="home"] .about-b-stats { max-width: 760px; margin: 0 auto; }
}
@media (max-width: 900px) {
  body[data-page="home"] .pin-inner { grid-template-columns: minmax(0, 1fr); gap: var(--content-space); }
  body[data-page="home"] .proto-section { padding-block: var(--section-space) !important; }
  body[data-page="home"] .pstep:first-child { padding-top: var(--content-space); border-top: 1px solid var(--surface-border); }
}
@media (min-width: 901px) {
  body[data-page="seo"] .ranking-copy .section-title { font-size: var(--type-h2); }
  .ranking-layout > :is(.rank-panel, .geo-panel, .paid-panel) {
    margin-top: calc(var(--type-eyebrow) * 1.15 + var(--heading-space));
  }
}
@media (max-width: 720px) {
  :root { --content-space: var(--space-action); --heading-space: var(--space-heading); }
  body[data-page="home"] .rs.rs-quote-led .qbody { font-size: var(--type-quote) !important; }
  body[data-page="home"] .rs .qattr { font-size: .85rem; }
  body[data-page="home"] .rs.rs-quote-led .metric { min-height: 116px; padding: 18px 8px; }
  body[data-page="home"] .about-b-stats .stat-item { min-height: 132px; }
  body[data-page="home"] .cs-ribbon { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 0; }
  body[data-page="home"] .cs-metric { padding: 0 8px !important; border-top: 0 !important; border-left: 1px solid var(--surface-border); }
  body[data-page="home"] .cs-metric:first-child { padding-left: 0 !important; border-left: 0; }
  body[data-page="home"] .cs-value { font-size: var(--type-metric-box) !important; }
  body[data-page="home"] .cs-label { font-size: var(--type-metric-label); line-height: var(--leading-caption); }
  body[data-page="home"] .talk-h { font-size: var(--type-h2); }
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal-state="pending"] { opacity: 1 !important; }
  body[data-page="home"] :is(.why-card, .cs-card, .stat-item, .metric, .stat-n, .mval, .rs-stat, .rs-n),
  .hero-stat, .hero-stat strong, .include-card, .process-step { transition: none !important; }
  body[data-page="home"] :is(.why-card, .cs-card, .stat-n, .mval, .rs-stat, .rs-n):hover,
  .hero-stat:hover, .hero-stat:hover strong { transform: none !important; }
  body[data-page="home"] :is(.stat-item, .metric):hover :is(.stat-n, .mval),
  body[data-page="home"] .rs-stat:hover .rs-n { transform: none !important; }
  .gs .v-mid-content.panel-in, .gs .panel.active { animation: none !important; }
  .home-consult-dialog[open] { animation: none; }
  .consult-modal-dialog { transform: none; transition: none; }
}
