/* ============================================================
   Melzolec Home Cabinets — landing
   Fidelidad al diseño Pencil (pencil-export.html, canvas 2368×3746)
   Mobile-first. Tokens + layout del diseño original.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f3ee;
  --green: #1b3a28;
  --green-dark: #12261b;
  --gold: #c9a24b;
  --text: #5c6f62;
  --text-muted: #a9bfae;
  --line: #d6ddd0;
  --line-dark: #33513f;
  --white: #ffffff;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --nav-height: 64px;
  --pad-x: 24px;
  --pad-y: 80px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-dark);
  margin: 0;
}

p {
  margin: 0;
}

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

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 9999px;
  border: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.9;
}

.btn--gold {
  background: var(--gold);
  color: var(--green-dark);
}

.btn--green {
  background: var(--green);
  color: var(--white);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--pad-x);
  background: var(--green-dark);
  color: var(--white);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__logo-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav__title {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav__brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 26px;
  color: var(--white);
  white-space: nowrap;
}

.nav__tagline {
  font-size: 9px;
  letter-spacing: 2px;
  line-height: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a {
  font-size: 14px;
  line-height: 21px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--white);
}

.nav__cta {
  padding: 10px 22px;
  font-size: 13px;
}

/* Hamburguesa — solo visible con .js en móvil */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 820px;
  background: var(--green-dark);
  color: var(--white);
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay--vertical {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(
    180deg,
    #12261b00 0%,
    #12261bcc 62%,
    #12261bf2 100%
  );
}

.hero__overlay--side {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 900px;
  z-index: 2;
  background-image: linear-gradient(
    -90deg,
    #0b1a1200 40%,
    #0b1a12b3 100%
  );
}

.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 80px var(--pad-x) 32px;
  max-width: 820px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 18px;
  color: var(--gold);
  text-transform: uppercase;
}

.hero__eyebrow svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hero__headline {
  font-size: 36px;
  line-height: 1.08;
  font-weight: 500;
  color: var(--white);
  max-width: 640px;
}

.hero__subline {
  font-size: 16px;
  line-height: 26px;
  color: var(--text-muted);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero__sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 6px;
  background: transparent;
  border: 0;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  cursor: pointer;
}

.hero__sound svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hero__stats {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 56px;
  padding: 28px var(--pad-x) 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 48px;
  color: var(--white);
}

.hero__stat-label {
  font-size: 12px;
  line-height: 18px;
  color: var(--text-muted);
}

.hero__scroll-hint {
  position: absolute;
  right: 64px;
  bottom: 48px;
  z-index: 3;
  display: none;
  width: 26px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--text-muted);
  border-radius: 9999px;
}

.hero__scroll-hint span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- About ---------- */
.about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg);
}

.about__image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.about__image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.about__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.about__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 18px;
  color: var(--text);
  text-transform: uppercase;
}

.about__eyebrow svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.about__heading {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--green);
}

.about__body {
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
}

/* ---------- Services ---------- */
.services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg);
}

.services__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 680px;
  text-align: center;
}

.services__eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 18px;
  color: var(--gold);
  text-transform: uppercase;
}

.services__heading {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--green);
}

.services__subtext {
  font-size: 15px;
  line-height: 24px;
  color: var(--text);
}

.services__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex: 1 1 0;
  padding: 28px;
  border-radius: 12px;
}

.service-card svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.service-card__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
}

.service-card__text {
  font-size: 13px;
  line-height: 20px;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  transition: opacity 0.2s ease;
}

.service-card__link:hover {
  opacity: 0.8;
}

.service-card--light {
  background: var(--bg);
  outline: 1px solid var(--line);
}

.service-card--light .service-card__title {
  color: var(--green);
}

.service-card--light .service-card__text {
  color: var(--text);
}

.service-card--light .service-card__link {
  color: var(--green);
}

.service-card--dark {
  background: var(--green);
}

.service-card--dark .service-card__title {
  color: var(--white);
}

.service-card--dark .service-card__text {
  color: var(--text-muted);
}

.service-card--dark .service-card__link {
  color: var(--gold);
}

/* ---------- Process ---------- */
.process {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding: var(--pad-y) var(--pad-x);
  background: var(--green);
}

.process__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 680px;
  text-align: center;
}

.process__eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 18px;
  color: var(--gold);
  text-transform: uppercase;
}

.process__heading {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--white);
}

.process__steps {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.process__step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 0;
  padding: 28px 32px;
  border-top: 1px solid var(--line-dark);
}

.process__step:first-child {
  border-top: 0;
}

.process__number {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 21px;
  color: var(--gold);
}

.process__step svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.process__step-title {
  font-size: 19px;
  font-weight: 500;
  line-height: 29px;
  color: var(--white);
}

