/* ============================================================
   PCL · Productos de Caucho y Lona — Cinematic scroll film
   Coal-dark → Industrial-yellow, synced to the film's own morph
   ============================================================ */

:root {
  --coal: #0b0b0c;
  --charcoal: #17171a;
  --steel: #7c8085;
  --steel-dim: #4a4d51;
  --amber: #e0863b;
  --yellow: #ffd400;
  --yellow-deep: #e5be00;
  --warm-white: #f2f0ec;
  --ink: #0b0b0c;

  --font-display: "Anton", sans-serif;
  --font-head: "Archivo", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "Space Mono", monospace;

  /* live world colors — flipped by JS via body.world-yellow */
  --page-bg: var(--coal);
  --fg: var(--warm-white);
  --fg-dim: var(--steel);
  --rule: rgba(242, 240, 236, 0.16);
  --accent: var(--amber);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--fg);
  overflow-x: hidden;
  transition: background-color 0.7s ease, color 0.7s ease;
}

body.world-yellow {
  --fg: var(--ink);
  --fg-dim: rgba(11, 11, 12, 0.6);
  --rule: rgba(11, 11, 12, 0.18);
  --accent: var(--ink);
}

::selection { background: var(--yellow); color: var(--ink); }
body.world-yellow ::selection { background: var(--ink); color: var(--yellow); }

a { color: inherit; text-decoration: none; }

/* ---------- LOADER ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--coal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { width: min(440px, 78vw); text-align: left; }
.loader-brand {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 0.86;
  color: var(--yellow);
  letter-spacing: 0.02em;
}
.loader-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.42em;
  color: var(--steel);
  margin: 0.9rem 0 2.4rem;
}
.loader-track {
  height: 2px;
  width: 100%;
  background: rgba(242, 240, 236, 0.12);
  overflow: hidden;
}
#loader-bar { height: 100%; width: 0%; background: var(--yellow); transition: width 0.2s ease; }
.loader-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--steel);
  margin-top: 0.9rem;
}

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 1.6rem clamp(1.2rem, 4vw, 3rem);
}
.site-header nav { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--warm-white);
  transition: color 0.5s ease;
}
.logo span { font-family: var(--font-mono); font-size: 0.6rem; vertical-align: super; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-white);
  opacity: 0.85;
  transition: opacity 0.3s ease, color 0.5s ease, border-color 0.5s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-cta { border: 1px solid rgba(242, 240, 236, 0.45); padding: 0.5rem 0.9rem; }

/* nav adapts to world; dark overlay forces light nav (stats section) */
body.world-yellow .logo,
body.world-yellow .nav-links a { color: var(--ink); }
body.world-yellow .nav-cta { border-color: rgba(11, 11, 12, 0.4); }
body.overlay-dark .logo,
body.overlay-dark .nav-links a { color: var(--warm-white); }
body.overlay-dark .nav-cta { border-color: rgba(242, 240, 236, 0.45); }

/* ---------- HERO ---------- */
.hero-standalone {
  position: relative;
  z-index: 40;
  height: 100vh;
  background: var(--coal);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1.2rem, 5vw, 5rem) clamp(3rem, 8vh, 6rem);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(242, 240, 236, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 236, 0.04) 1px, transparent 1px);
  background-size: 7vw 7vw;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
}
.hero-inner { position: relative; max-width: 62vw; }
.hero-label {
  color: var(--yellow);
  margin-bottom: 1.6rem;
}
.hero-heading {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--warm-white);
  font-size: clamp(3.4rem, 12vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero-heading .line { display: block; overflow: hidden; }
.hero-heading .w { display: inline-block; will-change: transform; }
.hero-heading .accent .num { color: var(--yellow); }
.hero-tagline {
  margin-top: 1.8rem;
  max-width: 34ch;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  line-height: 1.5;
  color: var(--steel);
}
.scroll-indicator {
  position: absolute;
  right: clamp(1.2rem, 5vw, 5rem);
  bottom: clamp(3rem, 8vh, 6rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--steel);
}
.scroll-arrow {
  width: 1px; height: 46px;
  background: linear-gradient(var(--yellow), transparent);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop { 0%,100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

.hero-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--steel-dim);
}
.hero-corner.tl { top: 6.5rem; left: clamp(1.2rem, 5vw, 5rem); }
.hero-corner.tr { top: 6.5rem; right: clamp(1.2rem, 5vw, 5rem); }
.hero-corner.br { bottom: 3rem; left: clamp(1.2rem, 5vw, 5rem); }

/* ---------- CANVAS ---------- */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 10;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}
#canvas { width: 100%; height: 100%; display: block; }
.canvas-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 46%, transparent 52%, rgba(0, 0, 0, 0.28) 100%);
}

/* ---------- DARK OVERLAY ---------- */
#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: #060606;
  opacity: 0;
  pointer-events: none;
}

/* ---------- MARQUEE ---------- */
.marquee-wrap {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 12;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0;
}
.marquee-text {
  font-family: var(--font-display);
  font-size: 15vw;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(11, 11, 12, 0.16);
  text-transform: uppercase;
  will-change: transform;
}

/* ---------- SCROLL CONTAINER + SECTIONS ---------- */
#scroll-container { position: relative; z-index: 20; height: 1000vh; }

.scroll-section {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.2rem, 5vw, 5rem);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.scroll-section .cta-button,
.scroll-section a { pointer-events: auto; }

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  position: relative;
  padding-left: 2.6rem;
}
.section-label::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 2rem; height: 1px;
  background: var(--accent);
}
.section-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--fg);
}
.section-heading.small { font-size: clamp(2.6rem, 5.5vw, 5rem); }
.section-body {
  margin-top: 1.6rem;
  max-width: 40ch;
  font-size: clamp(1rem, 1.15vw, 1.2rem);
  line-height: 1.6;
  color: var(--fg-dim);
}

