/* ==========================================================================
   Don Chambas Website — estilos locales del sitio
   Orden de carga: tokens.css (sync brand) → componentes.css (sync brand) →
   site.css (este archivo, lo único que se edita a mano).
   Regla C3: solo tokens (--dc-*, --font-*); nada de font-family ni hex de
   marca directos.
   ========================================================================== */

/* Next.js inyecta las fuentes como variables; se cablean a los tokens */
:root {
  --font-display: var(--font-display-next, "Space Grotesk", -apple-system, sans-serif);
  --font-script:  var(--font-script-next, "Caveat", cursive);
  --font-body:    var(--font-body-next, "Inter", -apple-system, sans-serif);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--dc-primary); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--dc-primary-hover); }
a.plain { border-bottom: none; }

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

code, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: color-mix(in srgb, var(--dc-primary) 6%, transparent);
  padding: 1px 6px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.wrap.tight { max-width: var(--max-w-tight); }

/* ---------- Top brand bar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--dc-primary);
  color: var(--ink-on-dark);
  border-bottom: 4px solid var(--dc-accent);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-4) 0;
  gap: var(--sp-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
/* Wordmark "solo nombre" (amarillo + sombra blanca) en el nav.
   max-width: none anula el `img { max-width: 100% }` global, que en un
   contenedor apretado recortaba el ancho y distorsionaba la proporción.
   El alto manda; el ancho es automático para conservar el aspect ratio. */
.brand .brand-logo {
  width: auto;
  max-width: none;
  height: 48px;
  display: block;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .brand .brand-logo { height: 42px; }
}
.nav-links {
  display: flex;
  gap: var(--sp-6);
  font-size: var(--fs-sm);
}
.nav-links a {
  color: var(--dc-accent);
  font-weight: 600;
  opacity: 1;
  border-bottom: none;
}
.nav-links a:hover { color: var(--dc-neutral-0); }

/* Botón hamburguesa: oculto en desktop, visible en móvil */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-bar {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: var(--dc-accent);
}

/* En móvil los links viven SOLO dentro del menú desplegable (hamburguesa),
   fuera del bar, para no robarle ancho al wordmark. Desktop sin cambios. */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--sp-2) var(--sp-4);
    background: var(--dc-primary);
    border-bottom: 4px solid var(--dc-accent);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: var(--sp-3) 0;
    font-size: var(--fs-md);
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--dc-primary);
  color: var(--ink-on-dark);
  padding: var(--sp-20) 0 var(--sp-16);
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  background: var(--dc-accent);
  color: var(--dc-primary-deep);
  padding: 5px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-5);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: 0;
  margin: 0 0 var(--sp-4);
  max-width: 760px;
}
/* Acento ámbar: permitido como texto solo sobre navy (6.7:1) */
.hero h1 .accent { color: var(--dc-accent); }
@media (max-width: 720px) {
  .hero { padding: var(--sp-12) 0 var(--sp-10); }
  .hero h1 { font-size: var(--fs-2xl); }
}

/* Presentation-slide hero: centered, altura natural para que la tira de
   personajes nunca se corte en el fold */
.hero.center {
  min-height: auto;
  display: flex;
  align-items: center;
  text-align: center;
  padding-bottom: var(--sp-12);
}
.hero.center .wrap { width: 100%; }
.hero.center h1 {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Hero lockup (logo brush oficial) ---------- */
.hero-lockup {
  display: block;
  width: min(560px, 84vw);
  height: auto;
  margin: 0 auto var(--sp-8);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}
@media (max-width: 720px) {
  .hero-lockup { margin-bottom: var(--sp-6); }
}

/* ---------- Mascota Don Chambas junto al headline ---------- */
.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--sp-5), 4vw, var(--sp-10));
}
.hero-row h1 {
  text-align: left;
  margin: 0;
}
.hero-mascota {
  flex-shrink: 0;
  width: clamp(170px, 24vw, 260px);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25));
}
@media (max-width: 720px) {
  .hero-row {
    flex-direction: column;
    gap: var(--sp-5);
  }
  .hero-row h1 { text-align: center; }
  .hero-mascota { width: clamp(150px, 42vw, 190px); }
}

/* ---------- Nota manuscrita del hero ---------- */
/* Script solo como acento de marketing (manual §2.3); ámbar sobre navy ✓ */
.hero-note {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: clamp(var(--fs-xl), 3vw, var(--fs-2xl));
  line-height: 1.2;
  color: var(--dc-accent);
  margin: var(--sp-8) auto 0;
  max-width: 760px;
  transform: rotate(-1deg);
}
@media (max-width: 720px) {
  .hero-note { margin-top: var(--sp-6); }
}

