/* ===========================================================
   TRAMA TALLER — estilos
   Paleta tomada del logo: madera cálida, azul marino, gris carbón
   =========================================================== */
:root {
  /* Paleta del logo TRAMA: navy + blanco. Fondo blanco, acentos en azul. */
  --paper: #ffffff;
  --paper-2: #f3f6f8;      /* gris-azulado muy suave para separar secciones */
  --ink: #1f262c;
  --ink-soft: #566069;
  --navy: #273744;          /* azul exacto del logo */
  --navy-deep: #1c2a34;
  --wood: #35566b;          /* acento azul (títulos, eyebrows, índices) */
  --wood-soft: #7a97a8;     /* azul claro para fondos navy (strip, contacto, footer) */
  --wood-light: #d6e1e8;
  --charcoal: #3a3f44;
  --line: rgba(31, 42, 52, 0.12);
  --white: #fff;

  --maxw: 1160px;
  --pad: clamp(20px, 5vw, 56px);
  --radius: 3px;
  --radius-lg: 6px;

  /* Montserrat (la del logo) para todo: títulos y texto */
  --serif: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 18px 50px -24px rgba(28, 42, 52, 0.4);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(64px, 10vw, 130px); }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wood);
  font-weight: 600;
  margin: 0 0 1rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
}

.section-title em { font-style: normal; color: var(--wood); }

.section-head { max-width: 620px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-intro { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

p { margin: 0 0 1rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85em 1.7em;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn-solid { background: var(--navy); color: #fff; }
.btn-solid:hover { background: var(--navy-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled { border-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; color: var(--navy); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: var(--wood);
  margin-top: 3px;
  text-transform: uppercase;
}

.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1.5px;
  background: var(--wood);
  transition: width 0.25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.nav-cta { padding-block: 0.6em; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--pad) 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.mobile-menu a { padding: 12px 0; font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu a.btn { border: 1.5px solid transparent; margin-top: 12px; justify-content: center; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-block: clamp(96px, 17vw, 200px);
  background:
    linear-gradient(90deg, rgba(20, 30, 38, 0.82) 0%, rgba(20, 30, 38, 0.55) 55%, rgba(20, 30, 38, 0.35) 100%),
    url("./assets/hero-bg.jpg") center / cover no-repeat;
  color: #fff;
}
.hero-inner { position: relative; }
.hero-copy { max-width: 640px; }
.hero .eyebrow { color: var(--wood-light); }
.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
  color: #fff;
}
.hero-title em { font-style: normal; font-weight: 500; color: var(--wood-light); }
.hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 540px;
  margin-bottom: 2.2rem;
}
/* Botón secundario sobre foto: borde y texto claros */
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.hero .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== Strip marquee ===== */
.strip {
  background: var(--navy);
  color: var(--paper);
  overflow: hidden;
  padding-block: 16px;
  border-block: 1px solid var(--navy-deep);
}
.strip-track {
  display: flex;
  gap: 34px;
  width: max-content;
  animation: marquee 32s linear infinite;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.strip-track span { opacity: 0.9; }
.strip-track span:nth-child(even) { color: var(--wood-soft); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Grid 2 col ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}

/* ===== El taller ===== */
.taller-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.taller-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/11; }
.feature-list { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.feature-list li {
  padding: 0.7rem 0 0.7rem 1.8rem;
  border-top: 1px solid var(--line);
  position: relative;
  color: var(--ink-soft);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15rem;
  width: 9px; height: 9px;
  background: var(--wood);
  border-radius: 2px;
  transform: rotate(45deg);
}
.feature-list strong { color: var(--ink); font-weight: 600; }

/* ===== Productos ===== */
.productos { background: var(--paper-2); }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.2vw, 26px);
}
.product-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-media {
  flex: 1;
  min-height: 210px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(33,48,63,0.10));
}
/* Foto por defecto de cada categoría. Si se sube una desde /admin,
   JS le pone otra background-image y se agrega .has-photo encima. */
.product-media { background-color: var(--paper-2); }
.tone-1 .product-media { background-image: url("./assets/cards/muebles.jpg"); }
.tone-2 .product-media { background-image: url("./assets/cards/cocinas.jpg"); }
.tone-3 .product-media { background-image: url("./assets/cards/dormitorios.jpg"); }
.tone-4 .product-media { background-image: url("./assets/cards/banos.jpg"); }
.tone-5 .product-media { background-image: url("./assets/cards/comercial.jpg"); }
.tone-6 .product-media { background-image: url("./assets/cards/herreria.jpg"); }
.product-media.has-photo { background-size: cover; background-position: center; }

.product-info { padding: 22px 24px 26px; }
.product-index {
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--wood);
  letter-spacing: 0.1em;
}
.product-info h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0.2rem 0 0.5rem;
}
.product-info p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

.product-card--cta {
  background: var(--navy);
  color: var(--paper);
  justify-content: center;
  align-items: flex-start;
  border: 0;
}
.product-card--cta .product-info { padding: 34px 30px; }
.product-card--cta h3 { font-size: 1.6rem; color: #fff; }
.product-card--cta p { color: rgba(246,241,234,0.78); margin-bottom: 1.4rem; }
.product-card--cta .btn-solid { background: #fff; color: var(--navy); }
.product-card--cta .btn-solid:hover { background: var(--wood-light); }

/* ===== Galería ===== */
.galeria { background: var(--paper); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(10px, 1.5vw, 16px);
}
.gallery-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ===== Proceso ===== */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 38px);
  counter-reset: step;
}
.steps li { position: relative; padding-top: 26px; border-top: 2px solid var(--line); }
.step-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--wood);
  display: block;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.steps h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 0 0 0.4rem; }
