/*
 * Hidrocarburos del Norte — Home
 * Depende de tokens.css + base.css.
 */

/* ═══════════════════════════ HERO 3D POR CAPAS ═══ */
.hero { height: 185vh; background: var(--color-petroleum-900); }
.hero__sticky { height: 100svh; position: sticky; top: 0; overflow: hidden; isolation: isolate; }

.hero__scene { position: absolute; inset: 0; transform-style: preserve-3d; perspective: 1100px; }
.hero__photo { position: absolute; inset: -5%; will-change: transform; transform: scale(1.06); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(4,14,29,.85) 0%, rgba(4,14,29,.45) 50%, rgba(4,14,29,.28) 100%),
    linear-gradient(0deg, rgba(4,14,29,.85) 0%, rgba(4,14,29,0) 48%);
}
.hero__light {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,70%) var(--my,38%), rgba(30,68,112,.30), transparent 30%);
  mix-blend-mode: screen; opacity: .7;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: linear-gradient(to top, black, transparent 65%);
  mask-image: linear-gradient(to top, black, transparent 65%);
  opacity: .4;
}
.hero__depth-frame {
  position: absolute; inset: 7% 4%;
  border: 1px solid rgba(255,255,255,.12); border-radius: 36px;
  transform: translateZ(100px); box-shadow: inset 0 0 80px rgba(30,68,112,.10);
}

.hero__ui { position: relative; height: 100%; z-index: 4; color: var(--text-inverse); display: flex; align-items: center; }
.hero__copy { max-width: 720px; margin-top: var(--space-8); will-change: transform, opacity; }
.hero__eyebrow { color: var(--accent); }
.hero__title {
  font-size: clamp(3rem, 7.5vw, 5.6rem);
  line-height: .92; letter-spacing: .005em; text-transform: uppercase;
  color: var(--color-limestone-100); max-width: 15ch;
  margin: var(--space-5) 0 var(--space-5);
}
.hero__title em { color: var(--accent); font-style: normal; }
.hero__lead {
  max-width: 46ch; font-size: var(--text-lg);
  color: var(--color-limestone-200); line-height: var(--leading-normal);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }

/* Tarjeta flotante de vidrio */
.glass-card {
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
  box-shadow: var(--shadow-lg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-lg);
}
.hero__card { position: absolute; right: 0; top: 55%; width: 260px; padding: var(--space-6); will-change: transform, opacity; }
.hero__card-kicker { font-size: var(--text-xs); letter-spacing: var(--tracking-wider); text-transform: uppercase; color: var(--color-slate-400); }
.hero__card strong { display: block; font-family: var(--font-display); font-size: 48px; line-height: 1; margin: var(--space-3) 0 var(--space-2); color: var(--accent); }
.hero__card > span:not(.hero__card-kicker) { color: var(--color-limestone-100); font-size: var(--text-sm); }
.hero__card-rule { height: 1px; background: rgba(255,255,255,.15); margin: var(--space-4) 0; }
.hero__card small { color: var(--color-slate-400); line-height: var(--leading-normal); }

/* Indicador de scroll tipo mouse */
.hero__scroll {
  position: absolute; bottom: var(--space-8); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  color: var(--color-slate-400); font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}
.hero__mouse { width: 28px; height: 43px; border: 1px solid rgba(255,255,255,.5); border-radius: 18px; padding: 7px; display: flex; justify-content: center; }
.hero__mouse i { width: 3px; height: 8px; background: var(--accent); border-radius: 2px; animation: wheel 1.5s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(13px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 820px) {
  .hero { height: 155vh; }
  .hero__card { display: none; }
  .hero__ui { align-items: flex-end; padding-bottom: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__sticky { position: relative; min-height: 100svh; }
  .hero__photo { transform: none !important; }
  .hero__mouse i { animation: none; }
}

/* ═══════════════════════════ FRANJA DE CIFRAS ═══ */
.stat-band { background: var(--surface-dark); border-block: 1px solid var(--border-accent); }
.stat-band__grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6); padding-block: var(--space-12);
}
.stat-band__item { text-align: center; border-right: 1px solid rgba(255,255,255,.08); }
.stat-band__item:last-child { border-right: none; }
.stat-band__n {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem); line-height: 1;
  color: var(--accent); font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.stat-band__n sup { font-size: .5em; vertical-align: super; }
