:root {
  --bg: #efeeec;
  --surface: #ffffff;
  --surface-muted: #f7f5f2;
  --ink: #233845;
  --ink-muted: #556476;
  --accent: #a77a3b;
  --accent-strong: #8a6530;
  --accent-ink: #ffffff;
  --warm: #c7a678;
  --border: rgba(35, 56, 69, 0.09);
  --shadow: rgba(35, 56, 69, 0.1);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Jost", "Century Gothic", "Futura", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  /* Mismo vocabulario de movimiento que el Generador de procesos: una sola física
     de marca en las dos apps. */
  --err: #b23a3a;
  --dur-tap: 0.12s;
  --dur-hover: 0.2s;
  --ease-salida: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141b21;
    --surface: #1e2a33;
    --surface-muted: #223140;
    --ink: #efeeec;
    --ink-muted: #b7c2c9;
    --accent: #cf9d5e;
    --accent-strong: #e3b378;
    --accent-ink: #1a1208;
    --warm: #c7a678;
    --border: rgba(239, 238, 236, 0.1);
    --shadow: rgba(0, 0, 0, 0.4);
    --err: #e08a8a;
    color-scheme: dark;
  }
}

:root[data-theme="light"] {
  --bg: #efeeec;
  --surface: #ffffff;
  --surface-muted: #f7f5f2;
  --ink: #233845;
  --ink-muted: #556476;
  --accent: #a77a3b;
  --accent-strong: #8a6530;
  --accent-ink: #ffffff;
  --border: rgba(35, 56, 69, 0.09);
  --shadow: rgba(35, 56, 69, 0.1);
  --err: #b23a3a;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #141b21;
  --surface: #1e2a33;
  --surface-muted: #223140;
  --ink: #efeeec;
  --ink-muted: #b7c2c9;
  --accent: #cf9d5e;
  --accent-strong: #e3b378;
  --accent-ink: #1a1208;
  --border: rgba(239, 238, 236, 0.1);
  --shadow: rgba(0, 0, 0, 0.4);
  --err: #e08a8a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: inherit;
}

button {
  font-family: inherit;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

/* Theme toggle */

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--shadow);
  z-index: 10;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: block;
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* Header / identity */

.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-top: 12px;
  margin-bottom: 40px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--warm));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--shadow);
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar .monogram {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

.brand-tagline {
  color: var(--ink-muted);
  font-size: 0.98rem;
  max-width: 34ch;
  margin: 0;
}

/* Section headings */

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin: 0 4px 12px;
}

.stack > * + * {
  margin-top: 36px;
}

/* Resource cards */

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px var(--shadow);
  }
}

/* El feedback de pulsación vive en el bloque de interacción del final,
   compartido por todos los controles tocables. */

.resource-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--warm), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-thumb svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

.resource-body {
  min-width: 0;
  flex: 1;
}

.resource-title {
  font-weight: 600;
  font-size: 0.98rem;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-title span.badge {
  font-family: var(--font-display);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.resource-desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.resource-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--ink-muted);
  transition: transform var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .resource-card:hover .resource-arrow {
    transform: translateX(2px);
  }
}

/* Puertas de WhatsApp (canal + comunidad): mismas tarjetas que los recursos.
   La principal (el canal) lleva un anillo dorado sutil — destaca sin gritar. */
.community-card-principal {
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--shadow), inset 0 0 0 1px var(--accent);
}

@media (hover: hover) and (pointer: fine) {
  .community-card-principal:hover {
    box-shadow: 0 10px 26px var(--shadow), inset 0 0 0 1px var(--accent);
  }
}

/* Socials */

.socials-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .social-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
  }
}

.social-pill svg {
  width: 18px;
  height: 18px;
}

/* Chip de WhatsApp */

.whatsapp-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 48px auto 0;
  padding: 14px 26px;
  border-radius: 999px;
  background: #25d366;
  border: 1px solid #25d366;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 16px var(--shadow);
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .whatsapp-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--shadow);
  }
}

.whatsapp-chip svg {
  width: 20px;
  height: 20px;
}

/* Botones pequeños de LinkedIn de empresa, debajo de Síguenos */

.linkedin-mini-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.linkedin-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  .linkedin-mini-pill:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
}

.linkedin-mini-pill svg {
  width: 14px;
  height: 14px;
}

/* Websites */

.websites-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.website-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .website-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
  }
}

.website-pill-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--warm), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.website-pill-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.website-pill-logo svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.website-pill-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.website-pill-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.website-pill-desc {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Newsletter */

.newsletter-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}

.newsletter-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.newsletter-card p {
  margin: 0 0 16px;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}

