/* ═══════════ DY SYSTEMS final — palette warm-up + film hero ═══════════ */

/* Aalto Display — licensed display face for all headline type */
@font-face {
  font-family: 'Aalto Display';
  src: url('/assets/fonts/Aalto-Display.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 1. colour remap: rainbow → amber family (everything else inherits) */
:root {
  --acid: #ffab2e;
  --mint: #8be87f;
  --coral: #ff8a4a;
  --aqua: #ffd08a;
  --berry: #ffab2e;
}

/* scroll progress rail in the new accents */
.scroll-progress span {
  background: linear-gradient(180deg, #ffab2e, #8be87f);
  box-shadow: 0 0 24px rgba(255, 171, 46, 0.3);
}

/* new logo mark in the header */
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: lighten;
}

/* ═══════════ the film hero (scoped, self-contained) ═══════════ */
.film { height: 1160vh; position: relative; }
.film-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #0b0c08; }
.zoom-wrap { position: absolute; inset: 0; will-change: transform; }
.screen-overlay {
  position: absolute; z-index: 4; overflow: hidden; background: #0b0c08;
  opacity: 0; pointer-events: none;
}
.screen-overlay .screen-site { position: absolute; top: 0; left: 50%; transform-origin: top center; }
.screen-overlay.locked { position: fixed !important; left: 0 !important; top: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 70; }
#film { position: absolute; inset: 0; width: 100%; height: 100%; }

.film-loader {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 14px;
  background: #0b0c08; z-index: 9; transition: opacity .6s;
}
.film-loader.done { opacity: 0; pointer-events: none; }
.loader-mark { font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 900; font-size: 40px; text-align: center; color: #ffab2e; }
.loader-bar { width: 180px; height: 2px; background: rgba(247,241,227,.16); overflow: hidden; border-radius: 99px; }
.loader-bar span { display: block; height: 100%; width: 0%; background: #ffab2e; }
.loader-pct { text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .2em; color: #9d947f; }

.film .beat {
  position: absolute; z-index: 5; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  max-width: 640px; padding: 42px 54px; text-align: center;
  opacity: 0; visibility: hidden;
  background: rgba(11, 12, 8, .52);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(242, 239, 227, .14); border-radius: 22px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .75);
}
.film .beat h1 { font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 840; letter-spacing: -.015em; line-height: 1.02; font-size: clamp(40px, 7vw, 96px); margin: 18px 0 20px; color: #f2efe3; }
.film .beat h1 em { font-style: normal; color: #ffab2e; }
.film .beat h2 { font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 840; letter-spacing: -.015em; line-height: 1.05; font-size: clamp(30px, 4.6vw, 58px); margin: 0 0 14px; color: #f2efe3; }
.film .beat .accent { color: #ffab2e; }
.film .beat p { color: #e8e4d6; font-size: clamp(15px, 1.4vw, 18px); margin: 0 auto; max-width: 540px; }
.film .beat-hero { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: none; padding: 0 20px; max-width: none; }
.film .hero-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .28em; color: #ffab2e; text-transform: uppercase; margin-bottom: 10px; }
.film .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.film .fbtn {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 15px 28px; font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform .25s;
}
.film .fbtn:hover { transform: translateY(-2px); }
.film .fbtn.primary { background: #ffab2e; color: #0b0c08; }
.film .fbtn.secondary { background: rgba(11,12,8,.6); border: 1px solid rgba(242,239,227,.35); color: #f2efe3; }

.film-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38vh; opacity: 0;
  background: linear-gradient(transparent, #10110d); pointer-events: none;
}

/* HUD chapter readout */
.hud {
  position: fixed; left: clamp(20px, 4vw, 48px); bottom: 26px; z-index: 55;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .14em; color: #9d947f;
  display: flex; align-items: center; gap: 14px; opacity: 0; transition: opacity .5s;
  pointer-events: none;
}
.hud.is-on { opacity: 1; }
.hud .hud-bar { width: 120px; height: 2px; background: rgba(247,241,227,.16); position: relative; overflow: hidden; }
.hud .hud-bar span { position: absolute; inset: 0; background: #ffab2e; transform-origin: left; transform: scaleX(0); }
.hud .hud-ch { color: #ffab2e; }

/* grain + vignette over the film (fade out at seam) */
.film-grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}
.film-vignette {
  position: fixed; inset: 0; z-index: 49; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .5));
}

@media (prefers-reduced-motion: reduce) {
  .film { height: auto; }
  .film-stage { position: static; height: auto; padding: 120px 0 40px; }
  #film { position: static; aspect-ratio: 16/9; height: auto; }
  .film .beat { position: relative; left: auto; top: auto; transform: none; opacity: 1; visibility: visible; margin: 30px auto; }
  .film-loader, .film-grain, .film-vignette, .hud { display: none; }
}

/* custom-select dropdown: scrollable + readable in narrow fields */
.custom-select-options {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.custom-select-option {
  font-weight: 620;
  font-size: 0.92rem;
  line-height: 1.3;
  min-height: 2.4rem;
}

/* audit-console selects: open upward (carousel viewport clips downward) and widen */
.ai-input-panel .custom-select-options {
  top: auto;
  bottom: calc(100% + 0.38rem);
  transform-origin: bottom;
  min-width: 19rem;
  max-height: 19rem;
}


/* beat panels: explicit width (kills the 50% shrink-to-fit pill on mobile) */
.film .beat { width: min(92vw, 640px); }
@media (max-width: 640px) {
  .film .beat { padding: 26px 20px; border-radius: 18px; }
  .film .beat p { font-size: 14.5px; }
  .film .fbtn { padding: 12px 20px; font-size: 14px; white-space: nowrap; }
  .film .hero-actions { gap: 10px; }
}

/* retire the legacy rainbow bar under the new logo mark */
.brand-mark::after { content: none !important; }

/* AI tool carousel: slides own their height (no giant gap under short slides) */
.ai-tool-track { align-items: flex-start; }
.ai-tool-viewport { transition: height 320ms ease; }

/* mobile inception curtain: fullscreen overlay outside the zoom transform */
.screen-overlay.mobile-curtain {
  position: absolute;
  inset: 0 !important;
  left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 6;
}

/* mobile: hero beat gets the glass treatment (text sits on the monitor glow) */
@media (max-width: 700px) {
  .film .beat-hero {
    background: rgba(11, 12, 8, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(242, 239, 227, 0.12);
    border-radius: 20px;
    padding: 28px 18px;
  }
}

/* ═══════════ Aalto Display typography pass (must stay last: overrides the rules above) ═══ */
/* single-weight face: normalize weight/stretch so nothing synthesizes a faux bold */
.film .beat h1, .film .beat h2, .loader-mark,
.section-heading h2, .proof-copy h2, .contact-section h2,
.ticker span, .brand-lockup strong {
  font-family: 'Aalto Display', 'Archivo', sans-serif;
  font-weight: 400;
  font-synthesis: none;
  font-stretch: 100%;
  text-transform: uppercase;
}
.film .beat h1 { letter-spacing: .015em; line-height: .94; font-size: clamp(46px, 8.6vw, 128px); }
.film .beat h2 { letter-spacing: .015em; line-height: .98; font-size: clamp(34px, 5.4vw, 72px); }
.film .beat { width: min(92vw, 720px); }
.section-heading h2, .proof-copy h2, .contact-section h2 { letter-spacing: .01em; line-height: .92; }
.ticker span { letter-spacing: .04em; }
.brand-lockup strong { letter-spacing: .06em; }
