/* ==========================================================
   paginawebzaragoza.es — Zonsai
   Sistema de diseño
   ========================================================== */

:root {
  /* Colores Zonsai */
  --z-blue: #1F8FFF;
  --z-magenta: #FF2E7E;
  --z-yellow: #FFD43B;
  --z-green: #1FD37A;
  --z-navy: #0E1230;
  --z-navy-2: #161a3d;

  /* Bases */
  --paper: #FAFAF7;
  --paper-2: #F2F1EB;
  --ink: #0A0B14;
  --ink-2: #14162A;
  --line: rgba(14, 18, 48, 0.10);
  --line-dark: rgba(255, 255, 255, 0.08);
  --muted: rgba(14, 18, 48, 0.62);
  --muted-dark: rgba(255, 255, 255, 0.62);

  /* Accent global (controlable por tweak) */
  --accent: var(--z-blue);

  /* Densidad */
  --section-y: clamp(96px, 12vw, 200px);
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Geist', 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Tipografía */
.display-1 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(56px, 9.2vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.display-2 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(44px, 6.6vw, 120px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.display-3 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 80px);
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.eyebrow {
  font-family: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.lead {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  max-width: 56ch;
}
.body {
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Sección base */
section {
  position: relative;
  padding: var(--section-y) 0;
}
section.dark {
  background: var(--ink);
  color: white;
}
section.paper {
  background: var(--paper);
  color: var(--ink);
}
section.paper-2 {
  background: var(--paper-2);
  color: var(--ink);
}
section.ink-2 {
  background: var(--ink-2);
  color: white;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all .25s cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: white;
}
.btn-primary:hover { transform: translateY(-1px); background: var(--accent); color: white; }
section.dark .btn-primary { background: white; color: var(--ink); }
section.dark .btn-primary:hover { background: var(--accent); color: white; }

.btn-ghost {
  background: transparent;
  color: inherit;
  padding: 14px 0;
}
.btn-ghost .arrow { transition: transform .25s; }
.btn-ghost:hover .arrow { transform: translateX(4px); }

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

/* Botón magenta — CTA principal Zonsai */
.btn-magenta {
  background: var(--z-magenta);
  color: white;
}
.btn-magenta:hover {
  transform: translateY(-1px);
  background: #ff5093;
  color: white;
  box-shadow: 0 8px 32px rgba(255,46,126,0.35);
}

/* Botón WhatsApp — CTA secundario */
.btn-wa {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-wa:hover {
  background: var(--z-green);
  color: var(--ink);
  border-color: var(--z-green);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(31,211,122,0.28);
}

/* Logo en nav */
.z-nav-logo {
  height: 26px;
  width: auto;
}

/* Botón: estado loading */
.btn-loading { opacity: 0.7; cursor: not-allowed; }
.btn-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Campo checkbox legal */
.field-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.field-check input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--z-blue);
  cursor: pointer;
}
.field-check .field-label {
  font-size: 13px;
  line-height: 1.5;
}

/* Halos / glows */
.halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: blur(80px);
  opacity: .55;
  z-index: 0;
}

/* Animaciones de entrada */
[data-anim] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
[data-anim].in {
  opacity: 1;
  transform: none;
}
[data-anim-delay="1"] { transition-delay: .08s; }
[data-anim-delay="2"] { transition-delay: .16s; }
[data-anim-delay="3"] { transition-delay: .24s; }
[data-anim-delay="4"] { transition-delay: .32s; }
[data-anim-delay="5"] { transition-delay: .40s; }

html.no-anim [data-anim] { opacity: 1; transform: none; transition: none; }

/* Densidad: aire */
html[data-density="comfy"] { --section-y: clamp(120px, 15vw, 240px); }
html[data-density="dense"] { --section-y: clamp(72px, 9vw, 140px); }

/* Modos: solo claro / solo oscuro / alternado (default) */
html[data-mode="light"] section.dark { background: var(--paper); color: var(--ink); }
html[data-mode="light"] section.ink-2 { background: var(--paper-2); color: var(--ink); }
html[data-mode="light"] section.dark .btn-primary { background: var(--ink); color: white; }

html[data-mode="dark"] section.paper { background: var(--ink); color: white; }
html[data-mode="dark"] section.paper-2 { background: var(--ink-2); color: white; }
html[data-mode="dark"] body { background: var(--ink); }
html[data-mode="dark"] section.paper .btn-primary { background: white; color: var(--ink); }

/* Color line stack — los 4 colores como elemento de sistema */
.color-stack {
  display: inline-flex;
  gap: 6px;
}
.color-stack span {
  width: 28px; height: 4px; border-radius: 2px;
}
.color-stack .c1 { background: var(--z-blue); }
.color-stack .c2 { background: var(--z-magenta); }
.color-stack .c3 { background: var(--z-yellow); }
.color-stack .c4 { background: var(--z-green); }

/* Chips / etiquetas */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
}
section.dark .chip,
section.ink-2 .chip {
  border-color: var(--line-dark);
  background: rgba(255,255,255,0.04);
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--z-green);
  box-shadow: 0 0 0 3px rgba(31, 211, 122, 0.18);
}

/* Reglas finas */
.rule {
  height: 1px; background: var(--line); width: 100%;
}
section.dark .rule { background: var(--line-dark); }

/* Grid utilities */
.grid { display: grid; gap: var(--gutter); }
.row { display: flex; gap: var(--gutter); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.scroll-indicator::before {
  content: '';
  width: 1px; height: 38px;
  background: linear-gradient(to bottom, transparent, currentColor, transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Mockups: pieza base */
.window {
  border-radius: 14px;
  overflow: hidden;
  background: white;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 80px -20px rgba(0,0,0,0.45),
    0 10px 30px -10px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
}
.window .titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #f3f3ee;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.window .titlebar .dots {
  display: flex; gap: 6px;
}
.window .titlebar .dots i {
  width: 10px; height: 10px; border-radius: 50%; display: block;
  background: rgba(0,0,0,0.18);
}
.window .titlebar .url {
  flex: 1;
  text-align: center;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  color: rgba(0,0,0,0.5);
  letter-spacing: 0.02em;
}

/* Marquee */
.marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 80px;
  animation: marquee 40s linear infinite;
  width: max-content;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Logo zonsai inline */
.zlogo {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700;
  font-family: 'Geist', sans-serif;
  letter-spacing: -0.02em;
}

/* Section number indicator */
.section-num {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.5;
}

/* Number-large */
.bignum {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(120px, 18vw, 280px);
  line-height: 0.85;
  letter-spacing: -0.06em;
}

/* gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--z-blue) 0%, var(--z-magenta) 35%, var(--z-yellow) 65%, var(--z-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Responsive */
@media (max-width: 860px) {
  .row { flex-direction: column; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 861px) {
  .show-mobile { display: none !important; }
}
