/* ── sobremesa · el diseño de la web de sobremesa ──────────────────────
 *
 *  Cada app de aleclagarde.com tiene el suyo. Este es el de la app: el
 *  mantel de cuadros, el papel crema de las cartas, el terracota de
 *  «Yo nunca» y las mismas fuentes (Fraunces para los títulos, DM Sans
 *  para el texto), para que quien llegue desde la app reconozca dónde está.
 *
 *  Las fuentes se sirven desde aquí mismo, como en el resto de la web.
 *  Licencia OFL al lado.
 */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(./fuentes/Fraunces_700Bold.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 600; font-display: swap;
  src: url(./fuentes/Fraunces_600SemiBold_Italic.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./fuentes/DMSans_400Regular.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(./fuentes/DMSans_500Medium.woff2) format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(./fuentes/DMSans_700Bold.woff2) format('woff2'); }

/* Los colores son los de la app. */
:root {
  --mantel: #F3EADB;     /* el fondo de la app */
  --papel: #FFF9F0;      /* las cartas */
  --linea: #E2D4BF;
  --tinta: #2A1E16;
  --gris: #7A6A5C;
  --terracota: #C8553D;  /* Yo nunca */
  --azul: #3F6E8C;       /* ¿Quién es más probable? */
  --oliva: #6B7F3A;      /* ¿Qué prefieres? */
  --mostaza: #D9962B;    /* Para lucirse */
  --picante: #B8325A;    /* Premium */
  --titulos: 'Fraunces', Georgia, 'Times New Roman', serif;
  --texto-fuente: 'DM Sans', system-ui, -apple-system, sans-serif;
  --margen: clamp(20px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mantel); color: var(--tinta); font: 400 18px/1.6 var(--texto-fuente); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--terracota); text-underline-offset: 3px; }
b, strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--terracota); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--terracota); color: var(--papel); }

html[data-idioma="es"] [lang="en"]:not(html),
html[data-idioma="en"] [lang="es"]:not(html) { display: none !important; }

.marco { padding: 0 var(--margen); max-width: 1320px; margin: 0 auto; }

/* ── el mantel: cuadros vichy, como el icono ── */
.mantel {
  background-color: var(--mantel);
  background-image:
    linear-gradient(90deg, rgba(200, 85, 61, .55) 50%, transparent 50%),
    linear-gradient(rgba(200, 85, 61, .55) 50%, transparent 50%);
  background-size: 64px 64px;
}

/* ── la barra ── */
.barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.marca { display: flex; align-items: center; gap: 12px; color: var(--tinta); text-decoration: none; font: 700 26px/1 var(--titulos); letter-spacing: -0.01em; }
.marca img { width: 44px; height: 44px; border-radius: 11px; }
.nav { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; }
.nav a { color: var(--gris); text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: background-color .2s, color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--tinta); background: var(--papel); }
.nav .idioma { font-weight: 700; }

/* ── la cabecera ── */
.cabecera { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(24px, 4vw, 64px);
  padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 120px); }
.cabecera h1 { font: 700 clamp(60px, 10vw, 150px)/.95 var(--titulos); letter-spacing: -0.03em; margin: 0 0 24px; }
.lema { font: italic 600 26px/1.35 var(--titulos); color: var(--gris); max-width: 30ch; margin: 0 0 14px; }
.fecha { color: var(--gris); font-size: 16px; margin: 0; }
.cabecera .pantalla { justify-self: end; width: min(100%, 400px); animation: entra .7s cubic-bezier(.2,.8,.2,1) both .1s; }
.cabecera .plato { justify-self: center; width: min(100%, 440px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--papel); box-shadow: 0 0 0 clamp(14px, 2vw, 22px) var(--papel), 0 0 0 calc(clamp(14px, 2vw, 22px) + 3px) var(--linea), 0 30px 60px rgba(42, 30, 22, .18);
  animation: entra .7s cubic-bezier(.2,.8,.2,1) both .1s; }
.plato span { font: italic 600 clamp(140px, 20vw, 260px)/1 var(--titulos); color: var(--tinta); margin-top: -.08em; }

.boton { display: inline-block; text-decoration: none; background: var(--terracota); color: var(--papel);
  font: 700 19px/1 var(--texto-fuente); padding: 19px 30px; border-radius: 999px; margin-top: 22px;
  transition: transform .15s; }
.boton:hover { transform: translateY(-2px); }
.boton:active { transform: translateY(1px) scale(.98); }
.boton.secundario { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta); }

/* Las capturas son de la app tal cual. */
.pantalla { border-radius: 28px; overflow: hidden; background: var(--papel); box-shadow: 0 24px 48px rgba(42, 30, 22, .16); }
.pantalla img { width: 100%; }

/* ── la hoja: el texto largo sobre papel, como las cartas ── */
.hoja { background: var(--papel); border-radius: 36px 36px 0 0; }
.hoja a { color: var(--tinta); }
.hoja .marco { display: grid; grid-template-columns: minmax(0, 68ch) minmax(260px, 1fr); gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(64px, 8vw, 128px); }
.texto h2 { font: 700 42px/1.05 var(--titulos); letter-spacing: -0.015em; margin: 64px 0 16px; }
.texto h2:first-child { margin-top: 0; }
.texto h3 { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 32px 0 6px; }
.texto p, .texto li { margin: 0 0 14px; }
.texto ul { padding-left: 1.2em; margin: 0 0 14px; }

