/* =============================================================
   TOM Y JERRY — Salón de fiestas infantiles
   Sistema: cream cálido + acentos "Tom" (marigold) / "Jerry" (teal)
   en tensión, motivo de firma "chase-dot" (persecución sutil).
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* surfaces */
  --bg:        #FFF8EC;
  --surface:   #FFFFFF;
  --surface-2: #FFF1DA;

  /* ink */
  --ink:       #2B2118;
  --ink-soft:  #5A4B3D;
  --ink-mute:  #8B7C6D;

  /* accents — "Tom" (cálido) vs "Jerry" (frío), en tensión */
  --cat:       #F2A63D;
  --cat-dark:  #D6862A;
  --cat-soft:  #FCE3B8;
  --mouse:     #0F8B8D;
  --mouse-dark:#0B6E70;
  --mouse-soft:#BFE6E4;
  --pop:       #E8496F;

  --whatsapp:  #25D366;

  --line:      rgba(43, 33, 24, 0.12);

  /* radius */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* easings */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* type */
  --font-display: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;

  /* shadows */
  --shadow-sm: 0 2px 10px rgba(43, 33, 24, 0.08);
  --shadow-md: 0 14px 34px -10px rgba(43, 33, 24, 0.22);
  --shadow-lg: 0 30px 60px -18px rgba(43, 33, 24, 0.28);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.01em;
}
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; }

::selection { background: var(--cat-soft); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--mouse);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.2rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: var(--radius-sm); font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.placeholder-mark {
  background: var(--cat-soft);
  color: var(--cat-dark);
  padding: 0 .3em;
  border-radius: 5px;
  font-style: italic;
  font-weight: 600;
}

/* =============================================================
   4. Typography
   ============================================================= */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--mouse-dark);
  margin-bottom: 0.9rem;
}
.kicker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cat);
  flex: none;
}

h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); margin-bottom: 0.4em; }

.section-note { color: var(--ink-soft); max-width: 46ch; }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform .4s var(--ease-soft), box-shadow .4s var(--ease-soft), background-color .3s var(--ease-out), color .3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-lg { padding: 1rem 1.9rem; font-size: 1.02rem; }
.btn-md { padding: 0.85rem 1.6rem; font-size: 0.95rem; }
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.88rem; }

.btn-cat { background: var(--cat); color: var(--ink); }
.btn-cat:hover { background: var(--cat-dark); box-shadow: var(--shadow-md); }

.btn-mouse { background: var(--mouse); color: var(--bg); }
.btn-mouse:hover { background: var(--mouse-dark); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }

.btn-paper { background: var(--surface); color: var(--ink); }
.btn-paper:hover { box-shadow: var(--shadow-lg); }

/* Trust chip / stars */
.trust-chip {
  display: inline-flex; align-items: center; gap: 0.6em;
  margin-top: 1.6rem;
  padding: 0.55rem 1rem;
  background: var(--surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 0.92rem;
}
.trust-stars { color: var(--cat); letter-spacing: 0.1em; font-size: 0.95em; }
.trust-stars--lg { font-size: 1.6rem; margin-block: 0.2rem 1rem; }

/* Cards ("Qué incluye") */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
  margin-top: 2.6rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  display: inline-flex;
  width: 52px; height: 52px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--cat-soft);
  color: var(--cat-dark);
  margin-bottom: 1.1rem;
}
.card:nth-child(even) .card-icon { background: var(--mouse-soft); color: var(--mouse-dark); }
.card-icon svg { width: 26px; height: 26px; }
.card p { color: var(--ink-soft); font-size: 0.96rem; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 2.6rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-end;
  padding: 1.1rem 1.3rem;
  overflow: hidden;
  isolation: isolate;
}
.gallery-item span {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.gallery-item::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  opacity: 0.16;
  background-image: radial-gradient(circle, #fff 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}
.gallery-item:nth-child(9n+1) { background: linear-gradient(135deg, var(--cat), var(--cat-dark)); }
.gallery-item:nth-child(9n+2) { background: linear-gradient(150deg, var(--mouse), var(--mouse-dark)); }
.gallery-item:nth-child(9n+3) { background: linear-gradient(120deg, var(--pop), var(--cat-dark)); }
.gallery-item:nth-child(9n+4) { background: linear-gradient(140deg, var(--mouse-dark), var(--pop)); }
.gallery-item:nth-child(9n+5) { background: linear-gradient(130deg, var(--cat-dark), var(--pop)); }
.gallery-item:nth-child(9n+6) { background: linear-gradient(150deg, var(--mouse), var(--cat)); }
.gallery-item:nth-child(9n+7) { background: linear-gradient(125deg, var(--pop), var(--mouse-dark)); }
.gallery-item:nth-child(9n+8) { background: linear-gradient(140deg, var(--cat), var(--mouse)); }
.gallery-item:nth-child(9n+9) { background: linear-gradient(160deg, var(--mouse-dark), var(--cat-dark)); }

/* Info list + hours table */
.info-list { margin: 1.6rem 0; }
.info-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.info-row dt { font-weight: 700; min-width: 8ch; }
.info-row dd a { color: var(--mouse-dark); font-weight: 600; }
.info-row dd a:hover { text-decoration: underline; }

.hours-table {
  width: 100%;
  margin: 1.6rem 0 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hours-table tr { background: var(--surface); }
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table tr.is-closed { color: var(--ink-mute); }
.hours-table tr.is-closed td { font-weight: 500; }
.hours-table tr:not(.is-closed) td { color: var(--mouse-dark); }

/* Map */
.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}
.map-embed { width: 100%; height: 100%; border: 0; }

/* =============================================================
   6. Sections
   ============================================================= */

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 248, 236, 0.85);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(43,33,24,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  white-space: nowrap;
}
.wordmark-tom { color: var(--cat-dark); }
.wordmark-y { color: var(--ink-mute); font-weight: 500; font-size: 0.85em; }
.wordmark-jerry { color: var(--mouse-dark); }

.nav-links { display: none; align-items: center; gap: 1.8rem; font-weight: 600; font-size: 0.95rem; }
.nav-links a { position: relative; padding-block: 0.2rem; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--cat);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
}