/* ---------- CTA del hero (uno solo, manual §7.4) ---------- */
.hero-ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--sp-8);
}
.hero-ctas .btn {
  font-size: var(--fs-base);
  height: 48px;
  padding: 0 var(--sp-8);
}

/* ---------- Sparkles decorativos del hero ---------- */
.hero-sparkle {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
  animation: sparkle-twinkle 3.2s var(--ease-in-out) infinite;
}
.hero-sparkle.s1 { top: 14%; left: 12%; animation-delay: 0s; }
.hero-sparkle.s2 { top: 22%; right: 14%; animation-delay: 0.8s; }
.hero-sparkle.s3 { bottom: 26%; left: 18%; animation-delay: 1.6s; }
@media (max-width: 720px) {
  .hero-sparkle.s1 { top: 8%; left: 6%; }
  .hero-sparkle.s2 { top: 12%; right: 7%; }
  .hero-sparkle.s3 { display: none; }
}
@keyframes sparkle-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
  50%      { transform: scale(1.18) rotate(8deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-sparkle { animation: none; }
}

/* ---------- Tira de personajes ---------- */
.characters-strip {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 2vw, 28px);
  width: 100%;
}
.characters-strip img {
  height: auto;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}
.characters-strip.lg img { height: clamp(72px, 13vw, 150px); }
.characters-strip.sm img { height: clamp(48px, 8vw, 84px); filter: none; }

/* Banda inferior del hero, como las piezas de marca */
.hero-characters {
  margin-top: var(--sp-10);
}
@media (max-width: 720px) {
  .hero-characters { margin-top: var(--sp-8); gap: 4px; }
  /* en móvil mostramos 3 personajes para que no se apriete */
  .hero-characters img:nth-child(4),
  .hero-characters img:nth-child(5) { display: none; }
}

/* Tira del crew dentro del page-hero de páginas interiores */
.page-hero-characters {
  margin-top: var(--sp-8);
  justify-content: flex-start;
}
@media (max-width: 560px) {
  .page-hero-characters img:nth-child(4),
  .page-hero-characters img:nth-child(5) { display: none; }
}

/* Footer: tira sutil sobre fondo navy profundo */
.footer-characters {
  margin-bottom: var(--sp-10);
  opacity: 0.96;
}
@media (max-width: 560px) {
  .footer-characters img:nth-child(4),
  .footer-characters img:nth-child(5) { display: none; }
}

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--dc-primary);
  color: var(--ink-on-dark);
  padding: var(--sp-12) 0 var(--sp-10);
  border-bottom: 4px solid var(--dc-accent);
}
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--dc-neutral-0);
  margin: var(--sp-4) 0 var(--sp-4);
  max-width: 760px;
}
.page-hero .lead {
  font-size: var(--fs-xl);
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 0;
}
@media (max-width: 720px) {
  .page-hero { padding: var(--sp-10) 0 var(--sp-8); }
  .page-hero h1 { font-size: var(--fs-3xl); }
  .page-hero .lead { font-size: var(--fs-lg); }
}

/* ---------- Watermark de marca (fondo sutil reutilizable) ---------- */
.has-watermark {
  position: relative;
  overflow: hidden;
}
/* el contenido real (wrap) queda por encima del watermark */
.has-watermark > .wrap {
  position: relative;
  z-index: 1;
}
.watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  background-repeat: repeat;
  background-position: center;
  background-size: 300px auto;
}
/* Opacidad 3–6 % en web (manual §2.4) */
.watermark--dark {
  /* tile blanco para fondos navy/oscuros */
  background-image: url(/images/brand/watermark-tile-blanco.png);
  opacity: 0.04;
}
.watermark--light {
  /* tile navy para fondos claros */
  background-image: url(/images/brand/watermark-tile-navy.png);
  opacity: 0.04;
}
@media (max-width: 720px) {
  .watermark { background-size: 220px auto; }
}

/* ---------- Sections ---------- */
section {
  padding: var(--sp-12) 0;
  border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: none; }
section.alt { background: var(--dc-neutral-0); }

.section-tag {
  color: var(--dc-primary);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
h2 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: 0;
  line-height: var(--lh-snug);
  margin: 0 0 var(--sp-3);
  max-width: 800px;
  color: var(--dc-primary);
}
.lead {
  font-size: var(--fs-lg);
  color: var(--ink-dim);
  max-width: 760px;
  margin: 0 0 var(--sp-5);
}
h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 var(--sp-2);
  color: var(--dc-primary);
}
h4 {
  font-size: var(--fs-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dc-primary);
  margin: 0 0 var(--sp-3);
}
@media (max-width: 720px) {
  section { padding: var(--sp-10) 0; }
  h2 { font-size: var(--fs-2xl); }
}

