/**
 * Yinuo Signs — cinematic vertical scroll screens
 */
:root {
  --screen-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body.has-scroll-screens {
  background: #071525;
}

/* Top progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1100;
  background: transparent;
  pointer-events: none;
}
.scroll-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), #f0e2b8);
  box-shadow: 0 0 14px rgba(198, 164, 95, 0.6);
  transition: transform 0.08s linear;
}

/* Side rail */
.screen-rail {
  position: fixed;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-end;
}
.screen-rail button {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s var(--screen-ease);
}
.screen-rail.is-dark button { color: rgba(10, 30, 54, 0.32); }
.screen-rail button.active { color: #fff; }
.screen-rail.is-dark button.active { color: var(--navy); }
.screen-rail .dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  transform: rotate(45deg);
  border: 1px solid currentColor;
  background: transparent;
  transition: transform 0.35s var(--screen-ease), background 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.screen-rail button.active .dot {
  background: var(--gold);
  border-color: var(--gold);
  transform: rotate(45deg) scale(1.15);
  box-shadow: 0 0 0 4px rgba(198, 164, 95, 0.18);
}
.screen-rail .label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s, transform 0.3s var(--screen-ease);
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
.screen-rail.is-dark .label { text-shadow: none; }
.screen-rail button:hover .label,
.screen-rail button.active .label {
  opacity: 1;
  transform: none;
}

/* Full-viewport screens */
.scroll-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-margin-top: 0;
}
.scroll-screen.is-light {
  background:
    radial-gradient(1000px 500px at 110% -10%, rgba(198, 164, 95, 0.06), transparent 60%),
    var(--white);
  color: var(--ink);
}
.scroll-screen.is-paper {
  background:
    radial-gradient(900px 460px at 100% 0%, rgba(198, 164, 95, 0.08), transparent 55%),
    radial-gradient(800px 500px at -10% 100%, rgba(18, 57, 93, 0.05), transparent 60%),
    var(--paper);
  color: var(--ink);
}
.scroll-screen.is-navy {
  background:
    radial-gradient(1100px 700px at 88% -12%, rgba(198, 164, 95, 0.1), transparent 58%),
    radial-gradient(900px 600px at -8% 110%, rgba(27, 75, 116, 0.4), transparent 55%),
    linear-gradient(180deg, #0b2140, #081728);
  color: #fff;
}
.scroll-screen.is-deep {
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(198, 164, 95, 0.08), transparent 55%),
    linear-gradient(180deg, #081728, #060d18);
  color: #fff;
}

.scroll-screen .screen-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
  padding: calc(var(--nav-h) + 2rem) 0 3.5rem;
  position: relative;
  z-index: 2;
}

/* Layered motion targets */
.fx-up,
.fx-left,
.fx-right,
.fx-scale,
.fx-clip,
.fx-fade {
  opacity: 0;
  will-change: transform, opacity, clip-path, filter;
  transition:
    opacity 0.9s var(--screen-ease),
    transform 0.9s var(--screen-ease),
    clip-path 1s var(--screen-ease),
    filter 0.9s var(--screen-ease);
}
.fx-up { transform: translateY(64px); }
.fx-left { transform: translateX(-56px); }
.fx-right { transform: translateX(56px); }
.fx-scale { transform: scale(0.92); filter: blur(6px); }
.fx-clip { clip-path: inset(12% 12% 12% 12%); transform: scale(1.04); }
.fx-fade { transform: translateY(20px); }

.scroll-screen.is-active .fx-up,
.scroll-screen.is-active .fx-left,
.scroll-screen.is-active .fx-right,
.scroll-screen.is-active .fx-scale,
.scroll-screen.is-active .fx-clip,
.scroll-screen.is-active .fx-fade,
.fx-up.is-visible,
.fx-left.is-visible,
.fx-right.is-visible,
.fx-scale.is-visible,
.fx-clip.is-visible,
.fx-fade.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: inset(0 0 0 0);
}

.fx-delay-1 { transition-delay: 0.08s; }
.fx-delay-2 { transition-delay: 0.16s; }
.fx-delay-3 { transition-delay: 0.24s; }
.fx-delay-4 { transition-delay: 0.32s; }
.fx-delay-5 { transition-delay: 0.4s; }
.fx-delay-6 { transition-delay: 0.48s; }

/* Stagger children when parent is active */
.fx-stagger > * {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--screen-ease), transform 0.7s var(--screen-ease);
}
.scroll-screen.is-active .fx-stagger > *,
.fx-stagger.is-visible > * { opacity: 1; transform: none; }
.scroll-screen.is-active .fx-stagger > *:nth-child(1),
.fx-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.scroll-screen.is-active .fx-stagger > *:nth-child(2),
.fx-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.scroll-screen.is-active .fx-stagger > *:nth-child(3),
.fx-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.scroll-screen.is-active .fx-stagger > *:nth-child(4),
.fx-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.scroll-screen.is-active .fx-stagger > *:nth-child(5),
.fx-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
.scroll-screen.is-active .fx-stagger > *:nth-child(6),
.fx-stagger.is-visible > *:nth-child(6) { transition-delay: 0.4s; }