/* Sensación de odómetro de surtidor mientras cuenta */
.stat-band__n.is-counting {
  text-shadow: 0 0 14px rgba(232, 180, 0, .55);
  animation: pump-tick .12s steps(2) infinite;
}
@keyframes pump-tick { 0% { transform: translateY(-1px); } 100% { transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) { .stat-band__n.is-counting { animation: none; } }
.stat-band__label {
  margin-top: var(--space-3); font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--text-inverse-muted);
}
@media (max-width: 820px) {
  .stat-band__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-4); }
  .stat-band__item:nth-child(2) { border-right: none; }
  .stat-band__item:last-child { grid-column: 1 / -1; }
}

/* ═══════════════════════════ PRODUCTOS PREVIEW ═══ */
.products__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-5); margin-top: var(--space-12);
}
.product-card {
  display: flex; flex-direction: column;
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  box-shadow: 0 10px 30px rgba(12, 27, 46, .14), 0 2px 6px rgba(12, 27, 46, .08);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(12, 27, 46, .28), 0 6px 14px rgba(12, 27, 46, .16);
  border-color: var(--accent);
}
.product-card__media { aspect-ratio: 4/3; background: var(--color-limestone-100); display: grid; place-items: center; padding: var(--space-4); }
.product-card__media img { max-height: 100%; width: auto; object-fit: contain; }
.product-card__body { padding: var(--space-4) var(--space-5) var(--space-6); border-top: 1px solid var(--border); }
.product-card__tag { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--accent-text); }
.product-card__name {
  font-family: var(--font-display); font-weight: var(--weight-bold);
  font-size: var(--text-xl); text-transform: uppercase; letter-spacing: .01em;
  margin-top: var(--space-1); line-height: 1.05;
}
.product-card__desc { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-2); }

/* ═══════════════════════════ NOSOTROS (split) ═══ */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-16); align-items: center; }
.about__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__list { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.about__list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.about__list svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; gap: var(--space-8); } .about__media { order: -1; } }

/* ═══════════════════════════ COBERTURA / CTA ═══ */
.coverage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.coverage h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
/* Video institucional integrado en Presencia nacional */
.coverage__video {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9; background: var(--color-petroleum-900);
}
.coverage__video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.coverage__video::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(6,15,26,.45);
  background: linear-gradient(180deg, rgba(6,15,26,.10) 0%, rgba(6,15,26,0) 30%, rgba(6,15,26,.25) 100%);
}
.coverage__pills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.coverage__pill {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-wide);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  border: 1px solid var(--border-accent); color: var(--text-inverse); background: rgba(255,255,255,.04);
}
@media (max-width: 820px) { .coverage { grid-template-columns: 1fr; gap: var(--space-8); } }

.cta-band { text-align: center; }
.cta-band h2 { max-width: 22ch; margin-inline: auto; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.cta-band .hero__actions { justify-content: center; }

/* ═══════════════════════════ EXPERIENCIA NOCTURNA ═══ */
.night {
  position: relative; overflow: hidden; color: var(--text-inverse);
  min-height: 60vh; display: flex; align-items: center;
  padding-block: var(--space-24);
}
.night--video { min-height: 88vh; }
.night__photo { position: absolute; inset: -5%; z-index: 0; will-change: transform; }
.night__photo img { width: 100%; height: 100%; object-fit: cover; }
.night__video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.night__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(4,13,27,.92) 0%, rgba(4,13,27,.55) 55%, rgba(4,13,27,.20) 100%);
}
.night__content { position: relative; z-index: 2; }
.night__content h2 {
  color: var(--color-limestone-100);
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: .95; letter-spacing: .01em;
  text-transform: uppercase; margin: var(--space-4) 0;
}
.night__content h2 em { color: var(--accent); font-style: normal; }
.night__content p { color: var(--color-limestone-200); font-size: var(--text-lg); max-width: 52ch; }
.night__content .hero__actions { margin-top: var(--space-8); }
@media (prefers-reduced-motion: reduce) { .night__photo { transform: none !important; } }
