/* =============================================================
   Agencia Trazo — styles.css
   Archivo único, organizado por secciones. Sin preprocesador.
   ============================================================= */

/* El atributo [hidden] siempre gana, pase lo que pase — si algún
   componente le pone su propio display (grid, flex, etc.), sin esto
   esa regla puede ganarle a [hidden] por especificidad y el elemento
   "escondido" se ve igual. Con !important queda resuelto para
   siempre en todo el sitio, sin tener que acordarse de esto cada vez. */
[hidden] { display: none !important; }

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f3f8f7;
  --bg-soft: #e9f3f1;
  --paper: #ffffff;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 30px 60px -30px rgba(15, 42, 44, 0.28);

  --ink: #0f2a2c;
  --ink-soft: #33565a;
  --ink-mute: #62807f;
  --cream: #f6fbfa;

  --accent: #0e8f7a;
  --accent-2: #2f6fed;
  --accent-soft: rgba(14, 143, 122, 0.12);
  --accent-2-soft: rgba(47, 111, 237, 0.12);
  --line: rgba(15, 42, 44, 0.12);
  --line-strong: rgba(15, 42, 44, 0.22);

  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;

  --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);

  --display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  padding-bottom: 4.75rem; /* deja espacio para el cart-bar fijo */
}

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(--display);
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

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

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass-card { background: rgba(255, 255, 255, 0.92); }
}

/* Animación al hacer scroll: el elemento aparece con un pequeño
   desplazamiento hacia arriba la primera vez que entra en pantalla, y
   se queda quieto ahí (initReveals() en main.js no vuelve a tocarlo).
   Al recargar la página, el DOM vuelve a su estado inicial y se repite
   al volver a hacer scroll. Se aplica a las cards (packs, extras,
   pasos, pilares — vía atributo data-reveal en el HTML) y también, de
   forma automática, a los bloques de texto de cada sección. */
