:root {
  --red: #D5262C;
  --red-dark: #A81E23;
  --ink: #1C1917;
  --ink-soft: #4A4642;
  --paper: #F5F4F0;
  --paper-raised: #FFFFFF;
  --card-tint: #FBEAE9;
  --line: #E4E0D8;
  --gold: #E8A33D;
  --radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F2EFE9;
    --ink-soft: #C9C3B8;
    --paper: #17140F;
    --paper-raised: #221E19;
    --card-tint: #2B1918;
    --line: #33302A;
  }
}
:root[data-theme="dark"] {
  --ink: #F2EFE9;
  --ink-soft: #C9C3B8;
  --paper: #17140F;
  --paper-raised: #221E19;
  --card-tint: #2B1918;
  --line: #33302A;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px)); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, sans-serif;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== NAV ===== */
header.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo {
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 22px;
  color: var(--red); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap;
}
.logo span { color: var(--ink); }
nav.links { display: flex; gap: 32px; font-size: 15px; font-weight: 600; }
nav.links a { text-decoration: none; color: var(--ink-soft); transition: color .15s; }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--red); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: var(--radius); text-decoration: none;
  border: none; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.btn:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.menu-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 26px; height: 26px; stroke: var(--ink); }

/* ===== PAGE HERO (banner simple, para páginas internas) ===== */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow-tag {
  display: inline-block; background: var(--red); color: #fff; font-weight: 700;
  font-size: 13px; padding: 6px 12px; border-radius: var(--radius); margin-bottom: 16px;
}
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); max-width: 700px; }
.page-hero p.lead { color: var(--ink-soft); font-size: 17px; max-width: 560px; margin-top: 16px; line-height: 1.55; }

