/* Rawbit Games — hoja de estilos única. Sin dependencias ni JavaScript.
   Colores sacados del logo (índigo del hexágono y ámbar del borde) y, en la banda de
   Roll & Risk, de su logo y su cápsula de Steam. */

/* Figtree, fuente de la marca Rawbit, y Press Start 2P, la de Roll & Risk (SIL OFL 1.1). */
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("/fonts/PressStart2P-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #1d1333;          /* interior del hexágono */
  --ink-deep: #150d26;
  --ink-line: #30244f;
  --amber: #ff9f00;        /* borde del hexágono */
  --amber-hot: #ffb433;
  --shadow: #0b0616;
  --paper: #f6efdf;
  --lilac: #bdb2d8;
  --rr-bg: #1e0e0c;        /* fondo de la cápsula de Roll & Risk */
  --rr-line: #2b1613;
  --rr-bone: #ead2a0;      /* el dado del logo */
  --rr-dot: #d4953f;       /* la línea de puntos */
  --rr-red: #dc3b37;
  --rr-text: #d9c6a9;
  --wrap: 1120px;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { line-height: 1.06; letter-spacing: -0.025em; font-weight: 900; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--amber); color: var(--ink); padding: .5rem .9rem; font-weight: 800; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Cabecera */
.site-header { border-bottom: 2px solid var(--ink-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.wordmark { font-weight: 900; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; }
.wordmark span { color: var(--amber); }
nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
nav a {
  color: var(--lilac); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding-bottom: 2px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
nav a:hover { color: var(--paper); border-bottom-color: var(--amber); }

/* Botones con sombra dura, como los de una interfaz de juego */
.btn {
  display: inline-block; padding: .95rem 1.45rem;
  background: var(--amber); color: var(--ink);
  font-weight: 800; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  border-radius: 3px; box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .08s, box-shadow .08s, background-color .15s;
}
.btn:hover { background: var(--amber-hot); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.link-arrow {
  font-weight: 800; text-decoration: none; color: var(--paper);
  border-bottom: 2px solid var(--amber); padding-bottom: 2px; transition: color .15s;
}
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--amber); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.8rem; margin-top: 2.4rem; }

/* Portada */
.hero { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(5rem, 11vw, 8.5rem); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.hero-sub { color: var(--lilac); font-size: clamp(1.1rem, 1.8vw, 1.3rem); margin-top: 1.6rem; max-width: 36rem; }
.hero-sub a { color: var(--paper); text-decoration-color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.hero-mark { position: relative; justify-self: center; width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; }
.hero-mark img { width: 88%; height: auto; position: relative; }
.hex-ring { position: absolute; inset: -8%; width: 116%; height: 116%; transform: rotate(9deg); }
.hex-ring polygon { fill: none; stroke: var(--amber); stroke-width: .6; opacity: .35; stroke-dasharray: 2 2.2; }

/* Roll & Risk: su propio mundo, como una pantalla de título */
.rr {
  background:
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0, 0, 0, .5) 100%),
    linear-gradient(var(--rr-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--rr-line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--rr-bg);
  padding: 3.5rem 0 clamp(4.5rem, 10vw, 7rem);
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}
.rr-divider { display: flex; align-items: center; justify-content: center; gap: 14px; padding-inline: 1.25rem; }
.rr-dots {
  flex: 1; max-width: 360px; height: 4px;
  background: linear-gradient(90deg, var(--rr-dot) 4px, transparent 4px) 0 0 / 12px 4px repeat-x;
}
.rr-die { width: 36px; height: 36px; flex: none; }
.rr-die .die-face { fill: var(--rr-bone); }
.rr-die .die-pip { fill: #3b2419; }
.rr-inner { max-width: 780px; text-align: center; }
.rr-label { font-family: var(--pixel); font-size: .68rem; color: var(--rr-bone); letter-spacing: .08em; text-transform: uppercase; margin: 2.8rem 0 1.8rem; }
.rr-title img { width: min(100%, 440px); height: auto; margin-inline: auto; image-rendering: pixelated; }
.rr-tagline { font-weight: 800; font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--rr-bone); margin-top: 2.2rem; }
.rr-pitch { color: var(--rr-text); max-width: 40rem; margin: 1rem auto 0; }
.rr-facts { color: #b3987a; font-size: .92rem; font-weight: 600; margin-top: 1.3rem; }
.rr-facts .fact { white-space: nowrap; }
.rr-facts .sep { color: var(--rr-dot); margin: 0 .45rem; }
.actions-center { justify-content: center; }
.btn-rr { background: var(--rr-red); color: #fff6ea; box-shadow: 4px 4px 0 #000; }
.btn-rr:hover { background: #ea4a45; box-shadow: 6px 6px 0 #000; }
.btn-rr:active { box-shadow: 2px 2px 0 #000; }
.link-rr { border-bottom-color: var(--rr-dot); }
.link-rr:hover { color: var(--rr-bone); }

/* Estudio */
.studio { background: var(--ink-deep); padding: clamp(4.5rem, 10vw, 7rem) 0; border-bottom: 2px solid var(--ink-line); }
.studio-inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 5vw, 4rem); }
.studio h2, .contact h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); display: flex; align-items: center; gap: .7rem; }
.studio h2::before, .contact h2::before {
  content: ""; width: 14px; height: 16px; flex: none; background: var(--amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.studio-text p { color: var(--lilac); font-size: 1.15rem; max-width: 40rem; }
.studio-text p:first-child { color: var(--paper); font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; }
.studio-text p + p { margin-top: 1.1rem; }
.principles { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; flex-wrap: wrap; gap: .8rem 2rem; }
.principles li { font-weight: 800; display: inline-flex; align-items: center; gap: .55rem; }
.principles li::before {
  content: ""; width: 9px; height: 10px; background: var(--amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/* Contacto */
.contact { padding: clamp(4.5rem, 10vw, 7rem) 0 clamp(5rem, 11vw, 8rem); }
.contact-sub { color: var(--lilac); font-size: 1.15rem; margin-top: 1rem; }
.email {
  display: inline-block; margin-top: 1.8rem;
  font-size: clamp(1.6rem, 5.2vw, 3.3rem); font-weight: 900; letter-spacing: -0.02em;
  color: var(--amber); text-decoration: none; overflow-wrap: anywhere;
  border-bottom: 4px solid transparent; transition: border-color .15s, color .15s;
}
.email:hover { color: var(--amber-hot); border-bottom-color: var(--amber-hot); }
.social { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; margin-top: 1.8rem; }
.social a { color: var(--lilac); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--ink-line); padding-bottom: 2px; }
.social a:hover { color: var(--paper); border-bottom-color: var(--amber); }

/* Pie */
.site-footer { background: var(--ink-deep); border-top: 2px solid var(--ink-line); padding: 1.6rem 0; color: var(--lilac); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--lilac); }
.site-footer a:hover { color: var(--paper); }

/* Press kits */
.pixel-note { font-family: var(--pixel); font-size: .7rem; color: var(--amber); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1.4rem; }
nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--amber); }
.press-hero { padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(3rem, 7vw, 4.5rem); border-bottom: 2px solid var(--ink-line); }
.press-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.press-lead { color: var(--lilac); font-size: clamp(1.1rem, 1.8vw, 1.25rem); max-width: 40rem; margin-top: 1rem; }
.press-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 4rem);
  align-items: start; padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(4rem, 9vw, 6rem);
}
.factsheet { position: sticky; top: 1.5rem; background: var(--ink-deep); border: 2px solid var(--ink-line); padding: 1.6rem 1.5rem; }
.factsheet h2, .press-section h2 { font-size: 1.45rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: .6rem; }
.factsheet h2::before, .press-section h2::before, .features li::before {
  content: ""; width: 11px; height: 13px; flex: none; background: var(--amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.factsheet dl { margin: 1.2rem 0 0; display: grid; gap: 1rem; }
.factsheet dt { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lilac); }
.factsheet dd { margin: .15rem 0 0; font-weight: 700; }
.factsheet a, .press-section p a {
  color: var(--paper); text-decoration-color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 2px;
}
.press-section + .press-section { margin-top: clamp(2.5rem, 6vw, 3.5rem); }
.press-section p { color: var(--lilac); max-width: 44rem; margin-top: 1rem; }
.features { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .9rem; }
.features li { color: var(--lilac); padding-left: 1.5rem; position: relative; max-width: 44rem; }
.features li::before { position: absolute; left: 0; top: .45em; width: 9px; height: 10px; }
.features strong { color: var(--paper); }
.assets { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.assets figure { margin: 0; height: 100%; display: flex; flex-direction: column; background: var(--ink-deep); border: 2px solid var(--ink-line); }
.assets img {
  width: 100%; height: 170px; object-fit: contain; padding: 1rem;
  background: repeating-conic-gradient(#251b42 0% 25%, #1c1434 0% 50%) 0 0 / 20px 20px;
}
.assets img.pixelated, .press-game img { image-rendering: pixelated; }
.assets figcaption {
  margin-top: auto; padding: .75rem .9rem; border-top: 2px solid var(--ink-line);
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  font-size: .85rem; color: var(--lilac);
}
.assets figcaption a {
  flex: none; padding: .25rem .6rem; border-radius: 2px; background: var(--amber); color: var(--ink);
  font-weight: 800; text-decoration: none; box-shadow: 2px 2px 0 var(--shadow);
}
.assets figcaption a:hover { background: var(--amber-hot); }
.note { font-size: .92rem; }
.note code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--paper); }
.press-game {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 1.2rem; align-items: center;
  margin-top: 1.2rem; padding: 1rem; background: var(--rr-bg); border: 2px solid #000;
  color: var(--rr-text); text-decoration: none; box-shadow: 4px 4px 0 #000; transition: transform .1s, box-shadow .1s;
}
.press-game:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.press-game img { width: 100%; height: auto; }
.press-game strong { display: block; color: var(--rr-bone); font-size: 1.3rem; font-weight: 900; margin-bottom: .3rem; }
.press-game-more { display: inline-block; margin-top: .6rem; font-weight: 800; color: var(--paper); border-bottom: 2px solid var(--rr-dot); }
.press-game-more::after { content: " →"; }
.rr-press { padding-bottom: clamp(3rem, 7vw, 4.5rem); }
.footer-links { display: flex; gap: 1.5rem; }

/* Páginas de texto (privacidad, 404) */
.page { padding: clamp(4rem, 10vw, 6.5rem) 0; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.3rem); margin-bottom: 1.4rem; }
.page h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin: 2.4rem 0 .6rem; }
.page p, .page li { color: var(--lilac); max-width: 44rem; }
.page p + p { margin-top: 1rem; }
.page a { color: var(--paper); text-decoration-color: var(--amber); text-underline-offset: 3px; }
.page .updated { font-size: .9rem; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { order: -1; width: 200px; justify-self: start; }
  .studio-inner { grid-template-columns: 1fr; }
  .press-grid { grid-template-columns: 1fr; }
  .factsheet { position: static; }
}
@media (max-width: 520px) {
  .wordmark span { display: none; }
  nav { gap: 1rem; }
  nav a { font-size: .9rem; }
  .hero-mark { width: 150px; }
  .press-game { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .wordmark { display: none; }
}