.steps p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ===== Contacto ===== */
.contacto {
  background:
    linear-gradient(rgba(24, 36, 45, 0.9), rgba(24, 36, 45, 0.92)),
    url("./assets/presupuesto-bg.jpg") center / cover no-repeat;
  color: var(--paper);
}
.contacto .eyebrow { color: var(--wood-soft); }
.contacto .section-title { color: #fff; }
.contacto .section-title em,
.contacto-copy p { color: rgba(246,241,234,0.82); }
.contacto-grid { align-items: start; }

.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 16px; }
.contact-ico {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  background: rgba(246,241,234,0.10);
  display: grid;
  place-items: center;
  color: var(--wood-soft);
}
.contact-ico svg { width: 22px; height: 22px; }
.contact-list strong { color: #fff; font-weight: 600; font-size: 0.95rem; }
.contact-list a { color: rgba(246,241,234,0.82); border-bottom: 1px solid transparent; }
.contact-list a:hover { color: #fff; border-color: var(--wood-soft); }

/* form */
.quote-form {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 7px;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--wood);
  box-shadow: 0 0 0 3px rgba(176,125,82,0.15);
}
.field textarea { resize: vertical; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); text-align: center; margin: 12px 0 0; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #c0492f; box-shadow: 0 0 0 3px rgba(192,73,47,0.12); }

/* ===== Footer ===== */
.site-footer { background: var(--navy-deep); color: rgba(246,241,234,0.75); padding-top: clamp(54px, 7vw, 84px); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
}
.brand--footer .brand-mark { color: var(--wood-soft); }
.brand--footer .brand-name { color: #fff; }
.footer-brand p { margin-top: 18px; font-size: 0.95rem; line-height: 1.7; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-cols h4 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wood-soft);
  margin: 0 0 16px;
}
.footer-cols a, .footer-loc { display: block; padding: 5px 0; font-size: 0.95rem; }
.footer-cols a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid rgba(246,241,234,0.12);
  font-size: 0.82rem;
  color: rgba(246,241,234,0.55);
}

/* ===== Floating WhatsApp ===== */
.wa-float {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,0.6);
  z-index: 60;
  transition: transform 0.2s ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}
@media (max-width: 900px) {
  .nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .taller-media { order: -1; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

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