/* Refinements layer for the main page. Loaded last, so it only overrides.
   It does not change the layout. It fixes readability, touch targets, contrast and
   spacing rhythm so the page meets WCAG 2.2 AA and one consistent scale.
   Spacing scale: 4 8 12 16 24 32 48 64 96. Minimum text size: 12px. */

/* 1. Header stays in place while scrolling, so "Book a meeting" is always reachable. */
#app .homepage-header.atf-minimal-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(9, 9, 11, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
html { scroll-padding-top: 96px; }

/* 2. No text below 12px. */
#app .event-date,
#app .venue-line,
#app .booking-note,
#app .booking-note a,
#app .meeting-card .booking-note,
#app .meeting-lead-form .booking-note,
#app .meeting-lead-form .booking-note a,
#app .hero-motion-toggle,
#app .client-logo small,
#app .work-tags span,
#app .source-index,
#app .source-watch,
#app .workflow-document p,
#app .workflow-document span,
#app .workflow-settings span,
#app .workflow-phase,
#app .workflow-language-tag,
#app .workflow-source > span,
#app .workflow-episodes span,
#app .workflow-before span,
#app .workflow-composite span,
#app .workflow-development span,
#app .expand-steps div,
#app .expand-steps b,
#app .expand-number,
#app .arc-result p,
#app .arc-proof dt,
#app .arc-proof dd span,
#app dt { font-size: 12px; }

/* 3. Buttons: solid Manto primary (#423BE5) with white text, 6.7:1. */
#app .btn.nav-login,
#app .atf-minimal-header .btn.nav-login,
#app .meeting-card .btn,
#app .standard-form .btn,
#app .expand-body .btn,
#app .license-section .btn:not(.secondary):not(.secondary-cta),
#app .outro-banner .btn:not(.secondary):not(.secondary-cta) {
  background-color: #423be5; background-image: none; border-color: #423be5; color: #fff;
}
#app .btn.nav-login:hover,
#app .meeting-card .btn:hover,
#app .standard-form .btn:hover,
#app .expand-body .btn:hover,
#app .license-section .btn:not(.secondary):not(.secondary-cta):hover,
#app .outro-banner .btn:not(.secondary):not(.secondary-cta):hover { background-color: #5750ea; border-color: #5750ea; }

/* 4. Keyboard focus is always visible. */
#app a:focus-visible,
#app button:focus-visible,
#app input:focus-visible,
#app select:focus-visible,
#app textarea:focus-visible,
#app summary:focus-visible,
#app [tabindex]:focus-visible { outline: 2px solid #9191ee; outline-offset: 3px; }

/* 5. Touch targets: 44px for controls, never less than 24px for text links. */
#app .home-brand { min-height: 44px; display: inline-flex; align-items: center; }
/* Background-video pause control: a small, quiet icon. 28px keeps it above the 24px minimum target. */
#app .hero-backdrop .hero-motion-toggle { width: 28px; height: 28px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 999px; border: 1px solid rgba(250, 250, 250, .22); background: rgba(9, 9, 11, .45); color: #fafafa; opacity: .6; transition: opacity .2s; }
#app .hero-backdrop .hero-motion-toggle:hover, #app .hero-backdrop .hero-motion-toggle:focus-visible { opacity: 1; }
#app .homepage-footer a { min-height: 32px; display: inline-flex; align-items: center; }
#app .homepage-footer .footer-brand ul a { min-width: 44px; min-height: 44px; justify-content: center; }
#app .source-watch { min-height: 32px; display: inline-flex; align-items: center; }

/* 6. Section headings share one size per breakpoint. */
#app #benchmark h2,
#app #production-contact h2,
#app #questions h2,
#app .outro-banner h2,
#app #capabilities .expand-heading h2 { font-size: 34px; line-height: 1.12; }

/* 7. Vertical rhythm: 48px between sections on phones. */
#app #work { padding-top: 48px; padding-bottom: 48px; }
#app #production-contact { padding-top: 48px; padding-bottom: 48px; }
#app #questions { padding-top: 0; padding-bottom: 48px; }

/* Phones: header buttons are full touch size and readable. */
@media (max-width: 719px) {
  #app .atf-minimal-header .btn { min-height: 44px; height: 44px; font-size: 13px; padding-inline: 14px; }
  #app .atf-minimal-header .home-actions { gap: 8px; }
}

/* Tablet: 64px between sections. */
@media (min-width: 720px) {
  #app #work { padding-top: 64px; padding-bottom: 64px; }
  #app #production-contact { padding-top: 64px; padding-bottom: 64px; }
  #app #questions { padding-bottom: 64px; }
  #app #benchmark h2,
  #app #production-contact h2,
  #app #questions h2,
  #app .outro-banner h2,
  #app #capabilities .expand-heading h2 { font-size: 40px; }
}