[data-reveal],
.hero-copy,
.section-kicker,
.section-title,
.section-lead {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed,
.hero-copy.is-revealed,
.section-kicker.is-revealed,
.section-title.is-revealed,
.section-lead.is-revealed { opacity: 1; transform: none; }

/* "Cómo funciona" y "Extras" — las cajas entran una por una desde la
   derecha, como si salieran del borde de la pantalla, en vez del fade
   hacia arriba genérico de las demás cards. Más lento y con más
   recorrido que el reveal genérico para que se note bien. El
   el overflow-x:hidden va en la SECCIÓN (no en .steps/.extras-grid
   directamente) para no interferir con el IntersectionObserver que
   detecta cuándo cada caja entra en pantalla. */
#como-funciona, #extras { overflow-x: hidden; }
.steps .step-card,
.extras-grid .extra-card {
  transform: translateX(110px);
  transition-duration: 1.1s;
}
.steps .step-card.is-revealed,
.extras-grid .extra-card.is-revealed { transform: none; }

/* "Cómo funciona" son siempre 4 cajas — un retraso distinto para cada
   una, de la primera a la última. */
.steps .step-card:nth-child(1) { transition-delay: 0s; }
.steps .step-card:nth-child(2) { transition-delay: .22s; }
.steps .step-card:nth-child(3) { transition-delay: .44s; }
.steps .step-card:nth-child(4) { transition-delay: .66s; }

/* Extras son muchas cajas en filas — el retraso se repite cada 3, así
   cada fila entra de a una (izquierda a derecha) sin que la espera se
   acumule fila tras fila. */
.extras-grid .extra-card:nth-child(3n+1) { transition-delay: 0s; }
.extras-grid .extra-card:nth-child(3n+2) { transition-delay: .22s; }
.extras-grid .extra-card:nth-child(3n+3) { transition-delay: .44s; }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker, .section-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans);
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin-top: .5rem;
  max-width: 24ch;
}
.section-lead {
  margin-top: .9rem;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .96rem;
  white-space: nowrap;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(14, 143, 122, 0.55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -10px rgba(14, 143, 122, 0.6); }
.btn-primary:active { transform: translateY(-1px); transition-duration: .12s; }
.btn-primary:disabled {
  opacity: .5; box-shadow: none; cursor: not-allowed; transform: none;
}
.btn-ghost {
  background: rgba(15, 42, 44, 0.05);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(15, 42, 44, 0.09); transform: translateY(-2px); }
.btn-sm { padding: .6rem 1.1rem; font-size: .88rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner { display: inline-flex; align-items: center; justify-content: center; gap: inherit; will-change: transform; transition: transform .8s var(--ease-soft); }

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  padding-block: 1.1rem;
  /* Sólido siempre — antes era transparente arriba de todo y solo se
     ponía opaco al hacer scroll (clase .is-scrolled). Ahora el fondo
     va acá en la regla base, así se ve igual desde que carga la página. */
  background: rgba(243, 248, 247, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .3s var(--ease-out);
}
.nav.is-scrolled {
  /* Solo queda este pequeño achique al hacer scroll — el fondo sólido
     ya no depende de esta clase. */
  padding-block: .7rem;
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; }
.nav-logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  color: var(--ink);
}
.nav-logo-mark { color: var(--accent); display: inline-flex; }
.nav-logo-suffix { color: var(--accent); }
.nav-links { display: none; align-items: center; gap: 1.75rem; margin-inline: auto; }
.nav-link { position: relative; font-weight: 500; font-size: .94rem; padding-block: .3rem; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-toggle {
  margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; gap: 5px;
  border-radius: 10px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .3s; }

.mobile-nav {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(9, 27, 28, 0.97);
  color: var(--cream);
  display: grid; place-items: center; gap: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.mobile-nav[aria-hidden="false"] { clip-path: inset(0); }
.mobile-nav nav { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.mobile-nav a { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.nav-close { position: absolute; top: 1.5rem; right: 1.5rem; font-size: 1.4rem; color: var(--cream); width: 44px; height: 44px; }
html.nav-open { overflow: hidden; }

/* --- Forms --- */
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 540px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { position: relative; margin-bottom: 1.1rem; min-width: 0; }
.field input, .field textarea {
  width: 100%; padding: 1.35rem 1rem .55rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7); color: inherit; font: inherit; resize: vertical;
  transition: border-color .25s var(--ease-out), background-color .25s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); background: #fff; }
.field label {
  position: absolute; left: 1rem; top: 1.05rem; pointer-events: none;
  color: var(--ink-mute); transition: all .22s var(--ease-out);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: .45rem; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}

/* Select fields use a static label above (no floating-label trick —
   <select> has no placeholder state to key off). */
.field-select { position: static; display: flex; flex-direction: column; gap: .4rem; }
.field-select label {
  position: static; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
}
.field-select select {
  width: 100%; padding: .95rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7); color: inherit; font: inherit;
  transition: border-color .25s var(--ease-out), background-color .25s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5l5 5 5-5' stroke='%2362807f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.field-select select:focus { border-color: var(--accent); background-color: #fff; }
.field-select select:invalid { color: var(--ink-mute); }
.form-warning {
  background: rgba(217, 88, 55, 0.12); color: #a4401f; border: 1px solid rgba(217, 88, 55, 0.3);
  padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 1rem;
}
.form-fineprint { margin-top: .9rem; font-size: .82rem; color: var(--ink-mute); text-align: center; }

/* =============================================================
   6. Sections
   ============================================================= */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-tint { background: var(--bg-soft); }

/* --- Hero --- */
.hero {
  position: relative;
  overflow: clip;
  padding-top: clamp(7.5rem, 14vw, 10rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  min-height: 100svh;
  display: flex;
  align-items: center;
}
/* Foto de fondo del hero — MAS ATRAS que el mesh de color y el
   degradado de marca. El texto queda sobre una zona sólida (limpia,
   sin foto detrás — igual que el diseño original) y la foto se nota
   principalmente del lado del mockup, con una transición suave entre
   ambas. Cambia el archivo en assets/hero-bg/hero-bg.jpg para usar
   otra imagen. */
.hero-bg {
  position: absolute; inset: -6%; z-index: -3;
  background-image: url('assets/hero-bg/hero-bg.jpg');
  background-size: cover;
  background-position: center 32%;
  filter: blur(5px) saturate(85%) brightness(1.08) contrast(0.95);
  transform: scale(1.04);
}
.hero-bg-tint {
  /* Móvil: el hero es una sola columna apilada (texto arriba, mockup
     abajo) — sólido detrás del texto, se abre recién hacia el final,
     donde está el mockup. */
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg,
    var(--bg) 0%,
    var(--bg) 52%,
    rgba(243, 248, 247, 0.55) 78%,
    rgba(243, 248, 247, 0.3) 100%);
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: -1;
  background:
    radial-gradient(42% 38% at 18% 22%, rgba(14, 143, 122, 0.28), transparent 65%),
    radial-gradient(46% 40% at 82% 18%, rgba(47, 111, 237, 0.22), transparent 65%),
    radial-gradient(50% 45% at 60% 92%, rgba(14, 143, 122, 0.16), transparent 70%),
    transparent;
  filter: blur(60px) saturate(130%);
  animation: meshDrift 26s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(6deg); }
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-title { font-size: clamp(2.2rem, 5.4vw, 3.6rem); max-width: 15ch; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { margin-top: 1.3rem; font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem .6rem;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
  text-align: center;
}
.stats-section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.stats-full { margin-top: 0; }
@supports (container-type: inline-size) { .stats { container-type: inline-size; } }
.stat { min-width: 0; }
.stat-value {
  display: block;
  font-family: var(--display); font-weight: 700; color: var(--ink);
  font-size: clamp(0.95rem, 3vw, 1.6rem);
  text-wrap: balance;
}
@supports (container-type: inline-size) {
  .stat-value { font-size: clamp(0.9rem, 7.5cqi, 1.6rem); }
}
.stat-label { font-size: .76rem; color: var(--ink-mute); margin-top: .3rem; line-height: 1.3; }

.hero-visual { position: relative; perspective: 1200px; animation: heroVisualDrift 12s ease-in-out infinite; }
.hero-visual::before {
  content: ""; position: absolute; inset: -14% -10%; z-index: -1;
  background:
    radial-gradient(45% 45% at 28% 30%, rgba(14, 143, 122, 0.28), transparent 70%),
    radial-gradient(45% 45% at 76% 72%, rgba(47, 111, 237, 0.24), transparent 70%);
  filter: blur(60px);
  animation: haloPulse 9s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.16); opacity: 1; }
}
@keyframes heroVisualDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(7px); }
}
.browser-mock {
  padding: 0; overflow: hidden;
  --rx: 0deg; --ry: 0deg;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .55s var(--ease-soft);
  animation: mockFloat 6s ease-in-out infinite;
}
@keyframes mockFloat {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -18px; rotate: -.6deg; }
}

/* Insignias flotantes alrededor del mockup — le dan más vida y
   movimiento a la sección principal, cada una con su propio ritmo. */
.hero-float {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--glass-shadow);
  font-size: .8rem; font-weight: 700; color: var(--ink);
  white-space: nowrap;
  animation: heroFloatBob 5s ease-in-out infinite;
}
.hero-float-live { top: -6%; left: -8%; animation-delay: 0s; }
.hero-float-whatsapp { bottom: 20%; right: -8%; padding: .65rem; border-radius: 50%; color: #25d366; animation-delay: 1.1s; }
.hero-float-packs { bottom: -7%; left: 8%; animation-delay: 2.2s; }
.hero-float-speed { top: 6%; right: -4%; animation-delay: 3.3s; animation-name: heroFloatBobAlt; }
@keyframes heroFloatBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-3deg); }
}
@keyframes heroFloatBobAlt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}
.hero-float-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 rgba(14, 143, 122, .55);
  animation: heroDotPing 1.8s ease-in-out infinite;
}
@keyframes heroDotPing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 143, 122, .55); }
  50% { box-shadow: 0 0 0 5px rgba(14, 143, 122, 0); }
}
.browser-bar { display: flex; align-items: center; gap: .4rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.browser-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.browser-url {
  margin-left: .75rem; font-size: .74rem; color: var(--ink-mute);
  background: rgba(15, 42, 44, 0.05); padding: .25rem .7rem; border-radius: 999px;
}
.browser-body { padding: 1.4rem; display: grid; gap: .7rem; }
.mock-block { border-radius: 10px; background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft)); }
.mock-block-hero {
  height: 90px;
  background: linear-gradient(120deg, var(--accent-soft), var(--accent-2-soft), var(--accent-soft));
  background-size: 240% 100%;
  animation: heroShine 5s ease-in-out infinite;
  position: relative; overflow: hidden;
}
.mock-block-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%);
  background-size: 220% 100%;
  animation: heroSweep 4.5s ease-in-out infinite;
}
@keyframes heroShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes heroSweep {
  0% { background-position: 140% 0; }
  55%, 100% { background-position: -60% 0; }
}
.mock-block-line { width: var(--w, 60%); height: 12px; background: var(--line); }
.mock-row { display: flex; gap: .5rem; margin-top: .3rem; }
.mock-chip {
  font-size: .76rem; font-weight: 600; padding: .4rem .8rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  animation: chipPop 6s ease-in-out infinite;
}
.mock-chip:nth-child(2) { animation-delay: 2s; }
.mock-chip:nth-child(3) { animation-delay: 4s; }
@keyframes chipPop {
  0%, 6%, 100% { transform: translateY(0) scale(1); box-shadow: none; background: var(--accent-soft); color: var(--accent); }
  13% { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 22px -10px rgba(14, 143, 122, .55); background: var(--accent); color: #fff; }
  26% { transform: translateY(0) scale(1); box-shadow: none; background: var(--accent-soft); color: var(--accent); }
}
.mock-block-cta {
  height: 40px; width: 45%; margin-top: .4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  animation: ctaPulse 3.2s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 143, 122, .35); }
  50% { box-shadow: 0 0 0 9px rgba(14, 143, 122, 0); }
}

