/* nopalgames.com — the company site.
   Desert palette, one typeface stack, no dependencies. Everything that looks
   like art here is CSS or inline SVG, which is why the whole site is a few
   kilobytes and works with the network off. */

:root {
  --dirt:      #2a1f18;
  --dirt-deep: #1b1310;
  --sand:      #f5e7cf;
  --sand-warm: #ecd6b0;
  --cactus:    #3f8a56;
  --cactus-lo: #2c6b41;
  --bloom:     #ff5f7a;
  --sun:       #ffb23f;
  --ink:       #17110d;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --shadow: 0 0.6rem 0 rgba(0, 0, 0, 0.18);
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 clamp(1rem, 0.4vw + 0.95rem, 1.125rem)/1.65
        ui-rounded, "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.05; margin: 0 0 0.6em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 900; }
h3 { font-size: clamp(1.25rem, 1.6vw, 1.6rem); font-weight: 800; }
p  { margin: 0 0 1em; }
em { font-style: normal; color: var(--cactus-lo); }

a { color: inherit; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--sand); padding: 0.75rem 1rem;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--bloom);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── top bar ───────────────────────────────────────────────────────────── */

.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem var(--pad);
  background: rgba(245, 231, 207, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(23, 17, 13, 0.1);
}

.mark { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.mark-art { width: 2.1rem; height: 2.1rem; }
.mark-art.small { width: 1.6rem; height: 1.6rem; }
.cactus {
  fill: none; stroke: var(--cactus); stroke-width: 6;
  stroke-linecap: round; stroke-linejoin: round;
}
.bloom { fill: var(--bloom); }
.mark-word { font-weight: 900; letter-spacing: 0.02em; font-size: 1.05rem; }
.mark-thin { font-weight: 400; opacity: 0.65; margin-left: 0.15em; }

.links { display: flex; gap: clamp(0.5rem, 1.5vw, 1.5rem); flex-wrap: wrap; }
.links a {
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 0.5rem 0.35rem; border-bottom: 3px solid transparent;
}
.links a:hover { border-bottom-color: var(--bloom); }
@media (max-width: 620px) { .links { display: none; } }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 8rem) var(--pad) clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(120% 80% at 80% -10%, var(--sun) 0%, transparent 55%),
    radial-gradient(90% 70% at 10% 110%, var(--sand-warm) 0%, transparent 60%),
    var(--sand);
}
.hero-inner { max-width: 54rem; position: relative; z-index: 2; }

/* Slow dust drifting across the hero. One element, one gradient, R5's
   "subtle ambient life, never busy" — it should be noticed second, not first. */
.dust {
  position: absolute; inset: -20% -10%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(3px 3px at 20% 30%, rgba(255,255,255,.55), transparent),
    radial-gradient(2px 2px at 70% 60%, rgba(255,255,255,.4), transparent),
    radial-gradient(2px 2px at 45% 80%, rgba(255,255,255,.35), transparent),
    radial-gradient(3px 3px at 88% 22%, rgba(255,255,255,.4), transparent);
  animation: drift 42s linear infinite;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(6%, -4%, 0); }
}

.kicker {
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; color: var(--cactus-lo); margin-bottom: 1.4rem;
}
.lede { font-size: clamp(1.05rem, 0.5vw + 1rem, 1.3rem); max-width: 42rem; }

.cta-row, .contact-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 900;
  padding: 0.85rem 1.4rem; border-radius: 999px; min-height: 44px;
  border: 3px solid var(--ink); transition: transform .12s ease, box-shadow .12s ease;
}
.btn-loud { background: var(--cactus); color: #fff; box-shadow: var(--shadow); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); box-shadow: none; }

.scroll-hint {
  position: relative; z-index: 2; margin: 3rem 0 0;
  font-weight: 700; opacity: 0.5; font-size: 0.85rem;
  animation: nudge 2.6s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translateY(6px); } }

/* ── bands ─────────────────────────────────────────────────────────────── */

.band { padding: clamp(3rem, 7vw, 6rem) var(--pad); }
.band > h2 { max-width: 50rem; }
.band-sub { max-width: 44rem; opacity: 0.8; font-size: 1.05rem; }

.band-dark { background: var(--dirt); color: var(--sand); }
.band-dark em { color: var(--sun); }
.band-dark .btn-quiet { border-color: var(--sand); color: var(--sand); }

