/* ═══════════════════════════════════════════════════════════════════════
   TAILWIND ESTÁTICO

   Sustituye a <script src="https://cdn.tailwindcss.com"></script>, que era
   un script bloqueante que se descargaba entero y compilaba el CSS en el
   navegador en cada carga (~2 s de render-blocking y buena parte del TBT).

   Aquí solo están el preflight (el reset del que depende styles.css) y las
   utilidades que el sitio usa de verdad. Se mantiene A MANO: si añades una
   clase de Tailwind nueva en el HTML y no aparece aquí, no hará nada.

   Se carga EL ÚLTIMO del <head>, después de styles.css, a propósito: el CDN
   inyectaba su <style> ahí, al final, así que estas utilidades ganan los
   empates de especificidad contra styles.css. Adelantar el <link> cambiaría
   el aspecto del sitio, no solo el orden de descarga.

   Paleta (era tailwind.config): kp-orange #F07B2C · kp-orange-d #D96A1A
   kp-cream #FDF6EC · kp-cream-d #F0E0C8 · kp-warm #FFF8F0
═══════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════
   PREFLIGHT — copiado literal del que generaba el CDN (tailwindcss v3.4.17)

   Literal a propósito, sin "limpiarlo": styles.css lleva años escribiéndose
   encima de este reset exacto. Da por hecho que los márgenes están a cero,
   que los <h1>-<h6> no traen tamaño propio y que los bordes ya vienen con
   border-style:solid (por eso .border solo pone el ancho).

   Ojo a los :where() — no son adorno. `input:where([type=button])` tiene
   especificidad de elemento, no de clase, y por eso .cta-proyector puede
   ponerle fondo oscuro a un <button type="button">. Reescribirlo como
   [type=button] deja esos botones transparentes.
═══════════════════════════════════════════════ */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

::before,
::after { --tw-content: ''; }

:host,
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: Nunito, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}

body { margin: 0; line-height: inherit; }

hr { height: 0; color: inherit; border-top-width: 1px; }

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }

a { color: inherit; text-decoration: inherit; }

b, strong { font-weight: bolder; }

code, kbd, pre, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}

small { font-size: 80%; }

sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }

table { text-indent: 0; border-color: inherit; border-collapse: collapse; }

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select { text-transform: none; }

button,
input:where([type=button]),
input:where([type=reset]),
input:where([type=submit]) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

:-moz-focusring { outline: auto; }
:-moz-ui-invalid { box-shadow: none; }

progress { vertical-align: baseline; }

::-webkit-inner-spin-button,
::-webkit-outer-spin-button { height: auto; }

[type=search] { -webkit-appearance: textfield; outline-offset: -2px; }

::-webkit-search-decoration { -webkit-appearance: none; }

::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }

summary { display: list-item; }

blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre { margin: 0; }

fieldset { margin: 0; padding: 0; }
legend { padding: 0; }

menu, ol, ul { list-style: none; margin: 0; padding: 0; }

dialog { padding: 0; }

textarea { resize: vertical; }

input::placeholder,
textarea::placeholder { opacity: 1; color: #9ca3af; }

[role=button], button { cursor: pointer; }

:disabled { cursor: default; }

audio, canvas, embed, iframe, img, object, svg, video {
  display: block;
  vertical-align: middle;
}

img, video { max-width: 100%; height: auto; }

[hidden]:where(:not([hidden=until-found])) { display: none; }


/* ═══════════════════════════════════════════════
   UTILIDADES — layout
═══════════════════════════════════════════════ */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }

.inset-0  { inset: 0; }
.top-3    { top: 0.75rem; }
.right-3  { right: 0.75rem; }

.z-10     { z-index: 10; }
.z-\[100\] { z-index: 100; }

/* El orden dentro del grupo `display` importa y es el de Tailwind: `hidden` va
   EL ÚLTIMO. Los modales llevan a la vez `hidden` y `flex` (`hidden` se quita
   por JS al abrirlos), y como las dos clases tienen la misma especificidad
   gana la que se declare después. Con `hidden` arriba, los modales salen
   abiertos al cargar la página. */
.flex        { display: flex; }
.inline-flex { display: inline-flex; }
.hidden      { display: none; }

.flex-wrap      { flex-wrap: wrap; }
.flex-shrink-0  { flex-shrink: 0; }

.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.items-center  { align-items: center; }
.justify-center { justify-content: center; }

