/* EventReps video hero. Sizes use container units (cqw), so the layout scales with the hero's width.
   Below 700px wide the hero switches to the phone layout: a 9:16 crop with captions in a lower band. */
.er-hero-wrap { container-type: inline-size; width: 100%; }
.er-hero { --display: "Manrope", sans-serif; --brand: #146FA3; --brand-light: #6FC7EE; --brand-ink: #17324A;
           /* One spacing scale for every scene and the final block: headline to support 0.75u, support to buttons 1.5u */
           --u: max(12px, 1.2cqw); --cta-h: max(42px, 3.6cqw); --cta-b: 4.5cqw; --cta-left: 5cqw;
           --cap-b: calc(var(--cta-b) + var(--cta-h) + 1.5 * var(--u));
           position: relative; aspect-ratio: 16 / 9; max-height: calc(100svh - var(--er-header, 0px)); width: 100%;
           background: #0b1420; overflow: hidden; color: #fff; font-family: "Nunito Sans", "Manrope", -apple-system, sans-serif; }
.er-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: 0; transition: opacity .3s linear; }
.er-hero video.on { opacity: 1; } /* two players take turns at the loop point (hero.js) */

/* The site header floats over the hero: no top padding, and a soft scrim keeps the white nav readable on every scene */
.er-hero-section { padding-top: 0 !important; }
.er-scrim { position: absolute; z-index: 1; inset: 0 0 auto 0; height: max(200px, 24cqw); pointer-events: none;
            /* eased stops, so the fade has no visible edge */
            background: linear-gradient(rgba(4,10,18,.56) 0%, rgba(4,10,18,.5) 14%, rgba(4,10,18,.4) 29%, rgba(4,10,18,.28) 45%,
                                        rgba(4,10,18,.16) 61%, rgba(4,10,18,.07) 77%, rgba(4,10,18,.02) 91%, rgba(4,10,18,0) 100%); }

/* Loading intro: the EventReps mark on deep navy, in the spirit of smoothnyc.com's loader. Fades once the video can play. */
.er-loader { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: #0b1420;
             transition: opacity .7s ease, visibility 0s linear .7s; }
.er-ready .er-loader { opacity: 0; visibility: hidden; pointer-events: none; }
.er-loader-mark { position: relative; width: clamp(150px, 16cqw, 230px); }
.er-loader-mark::before { content: ""; position: absolute; inset: -60% -35%; z-index: -1; border-radius: 50%;
                          background: radial-gradient(closest-side, rgba(42,159,216,.35), transparent); animation: er-glow 1.6s ease-in-out infinite alternate; }
.er-loader-mark img { display: block; width: 100%; height: auto; filter: brightness(0) invert(1);
                      animation: er-mark-in .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes er-mark-in { from { opacity: 0; transform: translateY(8px) scale(.94); filter: brightness(0) invert(1) blur(6px); } to { opacity: 1; transform: none; } }
@keyframes er-glow { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.05); } }

/* Two CTAs stay on screen for the whole loop, lower left; the final block carries its own pair in the same spot */
.er-ctas-main { position: absolute; z-index: 3; left: var(--cta-left); bottom: var(--cta-b);
                transition: opacity .6s ease, left 1.1s cubic-bezier(.2,.7,.2,1); } /* slides to share each caption's left edge */
