/* garigastudios.com. One stylesheet for every page. No build step: edit and reload.
   Colours come from the studio logo: black, stone white, the red of "STUDIOS", moss green, gold.
   Headings use the game's own pixel font (made by src/font.py); body text uses the system font. */

@font-face {
  font-family: "Riftscar Pixel";
  src: url("/assets/fonts/riftscar-pixel.woff") format("woff");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #000;
  --ink: #0d0a07;        /* the soft bands */
  --panel: #17110b;      /* cards */
  --line: #4d3a25;       /* card and rule edges */
  --stone: #efe9dc;      /* text */
  --dim: #bcb2a0;        /* secondary text (9.6:1 on black) */
  --red: #e5493c;        /* accent text (5.2:1 on black) */
  --red-btn: #b4271c;    /* button face (white on it: 6.6:1) */
  --red-deep: #6f150d;
  --moss: #93b24e;
  --moss-deep: #33421a;
  --gold: #f2bd3f;
  --pixel: "Riftscar Pixel", ui-monospace, "Cascadia Mono", "Courier New", monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 68rem;
  --px: 4px;             /* one "pixel" of the borders */
}

/* a soft cross-fade between pages, only for people who have not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--stone);
  font: 1.0625rem/1.65 var(--body);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
.px { image-rendering: pixelated; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: #ffd76a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, .lead, .eyebrow, .hero__tag, .cover__tag {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}
h1 { font-size: 1.875rem; margin: 0 0 1rem; }
h2 { font-size: 1.875rem; margin: 0 0 1rem; color: var(--stone); }
h3 { font-size: 1.25rem; margin: 0 0 0.5rem; color: var(--gold); }
p { margin: 0 0 1rem; }
code { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 0.92em; color: var(--dim); }
strong { color: #fff; }
hr { border: 0; height: var(--px); margin: 2rem auto; width: 8rem; background: var(--line); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 10; padding: 0.5rem 0.9rem; background: var(--gold); color: #000; font: 1.25rem/1.2 var(--pixel); text-decoration: none; }
.skip:focus { top: 0.5rem; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.center { text-align: center; }
.lead { font-size: 1.25rem; color: var(--gold); margin-bottom: 1rem; }
.eyebrow { font-size: 1.25rem; color: var(--moss); margin: 0 0 1rem; text-transform: uppercase; }
.fine { font-size: 0.9375rem; color: var(--dim); }
.badge {
  display: inline-block; vertical-align: middle;
  padding: 0.05em 0.5em 0.1em; margin-inline: 0.15em;
  background: var(--gold); color: #000;
  font: 1.25rem/1.2 var(--pixel); text-transform: uppercase;
}

/* ---- header and footer ---- */
.top { border-bottom: var(--px) solid var(--ink); }
.top__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; padding-block: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--stone); text-decoration: none; font: 1.25rem/1.2 var(--pixel); text-transform: uppercase; padding-block: 0.25rem; }
.brand b { font-weight: 400; color: var(--red); }
.menu { display: flex; align-items: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.menu a { display: block; padding: 0.6rem 0.7rem; color: var(--stone); text-decoration: none; font: 1.25rem/1.2 var(--pixel); }
.menu a:hover, .brand:hover { color: var(--gold); }
.menu a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 calc(var(--px) * -1) 0 var(--gold); }
.menu .langs { display: flex; margin-left: 0.4rem; box-shadow: inset 0 0 0 2px var(--line); }
.menu .lang { display: block; padding: 0.6rem 0.6rem; font: 1.25rem/1.2 var(--pixel); }
.menu .lang--on { background: var(--gold); color: #000; }      /* the language you are reading */
.menu a.lang { color: var(--dim); }
.menu a.lang:hover { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }

.foot { border-top: var(--px) solid var(--ink); padding-block: 2rem 2.5rem; color: var(--dim); font-size: 0.9375rem; }
.foot__in { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.foot__tag { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; font: 1.25rem/1.2 var(--pixel); color: var(--stone); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.5rem; margin: 0; padding: 0; list-style: none; }
.foot__links a { display: block; padding: 0.5rem 0.6rem; }
.foot__legal { margin: 0; }

/* ---- buttons: square pixels, notched corners made with four shadows ---- */
.actions { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; margin: 1.5rem 0 1rem; padding: var(--px); }
.center .actions, .cover .actions { justify-content: center; }
.btn {
  display: inline-block; padding: 0.7rem 1.2rem 0.8rem;
  background: var(--red-btn); color: #fff;
  font: 1.25rem/1.2 var(--pixel); text-transform: uppercase; text-decoration: none; text-align: center;
  box-shadow: 0 calc(var(--px) * -1) 0 var(--red-btn), calc(var(--px) * -1) 0 0 var(--red-btn), var(--px) 0 0 var(--red-btn), 0 var(--px) 0 var(--red-deep), inset 0 calc(var(--px) * -1) 0 var(--red-deep);
}
.btn:hover { background: #cf3226; color: #fff; }
.btn:active { transform: translateY(2px); }
.btn--quiet {
  background: var(--panel); color: var(--stone);
  box-shadow: 0 calc(var(--px) * -1) 0 var(--line), calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line), 0 var(--px) 0 var(--line);
}
.btn--quiet:hover { background: #241a10; color: var(--gold); }
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color 0.12s; } }

/* ---- sections ---- */
.band { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.band--soft, .band--cta { background: var(--ink); position: relative; }
/* a strip of moss with a red flower now and then, like the vines under the logo */
.band--soft::before, .band--cta::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: var(--px);
  background: repeating-linear-gradient(90deg, var(--moss-deep) 0 20px, #55701f 20px 24px, var(--moss-deep) 24px 52px, var(--red-btn) 52px 56px);
}
.prose { max-width: 44rem; }
/* a section of text keeps the left edge of the other sections; only its lines are kept short */
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: 44rem; }
.wrap.prose--doc { max-width: 44rem; }
.prose--doc h2 { font-size: 1.25rem; color: var(--gold); margin-top: 2.25rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--moss); }
.split { display: grid; gap: 2rem 3rem; align-items: start; }
.note { background: var(--panel); padding: 1.25rem 1.4rem 0.5rem; box-shadow: 0 calc(var(--px) * -1) 0 var(--line), calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line), 0 var(--px) 0 var(--line); margin: var(--px); }
.mail { font: 1.25rem/1.2 var(--pixel); }
.mailrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.btn--small { padding: 0.45rem 0.9rem 0.55rem; font-size: 1.25rem; }
#contacto { scroll-margin-top: 1rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0 !important; list-style: none; }
.log { color: var(--dim); }