/* --- Steps --- */
.steps { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.step-card { padding: 1.75rem; }
.step-num { font-family: var(--display); font-size: .95rem; font-weight: 700; color: var(--accent); }
.step-card h3 { margin-top: .6rem; font-size: 1.1rem; }
.step-card p { margin-top: .5rem; color: var(--ink-soft); font-size: .94rem; }

/* --- Packs --- */
.packs-grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.pack-card {
  position: relative; padding: 2rem 1.75rem 1.75rem;
  --rx: 0deg; --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .55s var(--ease-soft), border-color .3s;
  display: flex; flex-direction: column;
}
.pack-card.is-highlight { border-color: var(--accent); box-shadow: 0 30px 60px -24px rgba(14, 143, 122, 0.45); }
.pack-card.is-selected { border-color: var(--accent); background: rgba(255, 255, 255, 0.82); }
.pack-badge {
  position: absolute; top: -13px; left: 1.75rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .35rem .8rem; border-radius: 999px;
}
.pack-name { font-size: 1.35rem; }
.pack-tagline { margin-top: .5rem; color: var(--ink-soft); font-size: .92rem; min-height: 2.6em; }
.pack-price { margin-top: 1.2rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.pack-price-value { font-family: var(--display); font-size: 2rem; font-weight: 800; }
.pack-price-original { font-size: 1.05rem; color: var(--ink-mute); text-decoration: line-through; }
.pack-discount-badge {
  background: rgba(217, 88, 55, .12); color: #a4401f;
  font-size: .74rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px;
}

/* --- Promo por tiempo limitado (ver config.promo en lib/manifest.js) --- */
.promo-banner {
  margin-top: 2rem; padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap;
  text-align: center; border: 1px dashed rgba(217, 88, 55, .4);
}
.promo-banner-text { font-size: 1rem; color: var(--ink); }
.promo-banner-text strong { color: #a4401f; }
.promo-countdown { display: flex; gap: .6rem; }
.promo-countdown-unit {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(217, 88, 55, .1); border-radius: var(--radius-sm);
  padding: .4rem .65rem; min-width: 46px;
}
.promo-countdown-unit span { font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: #a4401f; }
.promo-countdown-unit small { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
.pack-delivery { margin-top: .3rem; font-size: .82rem; color: var(--ink-mute); }
.pack-features { display: grid; gap: .6rem; margin-top: 1.4rem; }
.pack-features li { display: flex; align-items: flex-start; gap: .55rem; font-size: .9rem; color: var(--ink-soft); }
.icon-check { flex: none; width: 18px; height: 18px; margin-top: .1em; color: var(--accent); }

/* Extras que el pack ya trae incluidos (calculado desde includedInPacks
   en lib/manifest.js) — se destaca aparte de las features fijas para
   que se note el valor extra que suma el pack frente a comprar todo
   por separado. */
.pack-included {
  margin: 1.2rem 0 1.6rem; padding: 1rem 1.1rem;
  background: rgba(14, 143, 122, 0.08); border: 1px dashed rgba(14, 143, 122, 0.35);
  border-radius: var(--radius-sm);
}
.pack-included-label {
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent);
}
.pack-included-list { display: grid; gap: .5rem; margin-top: .7rem; }
.pack-included-list li { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; color: var(--ink-soft); }
.pack-included-list .icon-check { color: var(--accent); }
.pack-included-value { margin-left: auto; text-decoration: line-through; color: var(--ink-mute); font-size: .82rem; white-space: nowrap; }
.pack-included-total { margin-top: .7rem; font-size: .82rem; font-weight: 600; color: var(--accent); }
.pack-included-empty-text { margin-top: .5rem; font-size: .85rem; color: var(--ink-mute); }
.pack-note { margin-top: .9rem; font-size: .8rem; font-style: italic; color: var(--ink-mute); }
.btn-pack { margin-top: auto; }
.btn-selected-label { display: none; }
.pack-card.is-selected .btn-select-label { display: none; }
.pack-card.is-selected .btn-selected-label { display: inline; }
.pack-card.is-selected .btn-pack { background: var(--ink); color: var(--cream); box-shadow: none; }

/* --- Extras --- */
.extra-hint {
  max-height: 0; opacity: 0; overflow: hidden;
  transform: translateY(-8px) scale(.96);
  transition: max-height .5s var(--ease-soft), opacity .4s var(--ease-soft), transform .4s var(--ease-soft);
}
.extra-hint.is-visible { max-height: 80px; opacity: 1; transform: translateY(0) scale(1); margin-top: 1.75rem; }
.extra-hint-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: .92rem;
  padding: .7rem 1.2rem; border-radius: 999px;
  box-shadow: 0 14px 30px -12px rgba(14, 143, 122, .55);
}
.extra-hint.is-visible .extra-hint-pill { animation: hintBounce 1.4s var(--ease-bounce); }
@keyframes hintBounce {
  0% { transform: translateY(-16px); opacity: 0; }
  60% { transform: translateY(4px); opacity: 1; }
  100% { transform: translateY(0); }
}

.extras-grid { display: grid; gap: 1rem; margin-top: 2.5rem; }
.extra-card {
  position: relative; display: flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1.2rem; cursor: pointer;
  transition: border-color .25s, background-color .25s;
}
.extra-checkbox { position: absolute; opacity: 0; width: 1px; height: 1px; }
.extra-check-visual {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  color: transparent; border: 1.5px solid var(--line-strong); transition: all .2s var(--ease-out);
}
.extra-check-visual svg { width: 16px; height: 16px; }
.extra-card.is-checked .extra-check-visual { color: #fff; background: var(--accent); border-color: var(--accent); }
.extra-card.is-included .extra-check-visual { background: var(--ink-mute); border-color: var(--ink-mute); }
.extra-card.is-checked { border-color: var(--accent); background: rgba(255, 255, 255, 0.85); }
.extra-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.extra-name { font-weight: 600; font-size: .96rem; }
.extra-desc { font-size: .84rem; color: var(--ink-mute); }
.extra-price { flex: none; font-family: var(--display); font-weight: 700; font-size: .92rem; color: var(--ink); white-space: nowrap; }
.extra-card.is-included .extra-price { color: var(--accent); font-size: .8rem; }
.extra-card.is-featured { border-color: var(--accent-2); background: linear-gradient(135deg, rgba(47, 111, 237, 0.07), rgba(14, 143, 122, 0.07)); }
.extra-badge {
  position: absolute; top: -10px; right: 14px; z-index: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .02em;
  padding: .25rem .65rem; border-radius: 999px;
  box-shadow: 0 6px 14px -6px rgba(14, 143, 122, .55);
}

/* --- Encabezado de Extras: copy a la izquierda, destacado de
   Transbank a la derecha (en vez de ser una tarjeta más de la
   grilla) --- */
.extras-header { display: flex; flex-wrap: wrap; gap: 1.75rem 2.5rem; align-items: center; justify-content: space-between; }
.extras-header-copy { flex: 1 1 320px; }
.extras-header-featured { flex: 1 1 300px; max-width: 420px; width: 100%; }
.extras-header-featured .extra-card.is-spotlight {
  padding: 1.5rem 1.6rem;
  box-shadow: var(--glass-shadow);
}
.extras-header-featured .extra-check-visual { width: 28px; height: 28px; }
.extras-header-featured .extra-name { font-size: 1.05rem; }
.extras-header-featured .extra-desc { font-size: .88rem; }
.extras-header-featured .extra-price { font-size: 1.05rem; }

/* --- Rules --- */
.rules-list { display: grid; gap: 1rem; margin-top: 2.5rem; }
.rules-list li { display: flex; align-items: flex-start; gap: .7rem; font-size: .98rem; color: var(--ink-soft); }
.rules-list .icon-check { color: var(--accent-2); }

/* --- Pillars --- */
.pillars { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.pillar { padding: 1.9rem; }
.pillar-icon { color: var(--accent); display: inline-flex; }
.pillar h3 { margin-top: 1rem; font-size: 1.05rem; }
.pillar p { margin-top: .5rem; color: var(--ink-soft); font-size: .92rem; }

/* --- FAQ --- */
.faq-list { display: grid; gap: 1rem; margin-top: 2.5rem; }
.faq-item { padding: 0; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.3rem 1.5rem; font-weight: 600; font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { flex: none; width: 20px; height: 20px; color: var(--accent); transition: transform .3s var(--ease-out); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-item p { padding: 0 1.5rem 1.4rem; color: var(--ink-soft); font-size: .95rem; }

/* --- Pedido: ahora es un carrito (resumen + botón), no un formulario
   siempre visible — el formulario vive en el modal de más abajo. --- */
.pedido-cart-wrap { max-width: 560px; margin-inline: auto; text-align: center; }
.pedido-cart-wrap .recap-card { text-align: left; }
.pedido-cart-wrap .form-warning { margin-top: 1rem; }
.recap-card { margin-top: 2rem; padding: 1.6rem; }
.recap-card h3 { font-size: 1rem; }
.recap-list { margin-top: 1rem; display: grid; gap: .6rem; }
.recap-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; color: var(--ink-soft); }
.recap-list li.is-muted { color: var(--ink-mute); font-style: italic; }
.recap-list li.recap-total {
  margin-top: .5rem; padding-top: .8rem; border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink);
}
.recap-card + .btn { margin-top: 1.6rem; }

/* --- Modal de datos del pedido — se abre al presionar "Continuar
   pedido", en vez de tener el formulario siempre visible en la
   página (confundía a clientes con un formulario de contacto). --- */
.order-modal {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.order-modal[hidden] { display: none; }
.order-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 42, 44, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.order-modal-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  animation: orderModalIn .35s var(--ease-soft);
}
@keyframes orderModalIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.order-modal-close {
  position: absolute; top: 1.6rem; right: 1.6rem; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line-strong);
  font-size: 1rem; line-height: 1; color: var(--ink); cursor: pointer;
}
.order-modal-title { font-family: var(--display); font-size: 1.35rem; margin-bottom: 1.2rem; padding-right: 2.5rem; }
html.order-modal-open { overflow: hidden; }

.pedido-form { padding: 2rem; }
.pedido-success { padding: 2.5rem 2rem; text-align: center; }
.success-icon { color: var(--accent); display: inline-flex; margin-bottom: 1rem; }
.pedido-success h3 { font-size: 1.3rem; }
.pedido-success p { margin-top: .6rem; color: var(--ink-soft); }
.success-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* --- Proyectos a medida (formulario de solicitud, sin carrito) --- */
.proyecto-form-wrap { max-width: 640px; margin: 2.75rem auto 0; }

/* --- Banner de teaser hacia proyectos-a-medida.html --- */
.proyecto-banner {
  padding: 2.25rem; display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start;
}
.proyecto-banner-copy .section-title, .proyecto-banner-copy .section-lead { margin-top: .5rem; }
.proyecto-banner .btn { flex: none; }

/* --- Cart bar --- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  padding: .9rem 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--line);
  transform: translateY(0);
  transition: box-shadow .3s, background-color .3s;
}
.cart-bar.is-active { box-shadow: 0 -20px 40px -20px rgba(15, 42, 44, 0.25); }
.cart-bar-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cart-bar-info { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .88rem; color: var(--ink-mute); flex: 0 1 auto; min-width: 0; }
.cart-bar-pack { font-weight: 700; color: var(--ink); }
.cart-bar.is-active .cart-bar-pack { color: var(--accent); }
.cart-bar-sep { opacity: .5; }
/* Insignia de Webpay Plus + cuotas, centrada entre el detalle del pedido
   y el total/botón. Se oculta en celular (ver media query abajo) porque
   ahí el ancho no alcanza sin apretar el resto de la barra. */
.cart-bar-payment { display: flex; align-items: center; gap: .65rem; flex: 1; justify-content: center; min-width: 0; }
.cart-bar-payment-logo { height: 28px; width: auto; flex: none; }
.cart-bar-payment-text { font-size: .95rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
@media (max-width: 767px) { .cart-bar-payment { display: none; } }
.cart-bar-total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.cart-bar-total-label { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }
.cart-bar-total-value {
  display: inline-block;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  animation: totalPulse 2.6s ease-in-out infinite;
}
@keyframes totalPulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-3px); opacity: .7; }
}

/* --- WhatsApp FAB ---
   z-index por encima de .cart-bar (150): en celular, cuando el carrito
   no tiene espacio y el contenido de la barra pasa a 2 líneas, la barra
   crece hacia arriba y — al tener más z-index — tapaba este botón. */
.whatsapp-fab {
  position: fixed; right: 1.25rem; bottom: 5.5rem; z-index: 160;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #25d366, #1aa551);
  color: #fff; box-shadow: 0 16px 30px -10px rgba(26, 165, 81, 0.55);
  transition: transform .4s var(--ease-soft);
}
.whatsapp-fab:hover { transform: translateY(-4px) scale(1.05); }

/* --- Botón de llamada FAB — apilado justo arriba del de WhatsApp,
   para cuando no estás disponible por chat o sin señal de datos. --- */
.call-fab {
  position: fixed; right: 1.25rem; bottom: 10.25rem; z-index: 160;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 16px 30px -10px rgba(14, 143, 122, 0.55);
  transition: transform .4s var(--ease-soft);
}
.call-fab:hover { transform: translateY(-4px) scale(1.05); }

/* En celular angosto, si el carrito pasa a 2 líneas, sube ambos botones
   un poco más para que no queden pegados o encimados con la barra. */
@media (max-width: 640px) {
  .whatsapp-fab { bottom: 7.5rem; }
  .call-fab { bottom: 12.25rem; }
}

/* --- Banner de cookies (Ley 21.719) --- */
.cookie-banner {
  position: fixed; z-index: 550; inset-inline: 0; bottom: 0;
  display: flex; justify-content: flex-start;
  padding: 1rem; pointer-events: none;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-card {
  pointer-events: auto;
  width: 100%; max-width: 420px; padding: 1.5rem;
  animation: cookieBannerIn .5s var(--ease-soft);
}
@keyframes cookieBannerIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.cookie-banner-card h3 { font-family: var(--display); font-size: 1.1rem; }
.cookie-banner-card > p { margin-top: .6rem; font-size: .86rem; color: var(--ink-soft); line-height: 1.5; }
.cookie-categories { display: grid; gap: .8rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cookie-category { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.cookie-category input { margin-top: .25rem; flex: none; }
.cookie-category strong { font-size: .87rem; display: block; }
.cookie-category small { font-size: .78rem; color: var(--ink-mute); display: block; margin-top: .1rem; line-height: 1.4; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.cookie-actions .btn { flex: 1 1 auto; }
@media (max-width: 480px) {
  .cookie-banner { padding: .75rem; }
  .cookie-banner-card { max-width: none; }
}

/* --- Footer --- */
.footer { padding-block: 3.5rem 2rem; background: var(--ink); color: var(--cream); }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(246, 251, 250, 0.14); }
.footer .nav-logo { color: var(--cream); }
.footer .nav-logo-mark, .footer .nav-logo-suffix { color: #6fe3c9; }
.footer-tagline { margin-top: .9rem; color: rgba(246, 251, 250, 0.68); max-width: 32ch; font-size: .92rem; }
.footer-heading { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(246, 251, 250, 0.55); margin-bottom: .9rem; }
.footer-links { display: flex; flex-direction: column; gap: .65rem; }
.footer-links a { color: rgba(246, 251, 250, 0.85); font-size: .94rem; }
.footer-links a:hover { color: #6fe3c9; }
.footer-contact-link { display: inline-flex; align-items: center; gap: .55rem; word-break: break-word; }
.footer-contact-link svg { flex: none; color: #6fe3c9; }
.footer-bottom { margin-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .82rem; color: rgba(246, 251, 250, 0.55); }

.trust-badges { display: flex; flex-direction: column; gap: .7rem; list-style: none; margin: 0; padding: 0; }
.trust-badge { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: rgba(246, 251, 250, 0.85); }
.trust-badge svg { flex: none; color: #6fe3c9; }

/* =============================================================
   7. Responsive
   ============================================================= */
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .extras-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr .8fr 1fr .8fr; }
}

@media (min-width: 720px) {
  .hero-title { max-width: 18ch; }
  .stats {
    grid-template-columns: repeat(4, auto);
    justify-content: center;
    gap: 1.5rem 3.25rem;
  }
}

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

  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero-bg-tint {
    /* Escritorio: el hero es 2 columnas lado a lado. El lado del texto
       queda sólido y limpio (igual que el diseño original, sin foto
       encima) y recién se abre hacia el lado del mockup, donde la foto
       se nota bien. */
    background: linear-gradient(100deg,
      var(--bg) 0%,
      var(--bg) 46%,
      rgba(243, 248, 247, 0.5) 62%,
      rgba(243, 248, 247, 0.22) 100%);
  }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .packs-grid { grid-template-columns: repeat(3, 1fr); }
  .pack-card.is-highlight { transform: translateY(-14px) perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); }
  .extras-grid { grid-template-columns: repeat(3, 1fr); }
  .rules-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .hero-title { max-width: 16ch; }
}

/* =============================================================
   8. Reduced-motion — solo gatilla lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .browser-mock { animation: none; }
  .cart-bar-total-value { animation: none; }
  .hero-float, .hero-float-dot, .hero-visual { animation: none; }
  [data-reveal],
  .hero-copy,
  .section-kicker,
  .section-title,
  .section-lead { transition-duration: .25s; }
}
