/* GEEPOWR globals: keyframes and document-level rules only. Class styling lives in records. */
html { scroll-padding-block-start: calc(var(--space-xxl) * 1.2); }

/* Section rhythm: two plain sections share one section step (ACSS pads every section top and
   bottom, so plain neighbours would stack to two). Painted bands carry data-band and keep their
   padding. */
main section:not([data-band]) + section:not([data-band]) { padding-block-start: 0; }

/* EQ bars animate scale (compositor-only), not height, so they never keep the main thread busy. */
@keyframes gp-eq { from { scale: 1 0.06; } to { scale: 1 var(--h, 0.6); } }
@keyframes gp-marquee { to { transform: translateX(-50%); } }
@keyframes gp-spin { to { rotate: 1turn; } }
@keyframes gp-pulse { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 0.7; opacity: 0.6; } }

/* Cookie banner theme (vanilla-cookieconsent), third-party DOM with no Etch block. */
#cc-main#cc-main {
  --cc-font-family: var(--text-font-family);
  --cc-modal-border-radius: var(--radius);
  --cc-btn-border-radius: var(--radius);
  --cc-bg: var(--base-ultra-dark);
  --cc-primary-color: var(--text-light);
  --cc-secondary-color: var(--text-light-muted);
  --cc-btn-primary-bg: var(--primary);
  --cc-btn-primary-color: var(--primary-ultra-dark);
  --cc-btn-primary-border-color: var(--primary);
  --cc-btn-primary-hover-bg: var(--primary-hover);
  --cc-btn-primary-hover-color: var(--primary-ultra-dark);
  --cc-btn-primary-hover-border-color: var(--primary-hover);
  --cc-btn-secondary-bg: var(--base-dark);
  --cc-btn-secondary-color: var(--text-light);
  --cc-btn-secondary-border-color: var(--base-semi-dark);
  --cc-btn-secondary-hover-bg: var(--base-semi-dark);
  --cc-btn-secondary-hover-color: var(--text-light);
  --cc-btn-secondary-hover-border-color: var(--primary);
  --cc-separator-border-color: var(--base-semi-dark);
  --cc-toggle-on-bg: var(--primary);
  --cc-toggle-off-bg: var(--base-semi-dark);
  --cc-toggle-on-knob-bg: var(--primary-ultra-dark);
  --cc-toggle-off-knob-bg: var(--text-light);
  --cc-toggle-readonly-bg: var(--base-dark);
  --cc-toggle-readonly-knob-bg: var(--text-light-muted);
  --cc-cookie-category-block-bg: var(--base-dark);
  --cc-cookie-category-block-border: var(--base-semi-dark);
  --cc-cookie-category-block-hover-bg: var(--base-dark);
  --cc-cookie-category-block-hover-border: var(--base-semi-dark);
  --cc-overlay-bg: color-mix(in oklch, var(--black) 70%, transparent);
  --cc-link-color: var(--primary);
}
#cc-main .cm__title, #cc-main .pm__title { font-family: var(--heading-font-family); font-weight: 400; letter-spacing: 0.02em; text-transform: uppercase; }

/* Motion (site_motion.py). Entrances only; hover states stay in their records. */
:root { --gp-ease: cubic-bezier(0.2, 0.7, 0.1, 1); }
@keyframes gp-rise { from { opacity: 0; translate: 0 var(--space-m); } }
@keyframes gp-fade { from { opacity: 0.01; } }  /* not 0: a fully transparent image doesn't count as painted for LCP */
@keyframes gp-settle { from { scale: 1.12; } }
@keyframes gp-slide { from { opacity: 0; translate: 0 0.35em; } }
@media (prefers-reduced-motion: no-preference) {
  [data-reveal="pending"] { opacity: 0; }
  [data-reveal="in"] { animation: gp-rise 0.9s var(--gp-ease) backwards; animation-delay: calc(var(--reveal-i, 0) * 90ms); }
  [data-reveal="in"] img[data-settle] { animation: gp-settle 1.6s var(--gp-ease) backwards; animation-delay: calc(var(--reveal-i, 0) * 90ms); }
  [data-reveal="in"] .accent { animation: gp-slide 0.9s var(--gp-ease) backwards; animation-delay: calc(var(--reveal-i, 0) * 90ms + 220ms); }

  /* Hero load-in: every page's first section eases in once, in reading order: text first, then the photo. Service pages nest
     their sections in the Service Page component's div. */
  :is(main > section:first-child, main > .service-page > section:first-child) :is(.eyebrow, .hero__line, [class$="__lede"], .hero__actions, .hero__stats, .stat-strip, .about-hero__caption, .legal__meta, .legal__title, .thanks__title, .thanks__check) {
    animation: gp-rise 1s var(--gp-ease) backwards;
    animation-delay: var(--in, 0ms);
  }
  :is(main > section:first-child, main > .service-page > section:first-child) .hero__line:nth-child(1) { --in: 80ms; }
  :is(main > section:first-child, main > .service-page > section:first-child) .hero__line:nth-child(2) { --in: 160ms; }
  :is(main > section:first-child, main > .service-page > section:first-child) .hero__line:nth-child(3) { --in: 240ms; }
  :is(main > section:first-child, main > .service-page > section:first-child) [class$="__lede"] { --in: 340ms; }
  :is(main > section:first-child, main > .service-page > section:first-child) .hero__actions { --in: 440ms; }
  :is(main > section:first-child, main > .service-page > section:first-child) :is(.hero__stats, .stat-strip, .about-hero__caption) { --in: 540ms; }
  :is(main > section:first-child, main > .service-page > section:first-child) :is(.hero__visual, .portrait, .sp-hero__media) { animation: gp-fade 1.4s var(--gp-ease) 600ms backwards; }
  :is(main > section:first-child, main > .service-page > section:first-child) :is(.hero__photo, .sp-hero__photo) { animation: gp-settle 2s var(--gp-ease) 600ms backwards; }
}