/* ---- home ---- */
.hero { padding-block: clamp(1.5rem, 5vw, 3rem) clamp(2rem, 6vw, 3.5rem); text-align: center; }
.hero__logo { margin: 0; }
.hero__logo img { margin-inline: auto; width: min(88vw, 560px, 80vh); }      /* 80vh: a phone on its side still shows the line under it */
.hero__tag { margin: 0.5rem 0 0; font-size: 1.25rem; color: var(--gold); }
.feature { display: grid; gap: 1.5rem 2.5rem; align-items: center; }
.feature__art { display: block; margin: var(--px); box-shadow: 0 calc(var(--px) * -1) 0 var(--line), calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line), 0 var(--px) 0 var(--line); }
.feature__art img { width: 100%; }
.feature h2 a { color: var(--stone); text-decoration: none; }
.feature h2 a:hover { color: var(--gold); }

/* ---- the game page ---- */
.cover { position: relative; isolation: isolate; display: grid; align-items: end; min-height: min(82vh, 46rem); padding-block: 3rem 2rem; text-align: center; overflow: hidden; }
.cover__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(#000a 0%, #0004 30%, #0006 60%, #000 100%); }
.cover__by { margin: 0 0 0.75rem; font: 1.25rem/1.2 var(--pixel); color: var(--stone); text-shadow: 2px 2px 0 #000; }
.cover__by a { color: #ffd76a; }
.cover__logo { margin: 0 0 0.5rem; }
.cover__logo img { margin-inline: auto; width: 441px; }
.cover__tag { margin: 0; font-size: 1.25rem; color: #ffd76a; text-shadow: 2px 2px 0 #000; }
.cover .fine { color: var(--stone); text-shadow: 1px 1px 0 #000; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.75rem 1.5rem; margin: 1.5rem 0 0; padding: var(--px); list-style: none; }
.card { background: var(--panel); padding-bottom: 0.5rem; box-shadow: 0 calc(var(--px) * -1) 0 var(--line), calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line), 0 var(--px) 0 var(--line); }
.card__art { display: block; background: #000; }
.card__art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card h3, .card p { margin-inline: 1.1rem; }
.card h3 { margin-top: 1rem; }
.card p { color: var(--dim); font-size: 1rem; }
.clip img { width: 100%; max-width: 480px; margin: var(--px) auto; image-rendering: pixelated; box-shadow: 0 calc(var(--px) * -1) 0 var(--line), calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line), 0 var(--px) 0 var(--line); }

/* ---- press ---- */
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.75rem; padding-block: 0.55rem; border-bottom: 2px solid var(--line); }
.facts dt { font: 1.25rem/1.2 var(--pixel); color: var(--moss); }
.facts dd { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1.5rem 1.25rem; margin: 1.25rem 0 0; padding: var(--px); list-style: none; }
.gallery a { display: block; color: var(--stone); text-decoration: none; background: var(--panel); box-shadow: 0 calc(var(--px) * -1) 0 var(--line), calc(var(--px) * -1) 0 0 var(--line), var(--px) 0 0 var(--line), 0 var(--px) 0 var(--line); }
.gallery a:hover { color: var(--gold); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.gallery .on-dark { padding: 0.75rem; }
.gallery span { display: block; padding: 0.6rem 0.8rem 0.7rem; font-size: 0.9375rem; }

/* ---- 404 ---- */
.lost { min-height: 100vh; min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 0.25rem; padding: 2rem 1rem; text-align: center; }
.lost h1 { font-size: 5rem; color: var(--red); margin: 0.5rem 0 0.25rem; }
.lost .actions { justify-content: center; margin-top: 0.75rem; }

/* ---- wider screens ---- */
@media (min-width: 44rem) {
  h1 { font-size: 2.5rem; }
  .hero__tag, .cover__tag { font-size: 1.875rem; }
  .btn--big { font-size: 1.875rem; padding: 0.8rem 1.6rem 1rem; }
}
@media (min-width: 54rem) {
  .feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* the game's logo is pixel art: shown at exactly twice its size, with hard pixels, when there is room */
@media (min-width: 62rem) {
  .cover__logo .px-2x { width: 882px; image-rendering: pixelated; }
}
@media (max-width: 30rem) {
  h2 { font-size: 1.25rem; }
  .cover__logo img { width: min(100%, 441px); }
  .actions .btn { flex: 1 1 auto; }
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
}