.gap-1\.5 { gap: 0.375rem; }
.gap-2\.5 { gap: 0.625rem; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

.object-cover { object-fit: cover; }


/* ── Tamaños ── */
.h-4  { height: 1rem; }
.h-8  { height: 2rem; }
.h-14 { height: 3.5rem; }
.w-4  { width: 1rem; }
.w-8  { width: 2rem; }
.w-14 { width: 3.5rem; }
.w-full { width: 100%; }

.min-h-screen    { min-height: 100vh; }
.max-h-\[90vh\]  { max-height: 90vh; }
.max-w-\[440px\] { max-width: 440px; }


/* ── Espaciado ── */
.mx-auto { margin-left: auto; margin-right: auto; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-0 { padding: 0; }
.p-5 { padding: 1.25rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-12 { padding-top: 3rem; }
.pt-16 { padding-top: 4rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pl-4 { padding-left: 1rem; }

/* space-y-*: separa hermanos visibles, no el primero. El :not([hidden]) es
   deliberado — #story-header vive oculto dentro de estos contenedores. */
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }


/* ═══════════════════════════════════════════════
   UTILIDADES — tipografía
═══════════════════════════════════════════════ */
.text-xs  { font-size: 0.75rem;  line-height: 1rem; }
.text-sm  { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg  { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem;   line-height: 2rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[17px\] { font-size: 17px; }

.font-bold  { font-weight: 700; }
.font-black { font-weight: 900; }

.leading-none    { line-height: 1; }
.leading-tight   { line-height: 1.25; }
.leading-snug    { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }

.tracking-widest { letter-spacing: 0.1em; }

.text-left   { text-align: left; }
.text-center { text-align: center; }

.italic    { font-style: italic; }
.uppercase { text-transform: uppercase; }
.underline { -webkit-text-decoration-line: underline; text-decoration-line: underline; }

.text-white     { color: #fff; }
.text-gray-400  { color: #9ca3af; }
.text-gray-500  { color: #6b7280; }
.text-gray-600  { color: #4b5563; }
.text-gray-700  { color: #374151; }
.text-gray-800  { color: #1f2937; }
.text-red-500   { color: #ef4444; }
.text-kp-orange { color: #F07B2C; }

.placeholder-gray-300::placeholder { color: #d1d5db; }


/* ═══════════════════════════════════════════════
   UTILIDADES — fondos, bordes y sombras
═══════════════════════════════════════════════ */
.bg-white        { background-color: #fff; }
.bg-white\/80    { background-color: rgb(255 255 255 / 0.8); }
.bg-gray-100     { background-color: #f3f4f6; }
.bg-gray-900\/55 { background-color: rgb(17 24 39 / 0.55); }
.bg-kp-cream     { background-color: #FDF6EC; }
.bg-kp-orange    { background-color: #F07B2C; }
.bg-kp-orange\/10 { background-color: rgb(240 123 44 / 0.1); }
/* Cuidado: styles.css tiene un `body.bg-kp-warm`, pero solo la usa de gancho
   para el layout — el color de fondo sale de aquí, y lo llevan tanto el <body>
   como las dos .modal-card. */
.bg-kp-warm      { background-color: #FFF8F0; }

.border   { border-width: 1px; }
.border-l-4 { border-left-width: 4px; }
.border-kp-cream-d { border-color: #F0E0C8; }
.border-kp-orange  { border-color: #F07B2C; }

.rounded        { border-radius: 0.25rem; }
.rounded-xl     { border-radius: 0.75rem; }
.rounded-2xl    { border-radius: 1rem; }
.rounded-full   { border-radius: 9999px; }
.rounded-t-3xl  { border-top-left-radius: 1.5rem; border-top-right-radius: 1.5rem; }

/* Las dos primeras capas son los huecos que Tailwind reserva para las
   utilidades `ring-*`. Aquí no se usa ninguna, así que quedan transparentes y
   de tamaño cero; se dejan para que el valor calculado sea idéntico al que
   generaba el CDN. */
.shadow-sm {
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.accent-kp-orange { accent-color: #F07B2C; }


/* ═══════════════════════════════════════════════
   UTILIDADES — interacción
═══════════════════════════════════════════════ */
.cursor-pointer { cursor: pointer; }
.select-none    { user-select: none; -webkit-user-select: none; }

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-200 { transition-duration: 200ms; }


/* ── Variantes de estado ── */
/* No aparece hoy en ningún class="", pero venía en el `safelist` de la vieja
   tailwind.config, así que el CDN sí la generaba. Se mantiene por si alguien
   la añade desde JS. (La otra del safelist, focus:ring-kp-orange/30, no se
   copia: sin ninguna utilidad ring-* solo declaraba una variable que nadie
   lee.) */
.hover\:border-kp-orange:hover { border-color: #F07B2C; }

.hover\:bg-gray-200:hover      { background-color: #e5e7eb; }
.hover\:bg-white:hover         { background-color: #fff; }
.hover\:bg-kp-orange-d:hover   { background-color: #D96A1A; }
.hover\:text-gray-500:hover    { color: #6b7280; }
.hover\:text-gray-700:hover    { color: #374151; }
.hover\:text-kp-orange-d:hover { color: #D96A1A; }

.focus\:outline-none:focus        { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:border-kp-orange:focus    { border-color: #F07B2C; }

.active\:scale-\[0\.98\]:active { transform: scale(0.98); }

.disabled\:opacity-60:disabled { opacity: 0.6; }


/* ═══════════════════════════════════════════════
   BREAKPOINT sm (640px)
   Al final del archivo, igual que los genera Tailwind.
═══════════════════════════════════════════════ */
@media (min-width: 640px) {
  .sm\:items-center    { align-items: center; }
  .sm\:p-4             { padding: 1rem; }
  .sm\:max-w-\[480px\] { max-width: 480px; }
  .sm\:max-w-\[600px\] { max-width: 600px; }
  .sm\:rounded-3xl     { border-radius: 1.5rem; }
}
