/* Spellstroke · web de marketing. Misma mesa de cuero y pergamino que el juego. */
@font-face { font-family: "PS2P"; src: url(fonts/PressStart2P-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Silk"; src: url(fonts/Silkscreen-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --leather: #3a1f10;
  --leather-dark: #24120a;
  --leather-light: #4a2814;
  --gold: #f6d36b;
  --brass: #e8b84a;
  --ember: #7a2e10;
  --wax: #b3261e;
  --cream: #f3e3c2;
  --parchment: #f1e2bd;
  --ink: #3b2414;
  --ink-soft: #6b4a2e;
  --u: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  font-family: "Silk", ui-monospace, monospace;
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: .02em;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 190, 110, .14), rgba(0, 0, 0, 0) 55%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 4px, rgba(0, 0, 0, 0) 4px 8px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .02) 0 4px, rgba(0, 0, 0, 0) 4px 12px),
    linear-gradient(var(--leather-light), var(--leather-dark) 60%, #1a0d06);
  background-color: var(--leather);
  -webkit-font-smoothing: none;
}
img { image-rendering: pixelated; max-width: 100%; height: auto; display: block; }
img.shot { image-rendering: auto; }
a { color: var(--gold); }
a:hover { color: #fff3d6; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Cabecera */
.top.wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { font-family: "PS2P"; font-size: 14px; color: var(--gold); text-decoration: none; letter-spacing: .06em;
  text-shadow: 0 3px 0 var(--ember); }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.top nav a { color: var(--cream); text-decoration: none; }
.top nav a:hover { color: var(--gold); }
.lang { border: 2px solid var(--brass); padding: 2px 10px; }

/* Portada */
.hero { text-align: center; padding-bottom: 24px; }
/* Portada: la ilustración del juego con la vela animada. Coordenadas en píxeles del dibujo (340x157). */
.cover { position: relative; max-width: 1600px; margin: 0 auto; aspect-ratio: 340 / 157; overflow: hidden; background: #140a08; }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-flame { position: absolute; left: calc(255 / 340 * 100%); top: calc(66 / 157 * 100%); width: calc(15 / 340 * 100%); height: calc(22 / 157 * 100%);
  background: url(img/cover-flame.png) 0 0 / 800% 100% no-repeat; image-rendering: pixelated; animation: flame 1.1s steps(1) infinite; }
.cover-glow { position: absolute; left: calc(262 / 340 * 100%); top: calc(78 / 157 * 100%); width: calc(70 / 340 * 100%); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 170, 70, .28), rgba(255, 150, 50, .08) 45%, rgba(255, 150, 50, 0) 70%);
  animation: glow 2.3s ease-in-out infinite; }
.ember { position: absolute; left: calc(262 / 340 * 100%); top: calc(70 / 157 * 100%); width: calc(1 / 340 * 100%); aspect-ratio: 1; background: #ffd34e;
  opacity: 0; animation: ember 3.4s linear infinite; }
