:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --accent: #009FE3;
  --accent-deep: #0077B3;
  --gray: #B9B7B8;
  --muted: rgba(245, 245, 245, 0.5);
  --max: 1440px;
  --gutter: clamp(24px, 4vw, 80px);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body { background: var(--bg); color: var(--fg); }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); color: var(--fg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader--hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__bar {
  width: 240px; height: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.loader__progress {
  height: 100%; width: 0%;
  background: var(--fg);
  transition: width 0.2s ease;
}
.loader__count {
  font-size: 14px;
  letter-spacing: 0.15em;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
  transition: padding 0.4s var(--ease), background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.header::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.5), rgba(10, 10, 10, 0));
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.4s var(--ease);
}
.header__logo,
.header__nav,
.header__nav a { pointer-events: auto; }
.header__logo { position: relative; display: flex; align-items: center; }
.header__logo img {
  height: 30px;
  width: auto;
  display: block;
  transition: opacity 0.4s var(--ease);
}
.header__logo-white {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}

/* ---------- Estado "colapsado" al hacer scroll ---------- */
.header--scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}
.header--scrolled::before { opacity: 0; }
.header--scrolled .header__logo-color { opacity: 0; }
.header--scrolled .header__logo-white { opacity: 1; }
.header--scrolled .header__nav a {
  mix-blend-mode: normal;
  color: #fff;
  opacity: 0.95;
}
.header--scrolled .header__cta {
  background: #fff;
  color: var(--accent-deep) !important;
}
.header__nav { display: flex; gap: 32px; align-items: center; }
.header__nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.75;
  transition: opacity 0.2s ease;
  mix-blend-mode: difference;
}
.header__nav a:hover { opacity: 1; }
.header__cta {
  background: var(--accent-deep);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 999px;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  font-weight: 600;
}

/* ---------- Hero (standalone, no canvas) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 0 var(--gutter);
  z-index: 5;
}
.hero__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0.6;
}
.hero__heading {
  font-size: clamp(2.8rem, 7.5vw, 6.5rem);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.hero__accent {
  color: var(--accent);
}
.hero__sub {
  font-size: clamp(1.1rem, 2vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-top: 18px;
  opacity: 0.72;
}
.hero__hint {
  position: absolute;
  bottom: 40px; left: var(--gutter);
  font-size: 12px;
  opacity: 0.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---------- Canvas (fijo) ---------- */
.canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  -webkit-clip-path: circle(0% at 50% 50%);
}

/* ---------- Dark overlay (stats) ---------- */
.overlay {
  position: fixed; inset: 0;
  z-index: 2;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Scroll container ---------- */
.scroll { position: relative; z-index: 3; }

/* ---------- Section base ---------- */
.section {
  min-height: 140vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter);
  position: relative;
}
.section--left  { align-items: flex-start; text-align: left; }
.section--right { align-items: flex-end;   text-align: right; }
.section > * {
  max-width: 40vw;
  min-width: 320px;
}
.section__label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}
.section__heading {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.55);
}
.section__body {
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  font-weight: 500;
  opacity: 1;
  max-width: 50ch;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.55);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 8vh 0;
  position: relative;
  z-index: 4;
}
.marquee span {
  display: inline-block;
  font-size: 12vw;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  padding-left: 4vw;
  will-change: transform;
}

/* ---------- Stats (excepción: centrado con overlay) ---------- */
.stats {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
  position: relative;
  z-index: 5;
}
.stats__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px;
  max-width: var(--max);
  width: 100%;
}
.stat__num {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__suffix {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  opacity: 0.5;
  margin-left: 4px;
}
.stat__label {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 16px;
}

/* ---------- CTA persistente ---------- */
.cta {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 6;
  background: var(--bg);
}
.cta__heading {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  max-width: 14ch;
}
.cta__button {
  display: inline-block;
  padding: 22px 44px;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  border-radius: 999px;
  transition: transform 0.3s var(--ease);
  will-change: transform;
}
.cta__button:hover { transform: translateX(8px); }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.cta__button--ghost {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid rgba(245, 245, 245, 0.35);
}
.cta__button--ghost:hover {
  transform: translateX(-8px);
  border-color: var(--fg);
  background: rgba(245, 245, 245, 0.05);
}

/* ---------- Mobile ---------- */
/* Tablets y pantallas medianas (769–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .section { min-height: 120vh; }
  .section > * { max-width: 62vw; }
  .gallery__grid { max-width: min(var(--max), 680px); }
}

@media (max-width: 768px) {
  .header__nav { gap: 16px; }
  .header__nav a:not(.header__cta) { display: none; }
  .header__logo img { height: 22px; }

  .section { min-height: 110vh; }
  .section > * { max-width: 90vw; min-width: 0; }
  .section--right { align-items: flex-start; text-align: left; }

  .marquee span { font-size: 18vw; }

  .stats__inner { grid-template-columns: 1fr; gap: 56px; }

  .cta__heading { max-width: 100%; }
}

/* ---------- Galería de producto (fondo claro) ---------- */
.gallery {
  position: relative;
  z-index: 6;
  background: #f4f4f5;
  color: #0a0a0a;
  padding: clamp(80px, 12vh, 160px) var(--gutter);
}
.gallery__head { max-width: var(--max); margin: 0 auto clamp(40px, 6vh, 72px); text-align: center; }
.gallery__label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 16px;
}
.gallery__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
  max-width: min(var(--max), 820px);
  margin: 0 auto;
}
.gallery__item { margin: 0; }
.gallery__item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 7%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: block;
}
.gallery__item figcaption {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  color: #1a1a1a;
  opacity: 0.9;
}
.gallery__cta {
  text-align: center;
  margin-top: clamp(48px, 8vh, 96px);
}

/* ---------- CTA: label, precio, nota ---------- */
.cta__label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 24px;
}
.cta__price {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 40px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cta__currency { font-size: 0.55em; vertical-align: 0.5em; opacity: 0.8; margin-right: 2px; }
.cta__note {
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 6;
  background: var(--bg);
  border-top: 1px solid rgba(245, 245, 245, 0.1);
  padding: 40px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__logo { height: 26px; width: auto; display: block; }
.footer span { max-width: 46ch; }

@media (max-width: 768px) {
  .gallery__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer { flex-direction: column; text-align: left; }
}
