:root {
  color-scheme: dark;
  --ink: #071019;
  --ivory: #f0e5d5;
  --coral: #f34e43;
  --muted: #c4c8cc;
  --line: rgba(240, 229, 213, .4);
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink) url("../assets/images/backgrounds/fondo001.png") center center / cover no-repeat;
  color: var(--ivory);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ivory); outline-offset: 6px; }
[hidden] { display: none !important; }
.container { width: min(1440px, 84%); margin-inline: auto; }
.header { background: rgba(4, 10, 16, .79); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 13px; font: bold 30px var(--serif); letter-spacing: -1.2px; }
.brand-emblem { width: 51px; height: 51px; border-radius: 50%; background: rgba(240,229,213,.04); overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; }
.brand img { display: block; height: 47px; width: auto; }
nav { display: flex; align-items: center; gap: 36px; }
.header nav a { position: relative; padding-block: 29px; font: 13px var(--serif); letter-spacing: 1px; }
.header nav [aria-current] { color: var(--coral); }
.header nav [aria-current]::after { content: ""; position: absolute; height: 2px; background: var(--coral); bottom: 17px; left: 0; right: 0; }
nav a:hover { color: var(--coral); }
main { flex: 1; }
.hero { display: flex; align-items: center; min-height: clamp(450px, 49vh, 540px); padding-block: 32px; }
.hero-copy { width: 620px; max-width: 52%; position: relative; isolation: isolate; }
.hero-copy::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse, rgba(7,16,25,.58), transparent 72%); z-index: -1; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; color: var(--coral); font-size: 11px; font-weight: 600; letter-spacing: 2.7px; line-height: 1.6; }
.eyebrow::before { content: ""; width: 27px; height: 1px; background: var(--coral); flex-shrink: 0; }
h1 { font: bold clamp(48px, 4.35vw, 82px)/.98 var(--serif); letter-spacing: -2.4px; margin: 0; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
h1 span { color: var(--coral); }
.intro { max-width: 500px; font-size: 15px; line-height: 1.75; color: var(--muted); margin: 22px 0 25px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.button { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 23px; padding: 12px 20px; border: 1px solid transparent; border-radius: 3px; font-size: 11px; font-weight: 700; letter-spacing: .6px; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, --button-start 200ms ease, --button-end 200ms ease; }
.button span { font-size: 20px; line-height: .7; font-weight: 400; }
.button-primary { color: #160c0c; background: var(--coral); border-color: var(--coral); }
.button-primary[href]:hover { background-color: #ff6b61; border-color: #ff6b61; }
.button-secondary { background-color: rgba(7,16,25,.65); border-color: rgba(240,229,213,.45); }
.button-secondary:hover { border-color: var(--ivory); background-color: #111a23; }
[aria-disabled="true"] { cursor: default; }
.games { padding: 8px 0 34px; scroll-margin-top: 20px; }
.section-heading { text-align: center; margin-bottom: 22px; }
.section-heading .eyebrow { justify-content: center; margin-bottom: 8px; }
.section-heading .eyebrow::after { content: ""; width: 27px; height: 1px; background: var(--coral); }
h2 { font: 600 clamp(21px, 1.7vw, 31px)/1.3 var(--serif); margin: 0; letter-spacing: .5px; }
.carousel { max-width: 1080px; margin-inline: auto; }
.game-card { display: grid; grid-template-columns: 46% 1fr; overflow: hidden; border: 1px solid rgba(196,200,204,.29); border-radius: 5px; background: rgba(7,16,25,.87); box-shadow: 0 12px 35px rgba(0,0,0,.18); }
.game-art { align-self: center; background: rgba(0,0,0,.2); }
.game-art img { width: 100%; height: auto; display: block; }
.game-info { padding: 24px 32px; align-self: center; }
h3 { font: bold 30px/1.15 var(--serif); margin: 0 0 12px; color: var(--ivory); }
#ragnar-title { color: var(--coral); }
.game-info p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0; max-width: 470px; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0 19px; }
.tags li { font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.tags li + li::before { content: "·"; margin-right: 9px; color: var(--coral); }
.game-link { min-height: 39px; padding-block: 10px; }
.link-note { display: block; font-size: 10px; color: var(--muted); margin-top: 7px; }
.carousel-controls { display: flex; justify-content: center; align-items: center; gap: 18px; padding-top: 16px; }
.carousel-arrow { background: rgba(7,16,25,.8); border: 1px solid var(--line); color: var(--ivory); width: 44px; height: 44px; cursor: pointer; }
.carousel-dots { display: flex; gap: 4px; }
.carousel-dots button { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.carousel-dots button::after { content: ""; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; }
.carousel-dots [aria-current="true"]::after { background: var(--coral); }
.footer { background: rgba(4,10,16,.82); border-top: 1px solid var(--line); }
.footer-inner { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.footer nav { gap: 17px; font-size: 10px; letter-spacing: 1px; }
.footer nav > span { color: var(--coral); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 10px; left: 10px; padding: 12px; background: var(--ink); z-index: 10; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
/* Ornamentación local: no altera las imágenes ni su encuadre. */
.header, .footer { position: relative; }
.header::after, .footer::before {
  content: ""; position: absolute; left: calc(50% - 4px);
  width: 7px; height: 7px; transform: rotate(45deg);
  border: 1px solid #cfbfa4; background: var(--ink); pointer-events: none;
}
.header::after { bottom: -4px; }
.footer::before { top: -4px; }
.brand { letter-spacing: -.6px; }
.brand-emblem { border-color: #b6a58b; }
.hero .eyebrow { color: var(--ivory); font-weight: 400; letter-spacing: 1.4px; }
.intro, .game-info p { color: #e0d6c7; line-height: 1.35; }
.button { font-family: var(--serif); font-weight: 600; letter-spacing: 0; gap: 12px; border-radius: 2px; }
/* Interpolar los colores sin retirar el degradado durante el hover. */
@property --button-start { syntax: "<color>"; inherits: false; initial-value: #f8463d; }
@property --button-end { syntax: "<color>"; inherits: false; initial-value: #f34e43; }
.button-primary { --button-start: #f8463d; --button-end: var(--coral); background-image: linear-gradient(110deg, var(--button-start), var(--button-end)); }
.button-primary[href]:hover { --button-start: #ff6b61; --button-end: #ff6b61; }
.button-secondary { border-color: #baad96; }
.button .gamepad { width: 22px; height: 18px; flex: 0 0 auto; fill: currentColor; }
.hero h1 span { display: inline-flex; align-items: center; gap: 22px; }
.hero h1 span::after { content: ""; width: clamp(45px, 6vw, 110px); height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='10' viewBox='0 0 110 10'%3E%3Cpath d='M0 5H100M100 5l4-4 4 4-4 4Z' fill='none' stroke='%23f34e43'/%3E%3C/svg%3E") right center / 100% 10px no-repeat; }
.section-heading { position: relative; padding-bottom: 13px; }
.section-heading::after { content: ""; position: absolute; bottom: 3px; left: calc(50% - 4px); width: 6px; height: 6px; border: 1px solid #cfbfa4; transform: rotate(45deg); }
.section-heading::before { content: ""; position: absolute; bottom: 6px; left: calc(50% - 64px); width: 128px; height: 1px; background: linear-gradient(90deg, transparent, #b6a58b 40%, transparent 45%, transparent 55%, #b6a58b 60%, transparent); }
.game-card { position: relative; padding: 10px; overflow: visible; border-color: #b6a58b; border-radius: 4px; }
.game-card::before, .game-card::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  background: linear-gradient(#cfbfa4,#cfbfa4) left top / 15px 1px no-repeat,
    linear-gradient(#cfbfa4,#cfbfa4) left top / 1px 15px no-repeat,
    linear-gradient(#cfbfa4,#cfbfa4) right bottom / 15px 1px no-repeat,
    linear-gradient(#cfbfa4,#cfbfa4) right bottom / 1px 15px no-repeat;
}
.game-card::after { transform: scaleX(-1); }
.game-art img { border-radius: 2px; }
.tags { gap: 7px; }
.tags li { border: 1px solid rgba(207,191,164,.5); border-radius: 3px; padding: 3px 9px; color: var(--ivory); letter-spacing: 0; }
.tags li + li::before { content: none; }

/* La altura se mide sobre el área útil real del navegador, incluidas 650px.
   No se oculta el desbordamiento: los mínimos de contenido siguen siendo
   una salida segura al ampliar texto o usar ventanas demasiado pequeñas. */
@media (min-width: 1100px) and (min-height: 600px) {
  body {
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .header-inner { min-height: clamp(46px, 6.2dvh, 72px); }
  .header nav a { padding-block: clamp(14px, 1.8dvh, 24px); }
  .header nav [aria-current]::after { bottom: clamp(5px, .8dvh, 10px); }
  .brand { font-size: clamp(25px, 3.1dvh, 34px); }
  .brand-emblem { width: clamp(36px, 4.6dvh, 51px); height: clamp(36px, 4.6dvh, 51px); }
  .brand img { height: clamp(32px, 4.2dvh, 47px); }
  main { min-height: 0; display: grid; grid-template-rows: minmax(min-content, 1fr) auto; }
  .hero { min-height: 0; padding-block: clamp(8px, 1.2dvh, 18px); }
  .hero .eyebrow { margin-bottom: clamp(6px, .9dvh, 12px); }
  h1 { font-size: clamp(40px, min(4.35vw, 7.2dvh), 82px); }
  .intro { font-size: clamp(14px, 1.7dvh, 18px); margin-block: clamp(9px, 1.3dvh, 18px); max-width: 550px; }
  .button { min-height: clamp(34px, 4.2dvh, 46px); padding: clamp(8px, 1dvh, 12px) clamp(13px, 1.3vw, 22px); font-size: clamp(11px, 1.3dvh, 14px); }
  .hero-actions { gap: 12px; }
  .games { display: flex; flex-direction: column; justify-content: center; padding: 0 0 clamp(9px, 1.5dvh, 20px); }
  .section-heading { margin-bottom: clamp(7px, 1dvh, 13px); padding-bottom: 12px; }
  .section-heading .eyebrow { margin-bottom: clamp(2px, .4dvh, 5px); }
  h2 { font-size: clamp(20px, min(1.7vw, 3dvh), 31px); }
  .carousel { width: min(86%, 928.8px, 118.68dvh); }
  .game-card { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: calc(26dvh + clamp(14px, 2dvh, 22px) + 2px); padding: clamp(7px, 1dvh, 11px); }
  .game-art { display: flex; align-items: center; align-self: stretch; }
  .game-art img { width: 100%; height: auto; max-height: 26dvh; object-fit: contain; }
  .game-info { padding: clamp(3px, .6dvh, 9px) clamp(16px, 2dvh, 28px); }
  h3 { font-size: clamp(23px, 3dvh, 30px); margin-bottom: clamp(5px, .8dvh, 10px); }
  .game-info p { font-size: clamp(13px, 1.6dvh, 16px); }
  .tags { margin-block: clamp(7px, 1dvh, 12px); }
  .game-info .game-link { margin-top: 20px; }
  .tags li { font-size: clamp(9px, 1.2dvh, 11px); padding: 2px 8px; }
  .game-link { min-height: clamp(33px, 4dvh, 42px); padding-block: 7px; }
  .link-note { margin-top: 4px; line-height: 1.2; }
  .footer-inner { min-height: clamp(36px, 4.8dvh, 58px); }
  .footer p { margin-block: 6px; font-size: clamp(11px, 1.3dvh, 14px); }
  .footer nav { font-size: clamp(10px, 1.3dvh, 13px); }
}
@media (max-width: 1000px) {
  .container { width: 90%; }
  .brand { font-size: 25px; }
  nav { gap: 21px; }
  .hero-copy { max-width: 58%; }
  h1 { font-size: clamp(43px, 5.7vw, 60px); }
  .hero { min-height: 470px; }
  .game-info { padding: 22px; }
  h3 { font-size: 25px; }
}
@media (max-width: 650px) {
  body { background-size: auto 580px; background-position: 65% 100px; }
  .header-inner { flex-direction: column; gap: 0; padding-top: 13px; }
  .brand { font-size: 25px; }
  .brand-emblem { width: 40px; height: 40px; }
  .brand img { height: 37px; }
  .header nav { width: 100%; justify-content: space-between; gap: 12px; }
  .header nav a { font-size: 11px; padding-block: 19px; }
  .header nav [aria-current]::after { bottom: 10px; }
  .hero { padding-top: 265px; padding-bottom: 36px; min-height: auto; }
  .hero-copy { width: 100%; max-width: none; padding: 22px 16px; background: linear-gradient(180deg, rgba(7,16,25,.76), rgba(7,16,25,.96)); border-left: 1px solid var(--line); }
  .eyebrow { font-size: 9px; letter-spacing: 1.7px; gap: 9px; }
  .eyebrow::before { width: 19px; }
  h1 { font-size: clamp(39px, 10vw, 60px); letter-spacing: -1.4px; }
  .intro { font-size: 14px; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { width: 100%; }
  .games { padding-top: 0; }
  .section-heading { margin-bottom: 20px; }
  h2 { font-size: 23px; max-width: 370px; margin-inline: auto; }
  .game-card { grid-template-columns: 1fr; }
  .game-info { padding: 25px; }
  .game-info p { font-size: 14px; }
  .footer-inner { flex-direction: column; gap: 6px; padding-block: 20px; text-align: center; }
  .footer p { margin: 0 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
