/* =========================================================
   Industrias Lavin · Propuesta de rebranding (home)
   ========================================================= */

:root {
  --ink: #16202e;
  --ink-soft: #4a5568;
  --ivory: #faf8f4;
  --sand: #f1ece4;
  --mist: #e8eef2;
  --champagne: #b5966a;
  --champagne-soft: #e2cfae;
  --line: rgba(22, 32, 46, .12);
  --white: #fff;

  --serif: "Marcellus", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;

  --wrap: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: 1.35rem; }
h1 em, h2 em { font-style: normal; color: var(--champagne); }
p { margin: 0 0 1.1em; }

.container { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eyebrow {
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 1.2em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--champagne-soft); }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn:hover { background: var(--champagne); border-color: var(--champagne); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: var(--champagne-soft); border-color: var(--champagne-soft); color: var(--ink); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn--ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.link {
  display: inline-block;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 6px;
  background: linear-gradient(var(--champagne), var(--champagne)) left bottom / 100% 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.link:hover { background-size: 35% 1px; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 9px 24px;
  background: var(--ink);
  color: rgba(255,255,255,.75);
  font-size: .74rem;
  letter-spacing: .08em;
}
.topbar p { margin: 0; }
.topbar__right { display: flex; gap: 22px; align-items: center; }
.topbar a:hover { color: var(--champagne-soft); }
.lang button { background: none; border: 0; color: inherit; padding: 0 4px; font-size: .74rem; opacity: .6; }
.lang button.is-active { opacity: 1; color: var(--champagne-soft); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  background: rgba(250, 248, 244, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: padding .4s var(--ease), border-color .4s var(--ease);
}
.header.is-scrolled { padding-block: 14px; border-color: var(--line); }

.logo { display: inline-block; line-height: 0; }
.logo img { width: 190px; height: auto; transition: width .4s var(--ease); }
.header.is-scrolled .logo img { width: 160px; }
.logo--light img { width: 170px; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
}
.nav a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--champagne);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { padding: 11px 22px; border: 1px solid var(--ink); transition: .4s var(--ease); }
.nav__cta:hover { background: var(--ink); color: var(--white); }

.burger { display: none; background: none; border: 0; width: 34px; height: 24px; position: relative; }
.burger span { position: absolute; left: 0; width: 100%; height: 1px; background: var(--ink); transition: .4s var(--ease); }
.burger span:first-child { top: 8px; }
.burger span:last-child { top: 16px; }
.burger[aria-expanded="true"] span:first-child { top: 12px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 12px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
  width: min(1320px, 100% - 48px);
  margin-inline: auto;
  min-height: calc(100vh - 120px);
  padding: 40px 0 80px;
}
.hero__lead { font-size: 1.12rem; max-width: 30em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__art { position: relative; max-width: 540px; margin-left: auto; width: 100%; }
.hero__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 280px 280px 0 0;
}
.hero__badge {
  position: absolute;
  left: -50px;
  bottom: 12%;
  display: grid;
  place-content: center;
  text-align: center;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 20px 50px -20px rgba(22,32,46,.25);
}
.hero__badge strong { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--ink); }
.hero__badge span { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }


/* ---------- Marquesina ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 26px 0;
  background: var(--white);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 44px;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee span { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); white-space: nowrap; }
.marquee svg { width: 14px; height: 14px; color: var(--champagne); flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones genéricas ---------- */
section { padding: 120px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.section-head .eyebrow { justify-content: center; }
.section-head__lead { font-size: 1.05rem; }
.section-head--row {
  display: flex; justify-content: space-between; align-items: flex-end;
  text-align: left; max-width: none;
}
.section-head--row .eyebrow { justify-content: flex-start; }

.icon { width: 46px; height: 46px; fill: none; stroke: var(--champagne); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nosotros ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about__copy { padding-top: 40px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 90px;
  border-top: 1px solid var(--line);
}
.stat { padding: 40px 24px 0; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
}
.stat span { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Marcas ---------- */
.brands { background: var(--mist); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 48px; }
.filters button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 22px;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-radius: 40px;
  transition: .3s var(--ease);
}
.filters button:hover { border-color: var(--ink); }
.filters button.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }

.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.brand {
  background: var(--white);
  padding: 44px 30px 38px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  transition: background .5s var(--ease), opacity .4s var(--ease);
}
.brand h3 { font-size: 1.9rem; margin-bottom: .3em; transition: color .5s var(--ease); }
.brand p { margin: 0; font-size: .92rem; transition: color .5s var(--ease); }
.brand__tag {
  position: absolute; top: 28px; left: 30px;
  font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--champagne);
}
.brand:hover { background: var(--ink); }
.brand:hover h3 { color: var(--white); }
.brand:hover p { color: rgba(255,255,255,.7); }
.brand--feature { grid-column: span 2; background: linear-gradient(135deg, #1d2b40, var(--ink)); }
.brand--feature h3 { color: var(--white); font-size: 2.6rem; letter-spacing: .12em; }
.brand--feature p { color: rgba(255,255,255,.75); }
.brand.is-hidden { display: none; }

/* ---------- Spotlight Nuvel ---------- */
.spotlight { background: var(--ink); color: rgba(255,255,255,.75); overflow: hidden; }
.spotlight h2 { color: var(--white); }
.spotlight h2 em { color: var(--champagne-soft); }
.spotlight__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.spotlight__art img {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin-inline: auto;
  outline: 1px solid rgba(181, 150, 106, .5);
  outline-offset: 14px;
}
.spotlight__list { list-style: none; padding: 0; margin: 28px 0 0; }
.spotlight__list li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); display: flex; gap: 14px; align-items: center; }
.spotlight__list li::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: var(--champagne); flex: none; }