/* Hidden until a scene headline is on screen; fades in just after it (Ken: buttons never appear before the headline) */
.er-hero:not(.er-cap-on) .er-ctas-main, .er-hero:not(.er-ready) .er-ctas-main, .er-final-on .er-ctas-main { opacity: 0; pointer-events: none; transition-delay: 0s; }
.er-hero.er-cap-on .er-ctas-main { transition-delay: 1.05s, 0s; } /* .55s headline delay + .5s */
.er-hero h1, .er-hero h2, .er-hero p { color: #fff; margin: 0; }

/* Scene captions: stage label, big line, supporting line. Each scene sets its own anchor and size in hero.js. */
.er-cap { position: absolute; z-index: 2; bottom: var(--cap-b); opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
/* Hand-off between scenes: the old headline fades out in .45s, the new one starts only after it is gone, so two never overlap */
.er-cap.on { opacity: 1; transform: none; transition: opacity 1s ease .55s, transform 1.2s cubic-bezier(.2,.7,.2,1) .55s; }
.er-cap::before { content: ""; position: absolute; inset: -30% -18%; z-index: -1; background: radial-gradient(closest-side, rgba(3,10,20,.5), transparent); }
.er-cap .line { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: .98; font-size: var(--size, 5.5cqw); text-shadow: 0 3px 24px rgba(0,0,0,.5); }
.er-cap .support { margin-top: calc(.75 * var(--u)); font-size: max(13px, 1.55cqw); font-weight: 600; line-height: 1.3; max-width: 34em; opacity: .95; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.er-hero .hl { color: var(--brand-light); }
.er-cta { text-shadow: none; }

/* Final frame: headline block in the lower band, below the crowd's faces */
.er-final { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 5cqw var(--cta-b); isolation: isolate;
            opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.er-final.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity 1.1s ease .55s, transform 1.2s cubic-bezier(.2,.7,.2,1) .55s; }
/* Readability without a shadow strip: a wide, very soft glow behind the text column only, plus text shadows */
.er-final::before { content: ""; position: absolute; z-index: -1; left: -8cqw; bottom: -12cqw; width: 78cqw; height: 52cqw; pointer-events: none;
                    background: radial-gradient(closest-side, rgba(3,10,20,.5), rgba(3,10,20,.22) 55%, transparent); }
.er-final h1, .er-final p, .er-final .eyebrow { text-shadow: 0 2px 18px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.35); }
.er-final .eyebrow { font-family: var(--display); font-size: max(11px, 1.2cqw); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--brand-light); margin: 0 0 calc(.75 * var(--u)); padding-top: 9cqw; }
.er-final h1 { font-family: var(--display); font-size: clamp(26px, 4.9cqw, 72px); line-height: .98; letter-spacing: -.03em; font-weight: 800; max-width: 66cqw; }
.er-final p { margin: calc(.75 * var(--u)) 0 calc(1.5 * var(--u)); font-size: max(13px, 1.5cqw); font-weight: 600; max-width: 56cqw; opacity: .92; line-height: 1.35; }
/* Buttons: same height and padding; primary in deep brand blue (white text 5.5:1), secondary solid white (ink text 13:1) */
.er-cta { display: inline-flex; align-items: center; box-sizing: border-box; height: var(--cta-h); padding: 0 max(18px, 1.8cqw);
          font-family: var(--display); font-size: max(14px, 1.2cqw); line-height: 1; font-weight: 800; border-radius: 999px;
          background: var(--brand); color: #fff !important; text-decoration: none !important; white-space: nowrap; transition: background .2s; }
.er-cta:hover { background: #0F5A86; }
.er-cta:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.er-ctas { display: flex; flex-wrap: wrap; gap: calc(.75 * var(--u)); }
.er-cta-2 { background: #fff; color: var(--brand-ink) !important; }
.er-cta-2:hover { background: #E3F1FA; }

/* Phone layout */
@container (max-width: 700px) {
  .er-hero { aspect-ratio: 9 / 16; /* still capped to the first screen, so captions and CTAs stay in view */
             --u: 3.2cqw; --cta-h: 11.5cqw; --cta-b: 21cqw; /* buttons stack above the site chat bubble */
             --cap-b: calc(var(--cta-b) + 2 * var(--cta-h) + 2.25 * var(--u)); }
  .er-hero video { object-position: var(--focus-x, 50%) 50%; transition: object-position .8s; }
  .er-cap { left: 6cqw !important; right: 6cqw !important; top: auto !important; max-width: none !important; }
  .er-ctas-main { left: 6cqw !important; right: 6cqw; }
  .er-ctas { flex-direction: column; align-items: flex-start; }
  .er-cap .line { font-size: 10cqw; }
  .er-cap .support { font-size: 4cqw; }
  .er-final { padding: 0 6cqw var(--cta-b); }
  .er-final::before { left: -20cqw; width: 140cqw; height: 130cqw; bottom: -20cqw; }
  .er-final .eyebrow { font-size: 3cqw; padding-top: 22cqw; }
  .er-final h1 { font-size: 8.6cqw; max-width: none; }
  .er-final p { font-size: 3.7cqw; max-width: none; }
  .er-cta { font-size: 4cqw; padding: 0 5cqw; }
}

/* Pause / play: top right, clear of every caption anchor and the site chat bubble */
.er-pause { position: absolute; z-index: 3; top: calc(var(--er-hdr-h, 85px) + 14px); right: 2.2cqw; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45);
            background: rgba(5,12,22,.45); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .2s; }
.er-pause:hover { background: rgba(5,12,22,.7); }
.er-pause:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.er-pause svg { width: 18px; height: 18px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) { .er-cap, .er-final { transition: opacity .3s; transform: none; }
  .er-loader-mark img, .er-loader-mark::before { animation: none; } }

/* Demo-only Desktop / Mobile switch, tucked into the announcement bar so it never covers captions. Hidden on real phones and inside the mobile frame. */
.er-demo-switch { position: fixed; left: 10px; top: 5px; z-index: 100000; display: flex; gap: 2px; padding: 3px; border-radius: 999px;
                  background: rgba(23,50,74,.92); box-shadow: 0 2px 10px rgba(0,0,0,.2); font: 700 11px/1 "Manrope", sans-serif; }
.er-demo-switch button { border: 0; border-radius: 999px; padding: 5px 11px; background: transparent; color: #cfe6f5; cursor: pointer; font: inherit; }
.er-demo-switch button.on { background: #2A9FD8; color: #fff; }
.er-demo-switch.hidden { display: none; }
@media (max-width: 800px) { .er-demo-switch { display: none; } }
.er-phone-stage { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: #0d1622; }
.er-phone-stage.on { display: flex; }
.er-phone-stage iframe { width: 390px; height: min(844px, calc(100vh - 40px)); border: 0; border-radius: 36px; background: #fff;
                          box-shadow: 0 0 0 10px #1c2836, 0 20px 60px rgba(0,0,0,.5); }
html.er-phone-open { overflow: hidden; }

/* Site header over the hero: white logo and nav on the scrim. Normal styling returns once the hero scrolls away
   or the mobile menu opens. Text shadow keeps AA contrast on bright frames. */
html.er-hdr-over body:not(.header--menu-open) #header .header-title-logo img { filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(0,0,0,.35)); }
html.er-hdr-over body:not(.header--menu-open) #header .header-nav-item > a,
html.er-hdr-over body:not(.header--menu-open) #header .header-nav-folder-title,
html.er-hdr-over body:not(.header--menu-open) #header .header-title-text a,
html.er-hdr-over body:not(.header--menu-open) #header .header-burger-btn { color: #fff !important; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
html.er-hdr-over body:not(.header--menu-open) #header .burger-inner > div { background-color: #fff !important; }
html.er-hdr-over body:not(.header--menu-open) #header .header-nav-item--active > a { background-image: linear-gradient(#fff, #fff) !important; }
#header .header-title-logo img, #header .header-nav-item > a { transition: color .3s, filter .3s; }
html.er-hdr-over body:not(.header--menu-open) #header .header-background-solid { opacity: 0 !important; }
#header .header-background-solid { transition: opacity .3s; }
html.er-hdr-over body:not(.header--menu-open) #header .header-dropshadow { box-shadow: none !important; } /* its shadow ended in a hard seam below the nav */
/* Final block: its buttons follow its headline too */
.er-final .er-ctas { opacity: 0; transition: opacity .8s ease 0s; }
.er-final.on .er-ctas { opacity: 1; transition-delay: 1.05s; }

/* Production: the hero sits in a Squarespace Code Block inside the homepage's first section. Strip that section's
   padding, grid, background and divider so the hero runs edge to edge exactly as in the demo. */
.page-section:has(#er-hero) { padding: 0 !important; min-height: 0 !important; }
.page-section:has(#er-hero) > .content-wrapper { padding: 0 !important; margin: 0 !important; max-width: none !important; width: 100% !important; }
.page-section:has(#er-hero) .fluid-engine { display: block !important; }
.page-section:has(#er-hero) .fe-block, .page-section:has(#er-hero) .sqs-block, .page-section:has(#er-hero) .sqs-block-content { padding: 0 !important; margin: 0 !important; }
.page-section:has(#er-hero) .section-background, .page-section:has(#er-hero) .section-divider-display { display: none !important; }

/* Homepage only: the site-wide Book Demo button (Squarespace footer injection) waits for the hero buttons,
   fading in on the same 1.05s delay after the first headline, then stays. er-hero-page and er-book-ready come
   from hero.js, so if the hero script never runs, Book Demo shows as on every other page. */
html.er-hero-page:not(.er-book-ready) .er-book-demo { animation: none !important; opacity: 0; pointer-events: none; }
html.er-hero-page.er-book-ready .er-book-demo { animation: erBookDemoIn .4s ease 1.05s both; }
@media (prefers-reduced-motion: reduce) { html.er-hero-page.er-book-ready .er-book-demo { animation: none; opacity: 1; transform: none; } }