.band-cactus {
  background: linear-gradient(160deg, var(--cactus) 0%, var(--cactus-lo) 100%);
  color: #fff;
}
.band-cactus em { color: var(--sun); }
.band-cactus .btn-loud { background: #fff; color: var(--cactus-lo); border-color: #fff; }
.band-cactus .btn-quiet { border-color: #fff; color: #fff; }

/* ── belief cards ──────────────────────────────────────────────────────── */

.cards {
  display: grid; gap: 1.2rem; margin-top: 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.card {
  position: relative; background: #fff; border: 3px solid var(--ink);
  border-radius: 1.2rem; padding: 1.6rem 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}
.card-num {
  position: absolute; top: -0.9rem; left: 1.2rem;
  background: var(--ink); color: var(--sand);
  font-weight: 900; font-size: 0.8rem; letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem; border-radius: 0.4rem;
}
.card p:last-child { margin-bottom: 0; }
.card-odd { background: var(--sun); }
.card-punch { font-weight: 900; font-size: 1.1rem; }

/* ── the games shelf ───────────────────────────────────────────────────── */

.shelf { display: grid; gap: 1.5rem; margin-top: 2.2rem; }
.release {
  display: grid; gap: 1.5rem; align-items: center;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(245, 231, 207, 0.25);
  border-radius: 1.2rem; padding: 1.3rem;
}
@media (max-width: 780px) { .release { grid-template-columns: 1fr; } }

.release-art {
  position: relative; aspect-ratio: 16 / 10; border-radius: 0.9rem;
  overflow: hidden; background: linear-gradient(#2d4a63, #6b4630 70%, #7d5334);
  display: grid; place-items: center;
}
/* Five roads, drawn with five divs, because the game has five roads and a
   placeholder screenshot would have been a lie. */
.lanes { position: absolute; inset: 0; display: grid; }
.lanes span {
  border-bottom: 2px solid rgba(0, 0, 0, 0.25);
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,.1) 0 14px, transparent 14px 34px);
  animation: roll 3.6s linear infinite;
}
.lanes span:nth-child(2) { animation-duration: 4.4s; }
.lanes span:nth-child(3) { animation-duration: 3.1s; }
.lanes span:nth-child(4) { animation-duration: 5.2s; }
.lanes span:nth-child(5) { animation-duration: 4s; border-bottom: none; }
@keyframes roll { to { background-position: 34px 0; } }

.release-badge {
  position: relative; z-index: 2;
  background: var(--sun); color: var(--ink); font-weight: 900;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 3px solid var(--ink); font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
/* THE SHOT STRIP (the owner: the in-development picture looked too quiet given
   we are 85% done). Four real screenshots over the rolling roads. WITH media/
   EMPTY THE WHOLE STRIP HIDES ITSELF — the first image's onerror adds
   .shot-none — so the panel falls back to the animated roads rather than to
   four broken-image icons. Drop the files in and it takes over. */
.shot-strip {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; width: 100%; padding: 0 10px 10px;
  align-self: flex-end;
}
.shot-strip img {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border: 2px solid var(--ink); border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  transition: transform 160ms ease;
}
.shot-strip img:nth-child(even) { transform: translateY(6px); }
.shot-strip.shot-none { display: none; }

/* NEARLY DONE, not "in development" — the honest badge for a game with all
   thirty-two missions built and multiplayer working. */
.release-badge-close { background: var(--mint, #7fd6a2); }

.release-tag { font-weight: 800; color: var(--sun); }
.release-note { opacity: 0.75; font-style: italic; }
.release-words h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }

.release-empty { opacity: 0.85; }
.release-art-empty {
  background: repeating-linear-gradient(45deg,
    rgba(245,231,207,.08) 0 12px, transparent 12px 24px);
}
.qmark { font-size: 5rem; font-weight: 900; opacity: 0.35; }

/* ── who ───────────────────────────────────────────────────────────────── */

.who-grid {
  display: grid; gap: 2rem; margin-top: 2rem;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 720px) { .who-grid { grid-template-columns: 1fr; } }

.who-art {
  background: var(--dirt); border-radius: 1.2rem; padding: 2rem 1rem 1rem;
  text-align: center; border: 3px solid var(--ink);
}
.shades { display: flex; align-items: center; justify-content: center; }
.lens {
  width: 3.4rem; height: 2.2rem; background: #0b0b0b;
  border-radius: 0.5rem 0.9rem 1.4rem 0.4rem;
  box-shadow: inset -0.4rem -0.3rem 0 rgba(255, 255, 255, 0.12);
}
.lens:last-child { transform: scaleX(-1); }
.bridge { width: 1rem; height: 0.4rem; background: #0b0b0b; }
.who-art-cap {
  margin: 1.2rem 0 0; font-size: 0.75rem; color: var(--sand-warm);
  opacity: 0.7; font-style: italic;
}
.who-role { font-weight: 800; color: var(--cactus-lo); }
.who-list { padding-left: 1.2rem; margin: 1.2rem 0; }
.who-list li { margin-bottom: 0.8rem; }
.who-foot { font-weight: 800; }

/* ── how ───────────────────────────────────────────────────────────────── */

.how-list { margin-top: 2.2rem; display: grid; gap: 0; }
.how-row {
  display: grid; gap: 0.3rem 2rem; padding: 1.4rem 0;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  border-top: 2px solid rgba(245, 231, 207, 0.2);
}
.how-row:last-child { border-bottom: 2px solid rgba(245, 231, 207, 0.2); }
@media (max-width: 760px) { .how-row { grid-template-columns: 1fr; } }
.how-key { font-weight: 900; color: var(--sun); font-size: 1.05rem; }
.how-row p { margin: 0; opacity: 0.9; }

.fineprint { margin-top: 1.4rem; font-size: 0.9rem; opacity: 0.8; }

/* ── footer ────────────────────────────────────────────────────────────── */

.foot {
  background: var(--dirt-deep); color: var(--sand-warm);
  padding: 2.5rem var(--pad); display: grid; gap: 0.6rem;
}
.foot-mark { display: flex; align-items: center; gap: 0.5rem; font-weight: 900; color: var(--sand); }
.foot p { margin: 0; font-size: 0.9rem; opacity: 0.75; }

/* Sections fade up as they arrive. script.js adds .seen; with no JS, or with
   reduced motion, everything is simply visible — the content never depends on
   the animation having run. */
.band, .release { opacity: 1; }
body.js .band, body.js .release { opacity: 0; transform: translateY(1.2rem); transition: opacity .6s ease, transform .6s ease; }
body.js .band.seen, body.js .release.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  body.js .band, body.js .release { opacity: 1; transform: none; }
}
