:root {
  --color-black: #121212;
  --color-black-soft: #1a1a1a;
  --color-yellow: #f4b400;
  --color-yellow-dark: #d99f00;
  --color-cream: #faf7f0;
  --color-text: #232323;
  --color-text-light: #f5f5f5;
  --color-muted: #6b6b6b;
  --max-width: 1180px;
  --radius: 6px;
  --transition: 0.25s ease;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  position: relative;
  padding-left: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-black);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--color-yellow);
  transform: translateY(-50%);
}
.eyebrow--light { color: var(--color-text-light); }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn--primary {
  background: var(--color-yellow);
  color: var(--color-black);
}
.btn--primary:hover {
  background: var(--color-yellow-dark);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
:root { --header-height: 110px; }

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: height var(--transition), box-shadow var(--transition);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  transition: height var(--transition);
}
.header.is-scrolled .header__inner { height: calc(var(--header-height) - 20px); }
.header.is-scrolled .header__logo { height: 56px; }
.header.is-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,0.12); }
.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__logo { height: 74px; width: auto; transition: height var(--transition); }

.header__nav {
  display: flex;
  gap: 32px;
}
.header__nav a {
  color: var(--color-black);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--color-yellow);
  transition: width var(--transition);
}
.header__nav a:hover::after { width: 100%; }

.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.header__toggle span {
  display: block;
  height: 2px;
  background: var(--color-black);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.header__toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__toggle.is-active span:nth-child(2) { opacity: 0; }
.header__toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  margin-top: var(--header-height);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__slides {
  position: absolute;
  inset: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.75) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-top: 60px;
  padding-bottom: 100px;
}
.hero__content h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  margin: 0 0 20px;
  font-weight: 800;
  line-height: 1.08;
  max-width: 900px;
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 0.8s ease 0.15s forwards;
}
.hero__content p {
  font-size: 1.05rem;
  max-width: 760px;
  margin-bottom: 32px;
  color: #eee;
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 0.8s ease 0.35s forwards;
}
.hero__content .btn {
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 0.8s ease 0.55s forwards;
}
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal--left { transform: translateX(-32px); }
.reveal--right { transform: translateX(32px); }
.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__content h1, .hero__content p, .hero__content .btn {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Empresa ---------- */
.empresa { padding: 100px 0; background: var(--color-cream); }
.empresa__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.empresa__text h2 { font-size: 2.4rem; margin: 0 0 20px; font-weight: 800; }
.empresa__text p { color: var(--color-muted); margin-bottom: 16px; }
.empresa__media img {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

/* ---------- Cantera / productos ---------- */
.cantera {
  background: var(--color-black);
  color: var(--color-text-light);
  padding: 100px 0;
}
.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 0 0 10px;
}
.section-subtitle {
  color: #bdbdbd;
  margin-bottom: 48px;
  max-width: 560px;
}

.productos__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.producto-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-black-soft);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255,255,255,0.06);
}
.producto-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.producto-card:hover img { transform: scale(1.08); }
.producto-card__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-yellow);
  color: var(--color-black);
  font-weight: 700;
  font-size: 0.78rem;
  text-align: center;
  padding: 8px 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.producto-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(18,18,18,0.75);
  color: var(--color-yellow);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ---------- Sustentabilidad ---------- */
.sustentabilidad { padding: 100px 0; background: #fff; }
.sustentabilidad__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.sustentabilidad__media img {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.sustentabilidad__text h2 { font-size: 2.2rem; font-weight: 800; margin: 0 0 20px; }
.sustentabilidad__text p { color: var(--color-muted); margin-bottom: 16px; }

/* ---------- Contacto ---------- */
.contacto {
  background: var(--color-black);
  color: var(--color-text-light);
  padding: 100px 0;
}
.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.contacto__text h2 { font-size: 2.2rem; font-weight: 800; margin: 0 0 16px; }
.contacto__text p { color: #cfcfcf; margin-bottom: 24px; }
.contacto__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contacto__list a:hover { color: var(--color-yellow); }
.contacto__media img { border-radius: var(--radius); }

/* ---------- Mapa ---------- */
.mapa { display: block; line-height: 0; }
.mapa iframe { display: block; width: 100%; }

/* ---------- Footer ---------- */
.footer { background: #ffffff; color: #6b6b6b; padding: 28px 0; border-top: 1px solid #eee; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__brand { display: flex; align-items: center; gap: 10px; color: #6b6b6b; font-weight: 700; }
.footer__logo { height: 46px; }
.footer p { margin: 0; font-size: 0.85rem; color: #6b6b6b; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.modal.is-open { display: block; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal.is-visible .modal__backdrop { opacity: 1; }
.modal__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  max-width: 900px;
  width: calc(100% - 40px);
  margin: 6vh auto;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 88vh;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.modal.is-visible .modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.modal__gallery {
  position: relative;
  background: #111;
  min-height: 260px;
}
.modal__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.modal__gallery img.is-active { opacity: 1; }
.modal__gallery-nav {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.modal__gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
}
.modal__gallery-dot.is-active { background: var(--color-yellow); }
.modal__body {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}
.modal__body h3 { font-size: 1.6rem; margin: 0 0 14px; font-weight: 800; }
.modal__body p { color: var(--color-muted); margin-bottom: 24px; }
.modal__body .btn { align-self: flex-start; }
.modal__body .btn.is-disabled {
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  background: #25d366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: pulse 2.4s ease-out infinite;
  z-index: -1;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .empresa__grid,
  .sustentabilidad__grid,
  .contacto__grid { grid-template-columns: 1fr; }
  .empresa__media, .sustentabilidad__media, .contacto__media { order: -1; }
  .productos__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header__nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 8px 12px rgba(0,0,0,0.08);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    display: none;
  }
  .header__nav.is-open { display: flex; }
  .header__toggle { display: flex; }

  .productos__grid { grid-template-columns: repeat(2, 1fr); }
  .modal__panel { grid-template-columns: 1fr; }
  .modal__gallery { min-height: 220px; }
  .empresa, .cantera, .sustentabilidad, .contacto { padding: 64px 0; }

  :root { --header-height: 84px; }
  .header__logo { height: 54px; }
}

@media (max-width: 480px) {
  .productos__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero__content h1 { font-size: 2rem; }
  .modal__panel { width: calc(100% - 24px); margin: 4vh auto; }
  .modal__body { padding: 28px 22px; }
}