/* Hero as first screen */
.scroll-screen.hero {
  padding: 0;
  align-items: flex-end;
  color: #fff;
}
.scroll-screen.hero .hero-media {
  transform: scale(1.08);
  transition: transform 0.1s linear;
}
.scroll-screen.hero .screen-inner,
.scroll-screen.hero > .wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
  padding: calc(var(--nav-h) + 2rem) 0 4.5rem;
  position: relative;
  z-index: 2;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
  animation: cueDrift 2.4s var(--screen-ease) infinite;
}
.scroll-cue .line {
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent);
}
@keyframes cueDrift {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.65; }
  50% { transform: translate(-50%, 9px); opacity: 1; }
}

/* Floating ambient orbs */
.screen-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.15s linear;
}
.screen-orb.o1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 32% 32%, rgba(231, 211, 163, 0.6), rgba(198, 164, 95, 0.12) 70%);
  top: 10%;
  right: 7%;
}
.screen-orb.o2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 60% 40%, rgba(27, 75, 116, 0.75), rgba(18, 57, 93, 0.18) 72%);
  bottom: 4%;
  left: -5%;
}

/* Horizontal product strip inside a screen */
.screen-strip {
  display: flex;
  gap: 1.35rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.35rem 0.25rem 0.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(198, 164, 95, 0.5) transparent;
}
.screen-strip::-webkit-scrollbar { height: 4px; }
.screen-strip::-webkit-scrollbar-track { background: transparent; }
.screen-strip::-webkit-scrollbar-thumb {
  background: rgba(198, 164, 95, 0.45);
  border-radius: 999px;
}
.screen-strip .media-link {
  flex: 0 0 min(340px, 78vw);
  scroll-snap-align: start;
}

/* Dark screen text / surface overrides */
.scroll-screen.is-navy .section-head h2,
.scroll-screen.is-deep .section-head h2,
.scroll-screen.is-navy .display-xl,
.scroll-screen.is-deep .display-xl { color: #fff; }
.scroll-screen.is-navy .section-head p,
.scroll-screen.is-deep .section-head p,
.scroll-screen.is-navy .lede,
.scroll-screen.is-deep .lede { color: rgba(255, 252, 247, 0.7); }
.scroll-screen.is-navy .section-head h2::after,
.scroll-screen.is-deep .section-head h2::after,
.scroll-screen.is-navy .display-xl::after,
.scroll-screen.is-deep .display-xl::after { background: var(--gold-2); }

.scroll-screen.is-navy .value-grid,
.scroll-screen.is-deep .value-grid {
  border-top-color: rgba(231, 211, 163, 0.28);
}
.scroll-screen.is-navy .value-item,
.scroll-screen.is-deep .value-item {
  background: none;
  border-bottom-color: rgba(231, 211, 163, 0.18);
  color: rgba(255, 252, 247, 0.82);
}
.scroll-screen.is-navy .value-item:not(:nth-child(4n)),
.scroll-screen.is-deep .value-item:not(:nth-child(4n)) {
  border-right-color: rgba(231, 211, 163, 0.18);
}
.scroll-screen.is-navy .value-item strong,
.scroll-screen.is-deep .value-item strong {
  color: var(--gold-2);
}
.scroll-screen.is-navy .value-item p,
.scroll-screen.is-deep .value-item p {
  color: rgba(220, 230, 240, 0.78);
}

.scroll-screen.is-navy .btn-outline,
.scroll-screen.is-deep .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.scroll-screen.is-navy .btn-outline:hover,
.scroll-screen.is-deep .btn-outline:hover {
  background: #fff;
  color: var(--navy);
}

.scroll-screen.is-navy .media-link,
.scroll-screen.is-deep .media-link {
  background: var(--navy);
}
.scroll-screen.is-navy .field label,
.scroll-screen.is-deep .field label { color: rgba(255, 252, 247, 0.55); }

.scroll-screen.is-navy .field input,
.scroll-screen.is-navy .field select,
.scroll-screen.is-navy .field textarea,
.scroll-screen.is-deep .field input,
.scroll-screen.is-deep .field select,
.scroll-screen.is-deep .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 252, 247, 0.22);
  color: #fff;
  border-radius: 0;
}
.scroll-screen.is-navy .field input:focus,
.scroll-screen.is-navy .field select:focus,
.scroll-screen.is-navy .field textarea:focus,
.scroll-screen.is-deep .field input:focus,
.scroll-screen.is-deep .field select:focus,
.scroll-screen.is-deep .field textarea:focus {
  border-bottom-color: var(--gold-2);
  box-shadow: none;
}

.scroll-screen.is-paper .quote-frame,
.scroll-screen.is-light .quote-frame {
  background: var(--white);
}
@media (max-width: 720px) {
  .screen-rail .label { display: none; }
  .screen-rail { right: 0.7rem; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-up, .fx-left, .fx-right, .fx-scale, .fx-clip, .fx-fade,
  .fx-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .scroll-cue { animation: none; }
  html.snap-y { scroll-snap-type: none; }
}
