/* Funston Games: shared styles for every page. Rally the Realm adds rtr.css on top.
   One dark, warm, glowing look: deep plum night, glass cards with thin warm borders and an orange accent line,
   small letter-spaced orange labels, a wide display font for headings, a mono font for captions.
   The site is dark by design, so it looks the same in light-mode and dark-mode browsers. */
:root {
  --bg: #1b1220;
  --bg-deep: #120b16;
  --surface-solid: #2a1c2c;
  --ink: #f4ece6;
  --muted: #c3b2b4;
  --faint: #a8959c;
  --line: rgba(255, 150, 110, .22);
  --line-strong: rgba(255, 150, 110, .45);
  --accent: #ff7a4d;
  --accent-2: #ffb547;
  --accent-ink: #2a1206;
  --link: #ffa77f;
  --green: #3fd6a0;
  --amber: #ffb547;
  --glass: linear-gradient(180deg, rgba(64, 40, 60, .62), rgba(40, 26, 42, .55));
  --glow: 0 0 0 1px rgba(255, 150, 110, .06), 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 18px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Orbitron", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 50% -120px, rgba(255, 122, 77, .18), transparent 70%),
    radial-gradient(700px 500px at 100% 30%, rgba(160, 70, 140, .16), transparent 70%),
    radial-gradient(800px 600px at 0% 80%, rgba(255, 140, 70, .08), transparent 70%),
    linear-gradient(180deg, #22152a 0%, var(--bg) 40%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font: 17px/1.65 var(--font);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-color: rgba(255, 167, 127, .45); }
a:hover { color: #ffd0b8; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: #fff; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: .02em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3.2rem); text-shadow: 0 0 28px rgba(255, 122, 77, .35); }
h2 { font-size: clamp(1.25rem, 2.8vw, 1.7rem); margin-top: 1.6em; }
h3 { font-size: 1.12rem; font-weight: 700; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
li::marker { color: var(--accent); }
strong { color: #fff; }
::selection { background: rgba(255, 122, 77, .4); color: #fff; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-solid); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* Small letter-spaced labels, like the dashboard's section titles */
.eyebrow, .crumbs, .tag, .footer-title {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-weight: 600;
}

/* Glass card with a short orange accent line on top */
.card, .panel, .game-card, .placeholder-card, .narrow > .prose {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.card::before, .panel::before, .game-card::before, .narrow > .prose::before {
  content: ""; position: absolute; top: -1px; left: 22px; width: 44px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(255, 122, 77, .7);
  z-index: 2;
}

/* Header: a dark glass bar. The blur sits on a layer behind it so the phone's bottom nav can float free. */
.site-header, .rtr-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.site-header::before, .rtr-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(22, 13, 26, .8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.header-inner { max-width: 1120px; margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--accent); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .2em; text-transform: uppercase; }
.brand span { text-shadow: 0 0 14px rgba(255, 122, 77, .35); }
.brand:hover { color: var(--accent-2); }

/* Nav: pills on wide screens, a floating rounded bar at the bottom on phones */
.site-nav, .rtr-nav { display: flex; gap: 4px; }
.site-nav a, .rtr-nav a {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 12px;
  font-family: var(--mono); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.site-nav a svg, .rtr-nav a svg { width: 18px; height: 18px; flex: none; }
.site-nav a:hover, .rtr-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.site-nav a[aria-current], .rtr-nav a[aria-current] {
  color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(255, 122, 77, .45);
}

/* Company pages */
.hero-company { padding: clamp(56px, 10vw, 120px) 0 clamp(36px, 6vw, 72px); }
.hero-company .eyebrow { color: var(--accent); font-size: .76rem; margin-bottom: 1.2em; display: flex; align-items: center; gap: 10px; }
.hero-company .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex: none; }
.hero-company h1 { max-width: 15em; }
.hero-company p.lead { font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 40em; }
.section { padding: 24px 0 56px; }
.section > .wrap > h2:first-child {
  font-family: var(--mono); font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.page-head { padding: 56px 0 16px; }
.page-head p { color: var(--muted); font-size: 1.08rem; }

.game-card {
  display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; color: var(--ink); text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.game-card:hover { border-color: var(--line-strong); box-shadow: var(--glow), 0 0 40px rgba(255, 122, 77, .2); transform: translateY(-2px); color: var(--ink); }
.game-card .shot { background: #1b1220 center/cover no-repeat; min-height: 300px; }
.game-card .info { padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.game-card .info img.icon {
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: 14px; padding: 3px; object-fit: cover;
  background: var(--surface-solid);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(255, 181, 71, .18), 0 0 24px rgba(255, 122, 77, .55);
}
.game-card h2, .game-card h3 { margin: 0 0 .3em; font-family: var(--display); font-size: 1.4rem; }
.game-card p { color: var(--muted); }
.game-card .more { color: var(--accent-2); font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.game-card:hover .more { text-decoration: underline; }

/* Status pill with a glowing dot */
.tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: .68rem; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 181, 71, .08); color: #ffd49a; border: 1px solid rgba(255, 181, 71, .3); margin-bottom: 10px; width: fit-content;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); flex: none; }
.placeholder-card {
  border-style: dashed; padding: 26px; color: var(--faint); text-align: center; margin-top: 20px;
  font-family: var(--mono); font-size: .88rem;
}

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 26px 22px 22px; }
.card h3 { margin-top: 0; font-family: var(--display); font-size: 1rem; letter-spacing: .04em; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

/* Orange-to-amber gradient pill button */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  padding: 12px 22px; border-radius: 12px; font-family: var(--mono); font-weight: 700; font-size: .86rem;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  box-shadow: 0 0 22px rgba(255, 122, 77, .4);
}
.button:hover { filter: brightness(1.08); color: var(--accent-ink); }

/* Long text pages: a glass reading card */
.prose { padding-bottom: 72px; }
.narrow > .prose { padding: 28px clamp(18px, 4vw, 34px); margin-bottom: 72px; }
.prose h2 { font-size: 1.12rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose .updated { color: var(--faint); font-family: var(--mono); font-size: .85rem; }
.callout {
  background: rgba(255, 122, 77, .08); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 14px 16px; margin: 1em 0 1.5em;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(14, 8, 17, .7); color: var(--muted); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 44px var(--gutter) 32px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 280px)); gap: 28px; }
.footer-cols a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.footer-cols a:hover { color: #fff; }
.footer-title { color: var(--accent); font-size: .72rem; margin-bottom: 10px; }
.fine { font-family: var(--mono); font-size: .74rem; line-height: 1.7; color: var(--faint); margin-top: 32px; margin-bottom: 0; }

@media (max-width: 760px) {
  .game-card { grid-template-columns: 1fr; }
  .game-card .shot { min-height: 0; aspect-ratio: 4 / 3; }
  .game-card .info { padding: 22px; }
  .cards3 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Phones: the nav becomes a floating rounded bar at the bottom, like the dashboard's */
@media (max-width: 640px) {
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .header-inner { justify-content: center; }
  .site-nav, .rtr-nav {
    position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: max-content; max-width: calc(100vw - 24px);
    padding: 6px; gap: 2px; border-radius: 20px;
    background: rgba(28, 17, 32, .92); border: 1px solid var(--line-strong);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .55), 0 0 24px rgba(255, 122, 77, .12);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .site-nav a, .rtr-nav a {
    flex-direction: column; gap: 4px; padding: 8px 10px; min-width: 66px; justify-content: center;
    font-size: .62rem; letter-spacing: .08em; white-space: nowrap; text-align: center;
  }
  .site-nav a svg, .rtr-nav a svg { width: 20px; height: 20px; }
}