/* ---------- Ritual ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step {
  position: relative;
  padding: 48px 30px 34px;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.step:hover { transform: translateY(-8px); box-shadow: 0 30px 60px -30px rgba(22,32,46,.25); }
.step__n { position: absolute; top: 20px; right: 24px; font-family: var(--serif); font-size: 2.4rem; color: var(--sand); line-height: 1; }
.step .icon { margin-bottom: 26px; }
.step p { margin: 0; font-size: .95rem; }

/* ---------- Ciencia ---------- */
.science { background: var(--sand); }
.science__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 90px; align-items: center; }
.science__media { position: relative; }
.science__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 240px 240px 0 0;
}
.science__note {
  position: absolute;
  right: -30px; bottom: 50px;
  background: var(--white);
  padding: 22px 26px;
  box-shadow: 0 30px 60px -30px rgba(22,32,46,.3);
  display: grid;
}
.science__note strong { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 1.15rem; }
.science__note span { font-size: .84rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; padding-top: 34px; border-top: 1px solid var(--line); }
.pillar h3 { font-size: 1.12rem; }
.pillar p { font-size: .9rem; margin: 0; }

/* ---------- B2B / Maquila ---------- */
.b2b__head { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; margin-bottom: 70px; }
.b2b__head p:last-child { font-size: 1.05rem; }
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.process::before { content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 1px; background: var(--line); }
.process li { position: relative; padding-right: 24px; }
.process span {
  display: grid; place-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ivory);
  border: 1px solid var(--champagne);
  color: var(--champagne);
  font-size: .78rem;
  margin-bottom: 26px;
  position: relative;
  transition: .4s var(--ease);
}
.process li:hover span { background: var(--champagne); color: var(--white); }
.process h3 { font-size: 1.2rem; }
.process p { font-size: .9rem; margin: 0; }
.b2b__cta {
  margin-top: 80px;
  padding: 44px 50px;
  border: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--white);
}
.b2b__cta p { margin: 0; font-family: var(--serif); font-size: 1.6rem; color: var(--ink); }