.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.newsletter-form button {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background var(--dur-hover) var(--ease-salida), transform var(--dur-hover) var(--ease-salida);
}

.newsletter-form button:hover {
  background: var(--accent-strong);
}

.newsletter-form button:active {
  transform: scale(0.98);
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.newsletter-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  min-height: 1em;
}

.newsletter-note.is-error {
  color: var(--err);
}

.newsletter-success {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.98rem;
}

/* EscandUP — tarjeta destacada (es nuestro producto, tratamiento de marca fijo,
   no cambia con el tema claro/oscuro: fondo degradado navy -> dorado siempre) */

.escandup-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  background: linear-gradient(135deg, #1b2b36 0%, #233845 45%, #a77a3b 130%);
  box-shadow: 0 14px 34px rgba(20, 25, 30, 0.35);
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .escandup-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(20, 25, 30, 0.4);
  }
}

.escandup-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.escandup-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.escandup-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.escandup-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.escandup-thumb svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.escandup-text {
  min-width: 0;
}

.escandup-card strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.escandup-card p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.escandup-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: #233845;
  font-weight: 600;
  font-size: 0.85rem;
}

.escandup-cta svg {
  width: 16px;
  height: 16px;
}

/* Promo de tiempo limitado */

.promo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 14px var(--shadow);
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .promo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px var(--shadow);
  }
}

.promo-badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 4px 10px;
  border-radius: 999px;
}

.promo-card strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.promo-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.promo-cta {
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.88rem;
}

/* Footer */

.page-footer {
  text-align: center;
  margin-top: 40px;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

@media (min-width: 640px) {
  .avatar {
    width: 112px;
    height: 112px;
  }

  .brand-name {
    font-size: 1.8rem;
  }
}

@supports (height: 1dvh) {
  body {
    min-height: 100dvh;
  }
}

/* ============================================================
   Pasada de pulido (impeccable / apple-design / emil / taste):
   - Un momento de entrada autoral: la página se presenta en cascada
     breve en vez de aparecer de golpe. Solo transform/opacity.
   - Feedback físico al tocar en TODOS los controles, con la misma
     física que el Generador de procesos (tokens compartidos).
   - Foco de teclado visible con el dorado de la marca.
   - Y todo apagado si el usuario pide menos movimiento.
   ============================================================ */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.identity { animation: riseIn 0.45s var(--ease-salida) backwards; }
.stack > * { animation: riseIn 0.45s var(--ease-salida) backwards; }
.stack > *:nth-child(1) { animation-delay: 0.05s; }
.stack > *:nth-child(2) { animation-delay: 0.09s; }
.stack > *:nth-child(3) { animation-delay: 0.13s; }
.stack > *:nth-child(4) { animation-delay: 0.17s; }
.stack > *:nth-child(5) { animation-delay: 0.21s; }
.stack > *:nth-child(6) { animation-delay: 0.25s; }
.stack > *:nth-child(7) { animation-delay: 0.29s; }
.stack > *:nth-child(8) { animation-delay: 0.33s; }
.page-footer { animation: riseIn 0.45s var(--ease-salida) 0.37s backwards; }

/* El "¡Listo!" de la newsletter entra con un fundido: es el único momento
   de éxito de la página, no debe aparecer en seco. */
.newsletter-success { animation: riseIn 0.35s var(--ease-salida); }

/* Al tocar: se hunde un punto, rápido y seco — misma metáfora que en el Generador. */
.resource-card:active, .social-pill:active, .whatsapp-chip:active,
.website-pill:active, .escandup-card:active, .promo-card:active,
.linkedin-mini-pill:active, .theme-toggle:active {
  transform: scale(0.98);
  transition-duration: var(--dur-tap);
}

.theme-toggle {
  transition: transform var(--dur-hover) var(--ease-salida), box-shadow var(--dur-hover) var(--ease-salida);
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--shadow);
  }
}

/* Foco de teclado: visible siempre, con el dorado de la marca. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Menos movimiento pedido = menos movimiento dado. El fundido de color del
   cambio de tema se conserva: suaviza el salto de brillo, no desplaza nada. */
@media (prefers-reduced-motion: reduce) {
  .identity, .stack > *, .page-footer, .newsletter-success,
  .resource-card, .social-pill, .whatsapp-chip, .website-pill,
  .escandup-card, .promo-card, .linkedin-mini-pill, .theme-toggle,
  .newsletter-form button, .resource-arrow {
    animation: none;
    transition: none;
  }
  .resource-card:hover, .social-pill:hover, .whatsapp-chip:hover,
  .website-pill:hover, .escandup-card:hover, .promo-card:hover,
  .theme-toggle:hover, .resource-card:hover .resource-arrow {
    transform: none;
  }
}