/* side-aligned zones — product occupies center */
.align-left { flex-direction: row; align-items: center; justify-content: flex-start; }
.align-right { flex-direction: row; align-items: center; justify-content: flex-end; }
.align-left .section-inner,
.align-right .section-inner { max-width: 38vw; }
.section-inner.wide { max-width: 46vw; }

/* soft edge scrim guarantees contrast over busy coal footage (not a card) */
.align-left::before,
.align-right::before {
  content: "";
  position: absolute;
  top: -50vh; bottom: -50vh;
  width: 52vw;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.7s ease;
}
.align-left::before { left: 0; background: linear-gradient(90deg, rgba(6, 6, 7, 0.82), transparent); }
.align-right::before { right: 0; background: linear-gradient(270deg, rgba(6, 6, 7, 0.82), transparent); }
body.world-yellow .align-left::before { background: linear-gradient(90deg, rgba(255, 212, 0, 0.7), transparent); }
body.world-yellow .align-right::before { background: linear-gradient(270deg, rgba(255, 212, 0, 0.7), transparent); }

/* giant background year */
.bg-number {
  position: absolute;
  right: 3vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 34vw;
  line-height: 0.8;
  color: rgba(242, 240, 236, 0.05);
  z-index: -1;
  pointer-events: none;
  letter-spacing: -0.02em;
}

/* city timeline */
.city-timeline {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2rem;
  margin-top: 2.4rem;
}
.city-timeline li {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.city-timeline .dot {
  width: 7px; height: 7px;
  background: var(--yellow);
  border-radius: 50%;
}

/* service list */
.service-list { list-style: none; margin-top: 2rem; }
.service-list li {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.6vw, 2.4rem);
  line-height: 1.5;
  padding: 0.5rem 0;
  border-top: 1px solid var(--rule);
  color: var(--fg);
}
.service-list li:last-child { border-bottom: 1px solid var(--rule); }

/* values */
.values-list { list-style: none; margin-top: 1.8rem; display: flex; flex-direction: column; gap: clamp(0.3rem, 1.2vh, 0.9rem); }
.values-list li {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 3.1rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
}
.values-list .v-idx {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  transform: translateY(-0.4em);
}

/* ---------- STATS (dark overlay) ---------- */
.section-stats {
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2.6rem;
}
.section-stats .section-label,
.section-stats .stats-heading { color: var(--warm-white); }
.section-label.light { color: var(--yellow); padding-left: 0; }
.section-label.light::before { display: none; }
.stats-head { max-width: 60ch; }
.stats-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 0.98;
  text-transform: uppercase;
  margin-top: 1rem;
}
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-value { display: flex; align-items: flex-start; line-height: 0.86; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.86;
  color: var(--yellow);
}
.stat-suffix { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 3rem); color: var(--yellow); margin-left: 0.08em; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 1rem;
}
.blueprint-index {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 0.8rem 3rem;
  border-top: 1px solid rgba(242, 240, 236, 0.16);
  padding-top: 2rem;
}
.blueprint-index li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--warm-white);
  text-align: left;
}
.blueprint-index .idx { color: var(--steel-dim); margin-right: 0.7rem; }

/* ---------- QUOTE ---------- */
.section-quote {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.quote-inner { max-width: min(90vw, 46rem); }
.big-quote {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 2.3rem);
  line-height: 1.32;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.since { margin-top: clamp(1.4rem, 3vh, 2.6rem); display: flex; flex-direction: column; align-items: center; }
.since-word { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.5em; color: var(--accent); padding-left: 0.5em; }
.since-year {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 13vw, 9.5rem);
  line-height: 0.82;
  color: var(--fg);
  letter-spacing: -0.01em;
}

/* ---------- FINAL ---------- */
.section-final {
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.final-inner { max-width: 30ch; }
.walker-quote {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  line-height: 1.4;
  color: var(--warm-white);
}
.walker-attr {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  color: var(--steel);
  margin-top: 1.6rem;
}
.final-logo {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 13rem);
  line-height: 1;
  color: var(--yellow);
  margin: 2.4rem 0 2rem;
}
.final-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-button {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1.05rem 1.8rem;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.cta-button.primary { background: var(--yellow); color: var(--ink); }
.cta-button.primary:hover { transform: translateY(-3px); background: #fff; }
.cta-button.ghost { border: 1px solid rgba(242, 240, 236, 0.4); color: var(--warm-white); }
.cta-button.ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { max-width: 100%; }
  .align-left .section-inner,
  .align-right .section-inner,
  .section-inner.wide { max-width: 80vw; }
  .blueprint-index { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  #scroll-container { height: 620vh; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-standalone { align-items: center; }
  .hero-corner.tr { display: none; }
  .align-left, .align-right { justify-content: center; text-align: left; }
  .align-left .section-inner,
  .align-right .section-inner,
  .section-inner.wide { max-width: 100%; }
  .align-left::before, .align-right::before {
    left: -5vw; right: -5vw; width: auto;
    background: rgba(6, 6, 7, 0.62);
  }
  body.world-yellow .align-left::before,
  body.world-yellow .align-right::before { background: rgba(255, 212, 0, 0.6); }
  .bg-number { font-size: 52vw; opacity: 1; }
  .stats-grid { gap: 2.4rem; }
  .blueprint-index { grid-template-columns: 1fr 1fr; gap: 0.6rem 1.4rem; }
  .marquee-text { font-size: 22vw; }
  .scroll-indicator span { display: none; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .scroll-arrow { animation: none; }
  html { scroll-behavior: auto; }
}
