/* FastRonin — Madrid social play, vermillion & gold */
:root {
  --ink: #1c140e;
  --ink-soft: #5c4636;
  --muted: #7a6454;
  --paper: #f4e6cc;
  --washi: #ead7b6;
  --cream: #fff6e8;
  --vermillion: #c0392b;
  --vermillion-deep: #8c2418;
  --gold: #c9a227;
  --gold-deep: #9a7a14;
  --pine: #234038;
  --pine-deep: #152820;
  --wave: #2a5866;
  --lantern: #e39a3c;
  --line: #d4c09a;
  --radius: 10px;
  --max: 1140px;
  --font-display: Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 18px 10px, rgba(42, 88, 102, 0.07) 7px, transparent 8px),
    radial-gradient(circle at 0 10px, rgba(42, 88, 102, 0.07) 7px, transparent 8px);
  background-size: 36px 20px;
  line-height: 1.6;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: 0.8rem;
  top: -3.2rem;
  z-index: 120;
  background: var(--vermillion);
  color: #fff;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 0.7rem;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

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

a {
  color: var(--vermillion-deep);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--vermillion);
}

h1,
h2,
h3,
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--cream);
}

.brand-name {
  display: block;
  font-size: 1.35rem;
}

.brand-name span {
  color: var(--vermillion);
}

.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 0.35rem 1.15rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.98rem;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--vermillion);
}

.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: grid;
  align-items: end;
  color: var(--cream);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 20, 14, 0.72) 0%, rgba(28, 20, 14, 0.28) 48%, rgba(28, 20, 14, 0.08) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem;
  max-width: 36rem;
}

.hero-copy h1 {
  color: var(--cream);
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  margin: 0 0 0.85rem;
  text-shadow: 0 2px 0 rgba(28, 20, 14, 0.45);
}

.hero-copy p {
  color: #f3e2c6;
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
}

.btn-primary {
  background: var(--vermillion);
  color: #fff;
  border-color: var(--vermillion-deep);
}

.btn-primary:hover {
  background: var(--vermillion-deep);
  color: #fff;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold-deep);
}

.btn-gold:hover {
  background: #d8b33a;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--gold);
}

.btn-ghost:hover {
  background: rgba(201, 162, 39, 0.18);
  color: #fff;
}