.lado { align-self: start; position: sticky; top: 32px; display: grid; gap: 28px; }
.resumen { background: var(--mantel); border-radius: 26px; padding: 28px; }
.resumen h2 { font: 700 36px/1.05 var(--titulos); margin: 0 0 18px; }
.resumen dl { margin: 0; display: grid; gap: 16px; }
.resumen dt { font-weight: 700; font-size: 18px; }
.resumen dd { margin: 2px 0 0; font-size: 16px; line-height: 1.45; }
.lado .pantalla { width: min(100%, 340px); }
.pie-foto { font-size: 16px; line-height: 1.4; margin: 12px 0 0; color: var(--gris); }
.pantalla-fig { margin: 0; }

/* ── temas: texto con su captura al lado, alternando ── */
.tema { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(56px, 7vw, 104px); }
.hoja .tema + .tema { padding-top: 0; }
.tema .pantalla { width: min(100%, 360px); justify-self: center; }
.tema.al-reves .pantalla { order: -1; }
.tema h2 { font: 700 44px/1.02 var(--titulos); letter-spacing: -0.02em; margin: 0 0 20px; }
.tema h3 { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 26px 0 6px; }
.tema p { margin: 0 0 12px; max-width: 60ch; }
.campo { background: var(--mantel); }
.campo a { color: var(--tinta); }

/* Los cinco modos, cada uno con su color de la app. */
.modos { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; max-width: 560px; }
.modos li { border-radius: 20px; padding: 16px 20px; color: var(--papel); }
.modos b { display: block; font: 700 24px/1.15 var(--titulos); }
.modos span { display: block; font-size: 16px; line-height: 1.4; opacity: .9; }
.modos .m1 { background: var(--terracota); }
.modos .m2 { background: var(--azul); }
.modos .m3 { background: var(--oliva); }
.modos .m4 { background: var(--tinta); }
.modos .m5 { background: var(--mostaza); color: var(--tinta); }

.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; max-width: 560px; }
.cifras li { background: var(--papel); border: 1px solid var(--linea); border-radius: 20px; padding: 16px 18px; margin: 0; }
.cifras b { display: block; font: 700 24px/1.1 var(--titulos); margin-bottom: 4px; }
.cifras span { display: block; font-size: 16px; line-height: 1.4; }

/* ── la portada ── */
.nav .descargar { background: var(--terracota); color: var(--papel); font-weight: 700; margin-left: 6px; }
.nav .descargar:hover { background: var(--terracota); color: var(--papel); filter: brightness(1.06); }
.descarga .boton { margin-top: 18px; }
.android { color: var(--gris); font-size: 16px; line-height: 1.5; max-width: 44ch; margin: 18px 0 0; }
.android a { color: var(--terracota); font-weight: 700; }
.cierre { text-align: center; padding-top: clamp(64px, 9vw, 128px); padding-bottom: clamp(24px, 4vw, 48px); }
.cierre h2 { font: 700 clamp(44px, 7vw, 92px)/1 var(--titulos); letter-spacing: -0.02em; margin: 0 0 12px; }
.cierre .lema { margin: 0 auto; max-width: 34ch; }
.cierre .android { margin: 18px auto 0; }

/* ── descargar ── */
.descargar-pag { text-align: center; padding-top: clamp(32px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.descargar-pag .icono { width: 120px; height: 120px; border-radius: 28px; margin: 0 auto 24px; box-shadow: 0 16px 32px rgba(42, 30, 22, .18); }
.descargar-pag h1 { font: 700 clamp(56px, 10vw, 110px)/.95 var(--titulos); letter-spacing: -0.03em; margin: 0 0 16px; }
.descargar-pag .lema { margin: 0 auto; }
.descargar-pag .botones { display: flex; flex-direction: column; align-items: center; }
.descargar-pag .android { margin: 18px auto 0; }

/* ── el pie: el nombre vuelve a lo ancho ── */
.pie { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 32px; }
.pie .nombre { font: 700 clamp(60px, 10vw, 150px)/.9 var(--titulos); letter-spacing: -0.04em; margin: 0 0 28px; }
.pie .enlaces { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; color: var(--gris); }
.pie .enlaces a { color: var(--gris); }
.pie .enlaces a:hover { color: var(--tinta); }
.fecha.correo { margin-top: 14px; }

/* Entradas al hacer scroll (sobremesa.js pone .js en <html>; sin él todo se ve). */
html.js .entra { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); transition-delay: var(--retraso, 0ms); }
html.js .entra.visto { opacity: 1; transform: none; }
@keyframes entra { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.cabecera h1, .cabecera .lema { animation: entra .6s cubic-bezier(.2,.8,.2,1) both; }
.cabecera .lema { animation-delay: .07s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── el móvil ── */
@media (max-width: 860px) {
  .cabecera { grid-template-columns: 1fr; }
  .cabecera .pantalla { justify-self: start; width: min(100%, 320px); }
  .cabecera .plato { width: min(70%, 300px); justify-self: start; }
  .hoja .marco { grid-template-columns: 1fr; }
  .lado { position: static; }
  .tema { grid-template-columns: 1fr; }
  .tema.al-reves .pantalla { order: 0; }
  .tema .pantalla { justify-self: start; width: min(100%, 300px); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .lema { font-size: 22px; }
  .texto h2, .tema h2, .resumen h2 { font-size: 34px; }
  .barra { flex-wrap: wrap; }
  .nav a { padding: 6px 9px; }
  .nav .descargar { display: none; }
  .hoja { border-radius: 26px 26px 0 0; }
  .cifras { grid-template-columns: 1fr; }
  .boton { font-size: 17px; padding: 17px 26px; }
}