/* Hero */
.hero {
  position: relative;
  overflow: clip;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding-block: 6rem 4rem;
}
.hero-blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.hero-blob--cat {
  width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  background: var(--cat-soft);
  top: -12%; right: -10%;
}
.hero-blob--mouse {
  width: 38vw; height: 38vw; max-width: 460px; max-height: 460px;
  background: var(--mouse-soft);
  bottom: -14%; left: -8%;
}

.chase-motif {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.chase-motif--hero {
  inset: 0; margin: auto;
  width: min(85vw, 640px); height: min(85vw, 640px);
  opacity: 0.9;
}
.chase-path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 3 15;
  stroke-linecap: round;
}
.chase-dot--cat { fill: var(--cat); }
.chase-dot--mouse { fill: var(--mouse); }

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 780px; margin-inline: auto; }
.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  max-width: 16ch;
  margin-inline: auto;
}
.hero-title em { font-style: normal; color: var(--mouse-dark); }
.hero-sub {
  margin-top: 1.3rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-inline: auto;
}
.hero-actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

/* Reveal-on-scroll (universal) */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* Generic sections */
.section { padding-block: clamp(4rem, 9vw, 7rem); position: relative; }
.section-tinted { background: var(--surface-2); }
.section-head { max-width: 640px; }
.section-head--center { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head--center .section-note { margin-inline: auto; }

.section-split {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 860px) {
  .section-split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .section-split--map { align-items: center; }
}
.section-body p + p { margin-top: 1em; }
.section-body { color: var(--ink-soft); font-size: 1.02rem; }

/* Confianza */
.confianza-card {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  box-shadow: var(--shadow-md);
}
.confianza-score {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 800;
  color: var(--cat-dark);
  line-height: 1;
}
.confianza-copy { color: var(--ink-soft); }

/* CTA final */
.cta-final {
  position: relative;
  overflow: clip;
  background: linear-gradient(135deg, var(--mouse-dark), var(--mouse));
  color: var(--bg);
  text-align: center;
}
.cta-final .chase-motif--divider {
  inset: 0; margin: auto;
  width: min(90vw, 720px); height: min(90vw, 720px);
  opacity: 0.5;
}
.cta-final .chase-path { stroke: rgba(255,248,236,0.35); }
.cta-final-inner { position: relative; z-index: 1; max-width: 640px; margin-inline: auto; }
.cta-final h2 { color: var(--bg); }
.cta-final p { color: rgba(255,248,236,0.85); margin-bottom: 2rem; font-size: 1.05rem; }

/* Footer */
.footer { background: var(--ink); color: var(--bg); padding-block: 3rem; }
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  text-align: center;
}
.footer .wordmark-tom { color: var(--cat); }
.footer .wordmark-y { color: rgba(255,248,236,0.5); }
.footer .wordmark-jerry { color: var(--mouse-soft); }
.footer-info { color: rgba(255,248,236,0.75); font-size: 0.92rem; }
.footer-info a { text-decoration: underline; text-underline-offset: 2px; }
.footer-credit { color: rgba(255,248,236,0.5); font-size: 0.82rem; margin-top: 0.6rem; }

/* Floating WhatsApp button */
.whatsapp-float {
  position: fixed;
  right: clamp(1rem, 4vw, 1.8rem);
  bottom: clamp(1rem, 4vw, 1.8rem);
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
  transition: transform .4s var(--ease-bounce), box-shadow .4s var(--ease-out);
  animation: floatIn .6s var(--ease-bounce) .4s both;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 16px 34px rgba(37, 211, 102, 0.55); }

@keyframes floatIn {
  from { opacity: 0; transform: scale(0.4) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* =============================================================
   7. Responsive
   ============================================================= */
section[id] { scroll-margin-top: 84px; }

@media (min-width: 540px) {
  .hero-actions { flex-wrap: nowrap; }
}

@media (min-width: 720px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .container { padding-inline: 2.5rem; }
}

/* =============================================================
   8. Reduced motion — only the truly intrusive is gated
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .whatsapp-float { animation: none; }
  /* Deliberately NOT disabled: chase-dot loop, card hover lift,
     scroll reveals, count-up — all slow/small/functional. */
}