/* ===== HOME HERO (foto grande) ===== */
.hero { position: relative; min-height: 620px; display: flex; align-items: flex-end; background: #000; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.35) 45%, rgba(10,8,6,.92) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 48px 24px 64px; width: 100%; }
.hero-content h1 { color: #fff; font-size: clamp(38px, 6vw, 68px); max-width: 760px; }
.hero-content p.lead { color: #EDEAE4; font-size: 18px; max-width: 520px; margin-top: 20px; line-height: 1.5; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-ctas .btn-ghost { border-color: #fff; color: #fff; }
.hero-ctas .btn-ghost:hover { background: #fff; color: var(--ink); }

/* ===== TRUST BAR ===== */
.trust { background: var(--paper-raised); border-bottom: 1px solid var(--line); }
.trust-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.trust-item { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.trust-item strong { display: block; font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 22px; color: var(--ink); }
[data-count] { display: inline-block; }

/* ===== SECTION ===== */
.section { padding: 80px 0; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--ink-soft); font-size: 17px; margin-top: 14px; line-height: 1.55; }

/* ===== HOME: teaser cards linking to other pages ===== */
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.teaser-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); display: block; transition: transform .15s;
}
.teaser-card:hover { transform: translateY(-2px); }
.teaser-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.teaser-card .body { padding: 22px; }
.teaser-card .label { color: var(--red); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.teaser-card h3 { font-size: 20px; margin-bottom: 8px; }
.teaser-card p { color: var(--ink-soft); font-size: 14px; margin: 0; line-height: 1.5; }
.teaser-card .arrow { color: var(--red); font-weight: 700; font-size: 14px; margin-top: 14px; display: inline-block; }

/* ===== PILLARS (servicios.html) ===== */
.pillar { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar.reverse .pillar-media { order: 2; }
.pillar-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.pillar-label { color: var(--red); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.pillar h3 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }
.pillar p { color: var(--ink-soft); font-size: 16px; line-height: 1.6; max-width: 46ch; }
.pillar ul { margin: 20px 0 0; padding: 0; list-style: none; }
.pillar li { padding-left: 26px; position: relative; margin-bottom: 10px; font-size: 15px; color: var(--ink); }
.pillar li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 2px; background: var(--red); }
.pillar .btn { margin-top: 28px; }

/* ===== CATALOG (productos.html) ===== */
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.product-card .cat { font-size: 12px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.product-card h4 { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 19px; margin: 8px 0 4px; }
.product-card .spec { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.product-card .price { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 26px; color: var(--red); }
.catalog-note { margin-top: 28px; font-size: 14px; color: var(--ink-soft); }

/* ===== REVIEWS (opiniones.html) ===== */
.reviews { background: var(--card-tint); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card { background: var(--paper-raised); padding: 28px; border-radius: var(--radius); }
.stars { color: var(--gold); font-size: 16px; letter-spacing: 2px; margin-bottom: 14px; }
.review-card p { font-size: 15px; line-height: 1.6; color: var(--ink); margin-bottom: 16px; }
.review-name { font-weight: 700; font-size: 14px; }

/* ===== LOCATION (ubicacion.html) ===== */
.location { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.info-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .ic { flex-shrink: 0; width: 22px; height: 22px; color: var(--red); margin-top: 2px; }
.info-row h4 { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.info-row p { font-size: 15px; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.map-panel { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; height: 100%; }
.map-pin { width: 52px; height: 52px; background: var(--red); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.map-pin svg { transform: rotate(45deg); width: 22px; height: 22px; stroke: #fff; }
.map-panel h4 { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 19px; margin-bottom: 10px; }
.map-panel p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; margin-bottom: 24px; }

/* ===== CTA STRIP ===== */
.cta-strip { background: var(--ink); color: var(--paper); text-align: center; padding: 72px 24px; }
.cta-strip h2 { color: #fff; font-size: clamp(26px, 4.5vw, 38px); max-width: 700px; margin: 0 auto; }
.cta-strip p { color: #C9C3B8; font-size: 17px; margin: 16px auto 28px; max-width: 480px; }

/* ===== FOOTER ===== */
footer { padding: 44px 0 calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-inner .logo { font-size: 19px; }
.foot-links { display: flex; gap: 24px; font-size: 14px; color: var(--ink-soft); }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--red); }

/* ===== WHATSAPP FLOAT ===== */
.wa-float {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: 24px; z-index: 50;
  background: #25D366; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); text-decoration: none;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ===== BLOG LISTING ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); display: block; transition: transform .15s;
}
.blog-card:hover { transform: translateY(-2px); }
.blog-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.blog-card .body { padding: 22px; }
.blog-card .tag { color: var(--red); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.blog-card h3 { font-size: 19px; line-height: 1.25; margin-bottom: 10px; }
.blog-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin: 0; }
.blog-card .read-more { color: var(--red); font-weight: 700; font-size: 13px; margin-top: 14px; display: inline-block; }

/* ===== ARTICLE (post individual) ===== */
.article-hero { padding: 48px 0 0; }
.article-hero .tag { color: var(--red); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; display: block; }
.article-hero h1 { font-size: clamp(28px, 4.5vw, 44px); max-width: 780px; }
.article-hero .meta { color: var(--ink-soft); font-size: 14px; margin-top: 16px; }
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 32px 0; }
.article-body { max-width: 720px; font-size: 17px; line-height: 1.75; color: var(--ink); }
.article-body h2 { font-size: 26px; margin: 40px 0 16px; font-weight: 900; }
.article-body p { margin: 0 0 20px; }
.article-body ul { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-cta {
  background: var(--card-tint); border-radius: var(--radius); padding: 28px;
  margin: 40px 0; max-width: 720px;
}
.article-cta p { margin: 0 0 14px; font-weight: 600; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs { padding: 18px 0 0; font-size: 13px; color: var(--ink-soft); }
.breadcrumbs a { text-decoration: none; color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 600; }
.breadcrumbs .sep { margin: 0 6px; opacity: .5; }

/* ===== MOVIMIENTO: aparición al hacer scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.2,.65,.3,1), transform .6s cubic-bezier(.2,.65,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Nav link con subrayado animado */
nav.links a { position: relative; padding-bottom: 2px; }
nav.links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--red); transition: width .25s ease;
}
nav.links a:hover::after, nav.links a[aria-current="page"]::after { width: 100%; }

/* Hover con movimiento en tarjetas */
.teaser-card, .blog-card, .product-card, .review-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.teaser-card:hover, .blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(28,25,23,.08);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: 0 12px 24px rgba(213,38,44,.08);
}
.teaser-card img, .blog-card img { transition: transform .4s ease; }
.teaser-card:hover img, .blog-card:hover img { transform: scale(1.05); }

/* Botones con movimiento */
.btn { transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(213,38,44,.25); }
.btn:active { transform: translateY(0); }
.btn-ghost:hover { transform: translateY(-2px); }

/* Hero: entrada suave del contenido al cargar */
.hero-content > * { animation: heroFadeUp .8s cubic-bezier(.2,.65,.3,1) both; }
.hero-content h1 { animation-delay: .05s; }
.hero-content p.lead { animation-delay: .15s; }
.hero-content .hero-ctas { animation-delay: .25s; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-content > * { animation: none; }
}

/* Zoom lento continuo en la foto del hero */
.hero img { animation: heroZoom 18s ease-in-out infinite alternate; }
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .hero img { animation: none; }
}

/* WhatsApp float: pulso sutil para llamar la atención */
.wa-float { animation: waPulse 2.4s ease-in-out infinite; }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.5); }
  50% { box-shadow: 0 6px 20px rgba(0,0,0,.25), 0 0 0 10px rgba(37,211,102,0); }
}
.wa-float:hover { animation: none; transform: scale(1.08); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav.links, .nav-inner .btn-ghost { display: none; }
  .menu-toggle { display: block; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .pillar, .pillar.reverse { grid-template-columns: 1fr; }
  .pillar.reverse .pillar-media { order: 0; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .teaser-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .location { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
@media (max-width: 520px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .hero { min-height: 540px; }
}