.process__step-text {
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
}

/* ---------- CTA / Contact ---------- */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 100px var(--pad-x);
  background: var(--bg);
}

.contact__heading {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: var(--green);
  max-width: 640px;
}

.contact__subtext {
  font-size: 15px;
  line-height: 23px;
  text-align: center;
  color: var(--text);
  max-width: 520px;
}

.contact__form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 460px;
}

.contact__form input {
  flex: 1 1 0;
  padding: 14px 20px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 21px;
  color: var(--green-dark);
}

.contact__form input::placeholder {
  color: var(--text);
}

.contact__form .btn {
  padding: 14px 26px;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 72px var(--pad-x) 32px;
  background: var(--green-dark);
  color: var(--white);
}

.footer__columns {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 0;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__logo svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer__title {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 23px;
  color: var(--white);
  white-space: nowrap;
}

.footer__tagline {
  font-size: 8px;
  letter-spacing: 2px;
  line-height: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer__text {
  font-size: 13px;
  line-height: 21px;
  color: var(--text-muted);
  max-width: 340px;
}

.footer__socials {
  display: flex;
  gap: 12px;
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line-dark);
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

.footer__social:hover {
  background: var(--green);
}

.footer__social svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 0;
}

.footer__col-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 23px;
  color: var(--white);
}

.footer__col a {
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer__col a:hover {
  color: var(--white);
}

.footer__hours {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__hours svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer__hours span {
  font-size: 13px;
  line-height: 20px;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer__note {
  font-size: 13px;
  line-height: 21px;
  color: var(--text-muted);
  max-width: 340px;
}

.footer__cta {
  padding: 12px 22px;
  color: var(--green-dark);
}

.footer__cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background: var(--line-dark);
}

.footer__copyright {
  font-size: 12px;
  line-height: 18px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Scroll reveal (content-first) ---------- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .nav__links a,
  .footer__social,
  .footer__col a {
    transition: none;
  }
}

/* ============================================================
   Tablet (≥768px)
   ============================================================ */
@media (min-width: 768px) {
  :root {
    --pad-x: 64px;
    --pad-y: 120px;
    --nav-height: 84px;
  }

  /* Nav: menú hamburguesa solo con .js; por defecto links visibles */
  .nav__toggle {
    display: none;
  }

  .nav__links {
    display: flex;
  }

  /* Hero: contenido anclado izquierda, stats en fila */
  .hero__content {
    padding-top: 80px;
    padding-bottom: 96px;
  }

  .hero__headline {
    font-size: 56px;
  }

  .hero__subline {
    font-size: 17px;
  }

  .hero__stats {
    flex-direction: row;
  }

  .hero__scroll-hint {
    display: flex;
  }

  /* About: fila imagen + texto */
  .about {
    flex-direction: row;
    align-items: center;
    gap: 80px;
  }

  .about__image {
    flex: 1 1 0;
  }

  .about__image img {
    height: 520px;
  }

  .about__content {
    flex: 1 1 0;
  }

  .about__heading {
    font-size: 38px;
  }

  /* Services: 2 columnas */
  .services__heading {
    font-size: 36px;
  }

  .services__grid {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .service-card {
    flex-basis: calc(50% - 10px);
  }

  /* Process: fila con divisores */
  .process__heading {
    font-size: 36px;
  }

  .process__steps {
    flex-direction: row;
  }

  .process__step {
    border-top: 0;
    border-left: 1px solid var(--line-dark);
  }

  .process__step:first-child {
    border-left: 0;
  }

  /* Contact */
  .contact__heading {
    font-size: 34px;
  }

  .contact__form {
    flex-direction: row;
    align-items: center;
  }

  /* Footer: columnas en fila */
  .footer__columns {
    flex-direction: row;
    gap: 80px;
  }
}

/* ============================================================
   Desktop (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
  /* Services: 4 en una fila (como el diseño Pencil) */
  .services__grid {
    flex-wrap: nowrap;
  }

  .service-card {
    flex-basis: 0;
  }
}

/* ============================================================
   Nav móvil con .js (hamburguesa)
   - Sin .js: links siempre visibles (content-first)
   - Con .js en <768px: colapsa a hamburguesa
   ============================================================ */
@media (max-width: 767.98px) {
  html.js .nav__toggle {
    display: flex;
  }

  /* El CTA del nav ocupa demasiado en móvil; se oculta con .js
     (el hero "Agenda tu Consulta" y el menú cubren la conversión) */
  html.js .nav__cta {
    display: none;
  }

  html.js .nav__links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 20px var(--pad-x) 24px;
    background: var(--green-dark);
  }

  html.js .nav--open .nav__links {
    display: flex;
  }
}