/* ---------- Certificaciones ---------- */
.certs { background: var(--white); }
.cert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cert {
  text-align: center;
  padding: 40px 18px;
  border: 1px solid var(--line);
  border-radius: 200px 200px 0 0;
  display: grid; gap: 10px; align-content: center;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.cert:hover { border-color: var(--champagne); background: var(--ivory); }
.cert strong { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 1.2rem; }
.cert span { font-size: .82rem; line-height: 1.5; }

/* ---------- Sustentabilidad ---------- */
.sustain__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.sustain__list { list-style: none; margin: 0; padding: 0; }
.sustain__list li { padding: 30px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.sustain__list li:first-child { border-top: 1px solid var(--line); }
.sustain__list h3 { margin: 0; font-size: 1.25rem; }
.sustain__list p { margin: 0; }

/* ---------- Journal ---------- */
.journal { background: var(--mist); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.post__img { aspect-ratio: 4 / 3; margin-bottom: 26px; overflow: hidden; }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .post__img img { transform: scale(1.06); }
.post__cat { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--champagne); }
.post h3 { margin: 10px 0 18px; font-size: 1.4rem; }

/* ---------- Newsletter ---------- */
.newsletter { text-align: center; padding: 110px 0; }
.newsletter__inner { max-width: 640px; }
.newsletter__spark { width: 26px; height: 26px; color: var(--champagne); margin: 0 auto 22px; }
.newsletter__form { display: flex; margin-top: 34px; border: 1px solid var(--ink); background: var(--white); }
.newsletter__form input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  padding: 0 24px;
  font: inherit; font-size: .95rem;
  background: transparent; color: var(--ink);
}
.newsletter__msg { margin-top: 16px; min-height: 1.7em; font-size: .9rem; color: var(--champagne); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 90px 0 30px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 50px; }
.footer__about { margin-top: 26px; max-width: 26em; }
.footer h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 20px; }
.footer__grid a:not(.logo) { display: block; padding: 4px 0; transition: color .3s; }
.footer__grid a:not(.logo):hover { color: var(--champagne-soft); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 70px; padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .8rem;
}
.footer__bottom p { margin: 0; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .nav { gap: 22px; }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); row-gap: 50px; }
  .process::before { display: none; }
}

@media (max-width: 900px) {
  section { padding: 84px 0; }
  .topbar p { display: none; }
  .topbar { justify-content: center; padding-inline: 16px; }
  /* sin backdrop-filter: si no, el menú fijo queda atrapado dentro del header */
  .header { padding: 18px 24px; backdrop-filter: none; background: var(--ivory); }
  .burger { display: block; z-index: 2; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    background: var(--ivory);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav a { font-size: 1rem; }

  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 30px; text-align: left; }
  /* en móvil la imagen va arriba del texto */
  .hero__art { order: -1; max-width: 460px; margin-inline: auto; width: 100%; }
  .hero__badge { width: 96px; height: 96px; left: 12px; bottom: 8%; }

  .about__grid, .spotlight__grid, .science__grid, .sustain__grid, .b2b__head { grid-template-columns: 1fr; gap: 40px; }
  .about__copy { padding-top: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 50px; }
  .stat { padding: 30px 16px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .science__note { right: 10px; }
  .pillars { grid-template-columns: 1fr; gap: 18px; }
  .posts { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .spotlight__art { order: -1; max-width: 360px; margin-inline: auto; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .hero { width: calc(100% - 32px); }
  .header { padding: 16px; }
  .logo img, .header.is-scrolled .logo img { width: 138px; }
  .brand-grid { grid-template-columns: 1fr; }
  .brand--feature { grid-column: auto; }
  .brand { min-height: 180px; }
  .steps, .process, .cert-grid { grid-template-columns: 1fr; }
  .cert { border-radius: 120px 120px 0 0; }
  .sustain__list li { grid-template-columns: 1fr; gap: 6px; }
  .section-head--row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .b2b__cta { padding: 30px 24px; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form input { padding: 18px; }
  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .hero__ctas .btn { flex: 1 1 100%; }
}
