/* ============================================= */
/* Fonts — self-hosted, not loaded from Google's CDN */
/* ============================================= */
/* Serving fonts directly from fonts.googleapis.com/fonts.gstatic.com sends
   every visitor's IP address to Google on every page load without consent,
   which a German court (LG München, Jan 2022) held violates GDPR. Since
   this site operates in the EU, both files are bundled here instead —
   zero third-party requests for typography. Each family below is a single
   variable-font file (Google serves the same file for every weight in the
   latin subset); only latin is needed since all page copy is English. */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/sora-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/manrope-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================= */
/* Tokens */
/* ============================================= */

:root {
  --bg: #010305; /* sampled dynamically from frame 1 top pixel via JS; this is the fallback */
  --ink: #f4f3ef;
  --ink-dim: rgba(244,243,239,0.6);

  /* LARC brand palette — from Branding-guidelines_LARC.ai v1.0 */
  --laser-green: #76f0b1;     /* primary — use whenever possible */
  --medium-green: #00d196;
  --dark-green: #00b57f;
  --light-green: #ccece5;
  --dark-blue: #11154f;       /* logo on white/light backgrounds */
  --medium-blue: #dae0f1;
  --light-blue: #f4f5fa;

  --accent: var(--laser-green);
  --rail-track: rgba(244,243,239,0.12);

  /* Sofia Pro is the brand typeface but isn't a web-licensed font here;
     Sora is the closest free geometric-rounded match for headings,
     Manrope covers body/UI text. Swap in Sofia Pro's actual font-files
     in the WP version if a license is available. */
  --font-display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Scoped to this plugin's own wrapper, not html/body — the page renders
   inside the active theme's real get_header()/get_footer(), so the dark
   hero background/light text must not leak into the theme's own chrome. */
.larc-launch-page {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

.progress-rail {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  background: var(--rail-track);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.05s linear;
}

/* ============================================= */
/* Logo intro — sits over frame 1 at the top of the pinned stage */
/* ============================================= */
.logo-intro {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.15s linear, transform 0.15s linear;
}
.logo-intro-asset {
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  animation: logoIntroIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
.logo-intro-img {
  width: clamp(320px, 38vw, 560px);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.55)) drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}
@keyframes logoIntroIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.scroll-hint {
  position: absolute;
  bottom: 7vh;
  width: 1px;
  height: 50px;
  background: var(--rail-track);
  opacity: 0;
  animation: hintIn 0.6s ease 1.1s forwards;
}
@keyframes hintIn { to { opacity: 1; } }
.scroll-hint span {
  display: block;
  width: 1px;
  height: 16px;
  background: var(--ink);
  animation: scrollDown 1.6s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(34px); opacity: 0; }
}

/* ============================================= */
/* Scroll-video wrapper + pinned stage */
/* ============================================= */
.scroll-wrapper {
  position: relative;
  width: 100%;
}
.pinned-stage {
  position: sticky;
  /* --larc-header-offset is measured at runtime from the active theme's
     fixed/sticky header (and the WP admin bar, if showing) — see
     scroll-engine.js. Themes with a normal (non-fixed) header leave it
     at 0px, so this is unchanged from a plain "top: 0; height: 100vh". */
  top: var(--larc-header-offset, 0px);
  height: calc(100vh - var(--larc-header-offset, 0px));
  width: 100%;
  overflow: hidden;
  background: #000;
}

/* Layer 1 — canvas */
#frameCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Loading veil */
.load-veil {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: opacity 0.4s ease;
}
.load-veil.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.load-bar {
  width: 200px;
  height: 2px;
  background: var(--rail-track);
}
.load-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}
#loadLabel {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* Layer 2 — content overlay */
.content-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.callout {
  position: absolute;
  left: 7vw;
  bottom: 14vh;
  max-width: 480px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.callout--right {
  left: auto;
  right: 7vw;
  bottom: auto;
  top: 18vh;
  text-align: right;
}
.callout--center {
  left: 50%;
  bottom: 12vh;
  transform: translate(-50%, 24px);
  text-align: center;
}
.callout.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.callout--center.is-visible {
  transform: translate(-50%, 0);
}
.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  font-family: var(--font-display);
}
.callout h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 8px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.callout--center h2 {
  font-size: clamp(40px, 7vw, 80px);
}
.callout p {
  color: var(--ink-dim);
  margin: 0;
  font-size: 16px;
}

/* ============================================= */
/* After section */
/* ============================================= */
.after-section {
  min-height: 100vh;
  padding: 14vh 7vw;
}
.after-section h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  margin-top: 0;
}
.after-section p {
  color: var(--ink-dim);
  max-width: 560px;
}

/* ============================================= */
/* Mobile fallback adjustments */
/* ============================================= */
@media (max-width: 640px) {
  .scroll-wrapper { height: 350vh !important; }
  .callout { left: 6vw; right: 6vw; max-width: none; bottom: 10vh; }
  .callout--right { left: 6vw; text-align: left; top: auto; bottom: 10vh; }
}