.btn-ink {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.btn-ink:hover {
  background: var(--pine-deep);
  color: #fff;
}

.section {
  padding: 3.4rem 0;
}

.section-pine {
  background: var(--pine);
  color: var(--cream);
}

.section-pine h2,
.section-pine h3 {
  color: var(--cream);
}

.section-pine p {
  color: #d7c7a8;
}

.section-cream {
  background: var(--cream);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.6rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin: 0 0 0.55rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.game-card {
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.game-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.game-card-body {
  padding: 1rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.game-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.game-card p {
  margin: 0 0 0.6rem;
  flex: 1;
}

.disclaimer {
  margin-top: 1.2rem;
  padding: 0.9rem 1rem;
  background: var(--washi);
  border-left: 4px solid var(--vermillion);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.disclaimer a {
  font-weight: 700;
}

.play-frame {
  background: var(--ink);
  padding: 0.85rem;
}

.play-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.9rem;
}

.play-head h2 {
  color: var(--cream);
  margin: 0;
}

.play-head p {
  color: #d7c7a8;
  margin: 0.35rem 0 0;
}

.game-frame-wrap {
  position: relative;
  width: min(100%, 420px);
  margin-inline: auto;
  aspect-ratio: 1 / 1.16;
  background: #1c140e center / cover no-repeat;
  overflow: hidden;
}

.game-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #1c140e;
}

.facade-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  background: rgba(28, 20, 14, 0.42);
  padding: 1.4rem;
  text-align: center;
}

.facade-panel p {
  color: var(--cream);
  max-width: 28rem;
  margin: 0;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.path-item {
  background: var(--cream);
  padding: 1.15rem 1.1rem;
  border-top: 4px solid var(--gold);
}

.path-item strong {
  display: block;
  color: var(--vermillion);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.path-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.path-item p {
  margin: 0;
}

.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.7rem;
}

.gallery figure {
  margin: 0;
  position: relative;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 180px;
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.75rem;
  background: rgba(28, 20, 14, 0.62);
  color: var(--cream);
  font-size: 0.88rem;
}

.gallery figure:first-child {
  grid-row: 1 / span 2;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.6rem;
  align-items: center;
}

.split img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.why-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.4rem;
}

.why-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

.why-item p {
  margin: 0;
}

.partner-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.partner-card {
  display: block;
  background: var(--pine-deep);
  color: var(--cream);
  text-decoration: none;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
}

.partner-card:hover {
  color: #fff;
  border-color: var(--gold);
}

.partner-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.partner-card span {
  color: #d7c7a8;
  font-size: 0.9rem;
}

.page-hero {
  padding: 2.4rem 0 0.4rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin: 0 0 0.6rem;
}

.prose {
  max-width: 48rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 1.7rem 0 0.5rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.prose li + li {
  margin-top: 0.35rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.6rem;
}

.contact-card {
  background: var(--cream);
  padding: 1.2rem;
  border: 1px solid var(--line);
}

.contact-card h2 {
  margin-top: 0;
}

label {
  display: block;
  font-weight: 700;
  margin: 0.7rem 0 0.3rem;
}

input,
textarea,
select {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-success {
  display: none;
  margin-top: 0.8rem;
  padding: 0.8rem;
  background: var(--washi);
  border-left: 4px solid var(--pine);
}

.form-success.is-visible {
  display: block;
}

.site-footer {
  background: var(--ink);
  color: #f3ead8;
  padding: 2.6rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 1.4rem;
}

.site-footer p,
.site-footer li {
  color: #f3ead8;
}

.site-footer .disclaimer {
  background: rgba(255, 248, 234, 0.08);
  color: #f3ead8;
  border-left-color: var(--gold);
}

.site-footer h3 {
  color: #fff8ea;
  font-size: 1.05rem;
  margin: 0 0 0.7rem;
}

.site-footer a {
  color: #f5d56a;
}

.site-footer a:hover {
  color: #fff8ea;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.35rem;
}

.footer-brand .brand-name {
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.28);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #efe4cc;
}

.footer-bottom p {
  color: #efe4cc;
}

.age-gate,
.cookie-banner {
  display: none;
}

.age-gate.is-open {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 20, 14, 0.78);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.age-panel {
  background: var(--cream);
  max-width: 28rem;
  padding: 1.5rem;
  border-top: 6px solid var(--vermillion);
}

.age-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.cookie-banner.is-open {
  display: block;
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1rem;
  max-width: 640px;
  margin-inline: auto;
}

.cookie-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.game-stage {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 0.8rem;
}

.game-board {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: min(70vh, 560px);
}

.game-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.game-hud {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  font-weight: 700;
}

.game-hint {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
}

body.game-fit .section-game {
  padding-top: 0.6rem;
}

.note-bar {
  background: var(--washi);
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--gold);
  margin: 1rem 0;
}

.error-page {
  min-height: 52vh;
  display: grid;
  align-items: center;
}

@media (max-width: 980px) {
  .games-grid,
  .path-grid,
  .partner-row,
  .footer-grid,
  .contact-grid,
  .split,
  .why-list {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery figure:first-child {
    grid-row: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem 1rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
  }

  .header-inner {
    position: relative;
  }

  .games-grid,
  .path-grid,
  .partner-row,
  .footer-grid,
  .contact-grid,
  .split,
  .why-list,
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-media::after {
    background: linear-gradient(180deg, rgba(28, 20, 14, 0.12) 18%, rgba(28, 20, 14, 0.78) 100%);
  }

  .game-hud {
    margin-left: 0;
    width: 100%;
  }

  .play-head {
    flex-direction: column;
    align-items: start;
  }

  .play-frame {
    padding: 0.5rem;
  }

  .game-frame-wrap {
    width: 100%;
    max-width: none;
  }
}

body.embed-mode .site-header,
body.embed-mode .site-footer,
body.embed-mode .page-hero,
body.embed-mode .disclaimer,
body.embed-mode .age-gate,
body.embed-mode .cookie-banner,
body.embed-mode .skip-link {
  display: none !important;
}

html.embed-mode,
body.embed-mode {
  background: #1c140e;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

body.embed-mode {
  position: fixed;
  inset: 0;
  width: 100%;
  margin: 0;
  background-image: none;
}

body.embed-mode main {
  height: 100%;
  overflow: hidden;
}

body.embed-mode .section-game {
  padding: 0;
  height: 100%;
}

body.embed-mode .section-game .wrap {
  width: 100%;
  max-width: none;
  padding: 0;
  height: 100%;
}

body.embed-mode .game-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  padding: 0.35rem;
  background: #1c140e;
}

body.embed-mode .game-toolbar {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

body.embed-mode .game-toolbar .btn {
  min-height: 34px;
  padding: 0.28rem 0.6rem;
  font-size: 0.82rem;
}

body.embed-mode .game-toolbar .btn[href="/games"] {
  display: none;
}

body.embed-mode .game-hud {
  width: auto;
  margin-left: auto;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: #fff6e8;
}

body.embed-mode .game-board {
  flex: 1;
  min-height: 0;
  width: 100%;
}

body.embed-mode .game-hint {
  display: none;
}
