/* Orellis Games: colours from the apps' theme.ts (felt #0A7A2E, feltDeep #075F23, red #D3122A, card-back cream #F7F3EA). */
:root {
  --felt: #0A7A2E;
  --felt-deep: #075F23;
  --felt-dark: #04431A;
  --cream: #F7F3EA;
  --paper: #FFFFFF;
  --ink: #141414;
  --ink-soft: #3D3D3A;
  --red: #D3122A;
  --red-deep: #A30D20;
  --gold: #D9A21B;
  --line: #E4DDCD;
  --radius: 18px;
  --wrap: 1120px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--felt-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header on felt ---------- */
.site-header {
  color: #fff;
  background:
    radial-gradient(ellipse at 30% -10%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(ellipse at 100% 120%, rgba(0,0,0,.28), transparent 55%),
    var(--felt);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--font); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 22%;
  display: grid; place-items: center;
  background: var(--cream); color: var(--red);
  font-size: 1.5rem; font-weight: 900; line-height: 1;
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.nav-links { display: flex; gap: 6px 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; border-bottom-color: rgba(255,255,255,.8); }

.hero { padding-top: 56px; padding-bottom: 88px; }
.hero p.lead { font-size: clamp(1.2rem, 2.6vw, 1.45rem); max-width: 34em; color: rgba(255,255,255,.94); margin-bottom: 0; }
.hero .suits { font-size: 1.4rem; letter-spacing: .4em; margin-bottom: 18px; color: rgba(255,255,255,.85); }
.hero .suits .r { color: #FF8A80; }
.page-hero { padding-top: 36px; padding-bottom: 56px; }
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); }
.page-hero p { color: rgba(255,255,255,.92); font-size: 1.2rem; margin: 0; max-width: 36em; }

/* ---------- Games ---------- */
.games { padding: 0 0 72px; }
.games .wrap > h2 { margin-top: 64px; }
.game-grid {
  list-style: none; margin: -48px 0 0; padding: 0;
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
.game-card {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 32px rgba(4,67,26,.12);
  padding: 28px;
  display: flex; flex-direction: column;
}
.game-card .icon { width: 112px; height: 112px; border-radius: 22%; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.18); margin-bottom: 20px; }
.game-card .icon img { width: 100%; height: 100%; }
.game-card h3 { margin-bottom: 8px; }
.badge {
  display: inline-block; align-self: flex-start;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em;
  color: var(--felt-dark); background: #E3F1E7; border: 1px solid #BFDDC8;
  border-radius: 999px; padding: 2px 12px; margin-bottom: 14px;
}
.game-card p { color: var(--ink-soft); }
.store-badges { margin-top: auto; padding-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; min-height: 8px; }

/* ---------- Content sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section p { max-width: 40em; }
.contact-line { font-size: 1.3rem; font-weight: 600; }
.btn {
  display: inline-block; font-family: var(--font); font-weight: 700; font-size: 1.1rem;
  background: var(--red); color: #fff; text-decoration: none;
  padding: 14px 26px; border-radius: 999px; border: 2px solid #111;
  box-shadow: 0 4px 0 #111;
}
.btn:hover { background: var(--red-deep); color: #fff; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #111; }

/* Long-form pages (support, privacy) */
.prose { padding: 48px 0 72px; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.5rem, 3.4vw, 1.9rem); }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose .meta { color: var(--ink-soft); font-style: italic; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin: 24px 0; }
.panel > :last-child { margin-bottom: 0; }
.app-head { display: flex; align-items: center; gap: 16px; margin-top: 2.2em; }
.app-head img { width: 56px; height: 56px; border-radius: 22%; box-shadow: 0 3px 8px rgba(0,0,0,.15); flex: none; }
.app-head h2 { margin: 0; }
.toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; font-size: 1.08rem; }
details[open] summary { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--felt-dark); color: rgba(255,255,255,.9); padding: 40px 0 48px; font-size: 1rem; }
.site-footer a { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 0; }
.footer-links li + li::before { content: "·"; margin: 0 12px; color: rgba(255,255,255,.6); }
.legal { margin: 0; max-width: 46em; }

@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .hero { padding-top: 32px; padding-bottom: 80px; }
  .game-card { padding: 24px; }
  .game-card .icon { width: 96px; height: 96px; }
  .nav { justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .game-card { transition: transform .2s ease, box-shadow .2s ease; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prose .toc { padding-left: 0; margin: 8px 0 0; }
@media (max-width: 520px) { .page-hero { padding-top: 24px; } .nav { padding-bottom: 8px; } .nav-links { justify-content: center; } }