/* Desktop: 96px between sections, 48px section headings. */
@media (min-width: 1101px) {
  #app #work { padding-top: 96px; padding-bottom: 96px; }
  #app #production-contact { padding-top: 96px; padding-bottom: 96px; }
  #app #questions { padding-bottom: 96px; }
  #app #benchmark h2,
  #app #production-contact h2,
  #app #questions h2,
  #app .outro-banner h2,
  #app #capabilities .expand-heading h2 { font-size: 48px; }
}

/* Respect the reduced-motion setting. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #app *, #app *::before, #app *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* This caption is set small by a more specific rule elsewhere, so it is forced here. */
#app .booking-note, #app .booking-note a { font-size: 12px !important; }

/* Score card sits on the accent colour, so its text is the brand background colour (7.1:1). */
#app .arc-result, #app .arc-result span, #app .arc-result strong, #app .arc-result p { color: #09090b; }

/* One primary button per view: the secondary header link is outlined on every page. */
#app .homepage-header .btn.home-demo { background: transparent; background-image: none; border: 1px solid #2a2a31; color: #fafafa; }
#app .homepage-header .btn.home-demo:hover { border-color: #9191ee; background: rgba(145, 145, 238, .08); }

/* Hero: the header sits on top of the background video and is see-through until the page scrolls.
   A soft dark fade behind it keeps the logo and buttons readable on bright frames. */
#app:has(.hero-backdrop) .homepage-header.atf-minimal-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: linear-gradient(rgba(9, 9, 11, .62), rgba(9, 9, 11, 0));
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background-color .25s ease;
}
#app:has(.hero-backdrop) .homepage-header.atf-minimal-header.is-solid {
  background: rgba(9, 9, 11, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
#app .hero-backdrop { padding-top: var(--hdr, 72px); }

/* Logo strip: one compact row, logos at a shared height with even gaps. */
#app .client-strip { padding-top: 20px; padding-bottom: 20px; }
#app .client-logo-group { gap: 56px; padding-right: 56px; }
#app .client-logo { width: auto; height: 32px; gap: 8px; opacity: .88; }
#app .client-logo img { max-height: 24px; max-width: 120px; }
#app .client-logo.color img { max-height: 32px; }
#app .client-logo.app img { width: 26px; height: 26px; border-radius: 6px; }
#app .client-logo small { position: static; white-space: nowrap; color: #b4b4bb; }
@media (max-width: 719px) {
  #app .client-strip { padding-top: 16px; padding-bottom: 16px; }
  #app .client-logo-group { gap: 40px; padding-right: 40px; }
}

/* Breathing space: sections that sat flush against their neighbours get the same
   rhythm as the rest (48 phone / 64 tablet / 96 desktop between blocks). */
#app #licensing { padding-top: 24px; padding-bottom: 24px; }
#app #benchmark { padding-top: 16px; padding-bottom: 32px; }
#app #capabilities { padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 720px) {
  #app #licensing { padding-top: 32px; padding-bottom: 32px; }
  #app #benchmark { padding-top: 24px; padding-bottom: 48px; }
  #app #capabilities { padding-top: 64px; padding-bottom: 64px; }
}
@media (min-width: 1101px) {
  #app #licensing { padding-top: 48px; padding-bottom: 48px; }
  #app #benchmark { padding-top: 32px; padding-bottom: 64px; }
  /* The use-case deck is pinned to the screen on desktop, so its own padding stays as it is. */
  #app #capabilities { padding-top: 24px; padding-bottom: 24px; }
  #app .outro-banner { padding-top: 96px; padding-bottom: 96px; }
}

/* Video library: the blue glow sits behind the film wall on the left and fades out before
   the text, so the copy is on a flat dark surface and stays easy to read. */
#app .license-section {
  background-color: #0e0e11;
  background-image: radial-gradient(58% 78% at 24% 100%, rgba(66, 59, 229, .42) 0%, rgba(66, 59, 229, .14) 45%, rgba(66, 59, 229, 0) 72%);
}
#app .license-section::before, #app .license-section::after { display: none; }
@media (max-width: 1000px) {
  #app .license-section { background-image: radial-gradient(90% 46% at 50% 0%, rgba(66, 59, 229, .34) 0%, rgba(66, 59, 229, 0) 72%); }
}

/* Hero booking form: see-through glass over the video (from Ayesha's layout). The fields keep
   their solid fill, so what you type stays easy to read. */
#app .hero-backdrop .standard-form {
  background: rgba(26, 26, 31, .42);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-color: rgba(250, 250, 250, .14);
}

/* Phones: the full logo needs the room, so the header keeps only the primary button. */
@media (max-width: 479px) { #app .homepage-header .btn.home-demo { display: none; } }