.e2 { animation-delay: .9s; --dx: -1; } .e3 { animation-delay: 1.8s; --dx: 1.6; } .e4 { animation-delay: 2.6s; --dx: -.6; }
@keyframes flame {
  0% { background-position-x: 0; } 12% { background-position-x: calc(100% / 7 * 1); } 22% { background-position-x: calc(100% / 7 * 2); }
  34% { background-position-x: calc(100% / 7 * 1); } 45% { background-position-x: calc(100% / 7 * 7); } 55% { background-position-x: calc(100% / 7 * 3); }
  66% { background-position-x: calc(100% / 7 * 4); } 76% { background-position-x: calc(100% / 7 * 5); } 88% { background-position-x: calc(100% / 7 * 6); }
}
@keyframes glow { 0%, 100% { opacity: .85; } 30% { opacity: 1; } 55% { opacity: .7; } 80% { opacity: .95; } }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--dx, .8) * 600%), -3200%); }
}
@media (prefers-reduced-motion: reduce) { .cover-flame, .cover-glow, .ember { animation: none; } }
.cover-title { position: absolute; left: 0; right: 0; top: 7%; }
.cover .logo { font-size: clamp(22px, 6.4vw, 100px); }
.cover .tagline { margin-top: clamp(8px, 1.6vw, 26px); font-size: clamp(11px, 1.6vw, 24px); color: #e8d6b0; }
.logo { font-family: "PS2P"; font-weight: 400; color: var(--gold); margin: 0;
  font-size: clamp(30px, 7.6vw, 84px); line-height: 1.15; letter-spacing: .02em;
  text-shadow: 0 .08em 0 var(--ember), 0 .16em 0 rgba(0, 0, 0, .45); }
.tagline { font-size: clamp(15px, 2.2vw, 22px); letter-spacing: .3em; margin: 26px 0 0; text-transform: uppercase; }
.lead { max-width: 680px; margin: 26px auto 0; font-size: 19px; color: #eedcb8; }

.frame { position: relative; border: 8px solid var(--brass); outline: 6px solid #5a2a0e;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6); background: #120804; }
.frame::before, .frame::after { content: ""; position: absolute; width: 18px; height: 18px; background: var(--brass);
  transform: rotate(45deg); box-shadow: 0 0 0 3px #7a3d12; top: -17px; }
.frame::before { left: -17px; }
.frame::after { right: -17px; }
.trailer { margin: 44px auto 0; max-width: 1000px; }
@media (max-width: 1060px) { .frame::before, .frame::after { display: none; } }
.trailer video { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 886; }

.cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 40px 0 0; }
.badge { display: inline-flex; flex-direction: column; align-items: center; min-width: 220px; padding: 12px 22px;
  background: var(--wax); color: #fff3d6; border: 4px solid var(--gold); text-decoration: none;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .45); }
.badge small { font-size: 12px; letter-spacing: .14em; opacity: .9; }
.badge strong { font-family: "PS2P"; font-weight: 400; font-size: 15px; margin-top: 6px; text-transform: uppercase; }
.badge.soon { background: #5a2a0e; }
.note { font-size: 14px; color: #d8c29a; margin-top: 18px; }

/* Secciones */
section.wrap { padding-block: 120px 8px; }
h2 + .kicker { margin-top: 18px; }
h2 { font-family: "Silk"; font-weight: 400; color: var(--gold); text-align: center; margin: 0 0 12px; text-transform: uppercase;
  font-size: clamp(24px, 4vw, 44px); line-height: 1.25; letter-spacing: .04em; text-shadow: 0 4px 0 var(--ember), 0 8px 0 rgba(0, 0, 0, .35); }
.kicker { text-align: center; margin: 0 auto 48px; max-width: 640px; color: #eedcb8; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.step h3, .school h3 { font-family: "Silk"; font-weight: 400; font-size: 20px; text-transform: uppercase; color: var(--gold); margin: 22px 0 6px; line-height: 1.5; }
.step p, .school p { margin: 0; font-size: 16px; color: #eedcb8; }
.step .frame { border-width: 5px; outline-width: 4px; }
.step .frame::before, .step .frame::after { display: none; }

/* Escuelas */
.schools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.school { background: var(--parchment); color: var(--ink); padding: 18px 16px 20px; border: 4px solid var(--brass);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.school h3 { color: var(--ember); margin-top: 0; }
.school p { color: var(--ink-soft); font-size: 15px; }
.school .tag { display: inline-block; font-size: 12px; letter-spacing: .1em; background: var(--wax); color: #fff3d6;
  padding: 2px 8px; margin-bottom: 10px; }

/* Historia */
.story { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.panel { text-align: center; }
.panel img { width: 100%; height: auto; aspect-ratio: 1; border: 5px solid var(--brass); background: #120804; }
.panel p { background: var(--parchment); color: var(--ink); border: 3px solid var(--brass); margin: 14px 0 0;
  padding: 10px 12px; font-size: 15px; line-height: 1.5; }

/* Biblioteca */
.library { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.library ul { margin: 14px 0 0; padding: 0; list-style: none; font-size: 16px; }
.library li { padding: 6px 0; border-bottom: 2px dashed rgba(214, 164, 92, .3); }
.library h3 { font-family: "Silk"; font-weight: 400; color: var(--gold); font-size: 20px; text-transform: uppercase; margin: 24px 0 0; line-height: 1.5; }

/* Galería */
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 4px 26px; }
.gallery figure { margin: 0; flex: 0 0 min(78%, 620px); scroll-snap-align: center; }
.gallery figcaption { text-align: center; font-size: 14px; margin-top: 10px; color: #d8c29a; }

/* Preguntas */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--parchment); color: var(--ink); border: 3px solid var(--brass); margin: 0 0 14px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-size: 18px; text-transform: uppercase; line-height: 1.5; color: var(--ember); }
.faq details p { margin: 12px 0 0; font-size: 16px; }

/* Páginas de texto (privacidad, soporte) */
.doc { max-width: 820px; margin: 30px auto 0; background: var(--parchment); color: var(--ink);
  border: 6px solid var(--brass); outline: 5px solid #5a2a0e; padding: 36px clamp(18px, 5vw, 56px) 40px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.doc h1 { font-family: "Silk"; font-weight: 400; color: var(--ember); font-size: clamp(26px, 4vw, 38px); text-transform: uppercase; line-height: 1.25; margin: 0 0 10px; }
.doc h2 { text-align: left; color: var(--ember); text-shadow: none; font-size: 20px; margin: 32px 0 6px; }
.doc p, .doc li { font-size: 16px; }
.doc .meta { color: var(--ink-soft); font-size: 14px; }
.doc a { color: var(--wax); }

/* Pie */
footer { margin-top: 90px; padding: 32px 0 44px; border-top: 3px dashed rgba(214, 164, 92, .35); font-size: 14px; color: #d8c29a; }
footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--cream); }

@media (max-width: 900px) {
  .schools { grid-template-columns: repeat(2, 1fr); }
  .steps, .story, .library { grid-template-columns: 1fr; }
  .top nav .opt { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .schools { grid-template-columns: 1fr; }
  .badge { min-width: 0; width: 100%; }
}