/* ---------- Cards (override del .card de componentes.css) ---------- */
.card {
  width: 100%;
  padding: var(--sp-6);
}
.card p { margin: var(--sp-2) 0 0; color: var(--ink-dim); font-size: var(--fs-base); }

/* ---------- CTA / Quote ---------- */
.cta-final {
  background: var(--dc-primary);
  color: var(--ink-on-dark);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  margin-top: var(--sp-6);
  border: 1px solid var(--dc-primary-deep);
}
.cta-final h3 { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); color: var(--dc-neutral-0); }
.cta-final p { color: rgba(255, 255, 255, 0.85); }
.cta-final .accent { color: var(--dc-accent); }

.quote {
  border-left: 4px solid var(--dc-accent);
  padding: var(--sp-3) var(--sp-6);
  color: var(--ink);
  font-style: italic;
  font-size: var(--fs-lg);
  margin: var(--sp-6) 0;
  background: color-mix(in srgb, var(--dc-accent) 6%, transparent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.quote cite { display: block; font-style: normal; color: var(--ink-dim); font-size: var(--fs-sm); margin-top: var(--sp-2); }

/* ---------- Icon bullets (áreas, fricciones en lista) ---------- */
/* Ámbar solo como fondo gráfico del chip; el ícono va en navy (contraste) */
.icon-bullets {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.icon-bullets li {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.icon-bullets .ic {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--dc-accent) 14%, transparent);
  color: var(--dc-primary);
}
.icon-bullets.pain .ic {
  background: color-mix(in srgb, var(--dc-error) 12%, transparent);
  color: var(--dc-error);
}
.icon-bullets b {
  display: block;
  color: var(--dc-primary);
  font-weight: 700;
}
.icon-bullets p {
  margin: 2px 0 0;
  color: var(--ink-dim);
  font-size: var(--fs-sm);
}

/* ---------- Contact methods (con íconos) ---------- */
.contact-methods {
  list-style: none;
  padding: 0;
  margin: var(--sp-8) 0 0;
  display: grid;
  gap: var(--sp-4);
}
.contact-methods li {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.contact-methods .ic {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--dc-accent) 14%, transparent);
  color: var(--dc-primary);
}
.contact-methods b {
  display: block;
  color: var(--dc-primary);
  font-weight: 700;
  margin-bottom: 2px;
}
.contact-methods .method-body { color: var(--ink-dim); font-size: var(--fs-base); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  margin-top: var(--sp-10);
}
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Legal pages ---------- */
.legal-body {
  max-width: var(--max-w-tight);
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-6);
}
.legal-body h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  color: var(--dc-primary);
  margin-bottom: var(--sp-3);
}
.legal-body .last-updated {
  color: var(--ink-dim);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-10);
}
.legal-body .banner {
  background: color-mix(in srgb, var(--dc-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--dc-accent) 40%, transparent);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--dc-primary-deep);
  margin-bottom: var(--sp-10);
}
.legal-body h2 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-3);
  color: var(--dc-primary);
}
.legal-body h3 {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
}
.legal-body p, .legal-body li {
  color: var(--ink-dim);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-4);
}
.legal-body ul {
  padding-left: var(--sp-6);
}

/* ---------- Footer ---------- */
footer {
  position: relative;
  padding: var(--sp-12) 0 var(--sp-12);
  background: var(--dc-primary-deep);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  border-top: 4px solid var(--dc-accent);
}
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
footer p { margin: var(--sp-1) 0; }
footer .footer-wordmark { width: 220px; max-width: 60vw; height: auto; }
footer .footer-brand { min-width: 220px; }
footer .footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
  text-align: right;
}
footer .footer-links > a {
  color: var(--dc-neutral-0);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  border-bottom: none;
}
footer .footer-links > a:hover { color: var(--dc-accent); }
footer .footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
footer .footer-legal {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: var(--sp-3);
}
footer .footer-legal a {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  border-bottom: 1px solid currentColor;
}
footer .footer-legal a:hover { color: var(--dc-accent); }
@media (max-width: 720px) {
  footer .wrap { justify-content: center; text-align: center; }
  footer .footer-brand { min-width: 0; }
  footer .footer-wordmark { margin-left: auto; margin-right: auto; }
  footer .footer-links { align-items: center; text-align: center; width: 100%; }
  footer .footer-legal { justify-content: center; }
}
