/* ludoo.online — the home page, on top of site.css's house layer.
 *
 * THE GAME IS THE HERO. Every picture on this page is the real build in a
 * device frame: phones for the game in your hand, a television for Table
 * Mode. The chrome around them takes only what it needs. */

/* --------------------------------------------------------------- frames */

/* A phone: a dark bezel and a glass screen. No notch: it covered the wordmark in every screenshot. */
.device {
  --w: 300px;
  position: relative; width: var(--w); aspect-ratio: 390 / 844;
  border-radius: calc(var(--w) * .15); padding: calc(var(--w) * .035);
  background: linear-gradient(160deg, #3a2a17, #0d0904 40%, #1d140a);
  box-shadow:
    0 0 0 1px rgba(255, 228, 170, .18),
    inset 0 0 0 1px rgba(255, 228, 170, .08),
    0 50px 90px -40px rgba(0, 0, 0, .85),
    0 30px 60px -30px color-mix(in srgb, var(--accent) 22%, transparent);
  flex: none;
}
.device img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: calc(var(--w) * .118); background: #1a1108;
}

/* A television: a slim bezel, a screen, a stand. */
.tv { position: relative; width: 100%; max-width: 880px; margin-inline: auto; }
.tv-screen {
  position: relative; aspect-ratio: 16 / 10; border-radius: 18px; padding: 12px;
  background: linear-gradient(180deg, #24180c, #0b0804);
  box-shadow: 0 0 0 1px rgba(255, 228, 170, .16), 0 60px 120px -50px rgba(0, 0, 0, .9);
}
.tv-screen img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.tv-stand {
  width: 32%; height: 34px; margin: 0 auto;
  background: linear-gradient(180deg, #1b130a, #0c0804);
  clip-path: polygon(38% 0, 62% 0, 70% 70%, 100% 70%, 100% 100%, 0 100%, 0 70%, 30% 70%);
}
.tv-label { position: absolute; top: -26px; left: 4px; }

/* -------------------------------------------------------------- the hero */

.h-hero { padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.h-hero .wrap { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 980px) { .h-hero .wrap { grid-template-columns: 1.05fr .95fr; } }
.h-hero h1 { margin: 0 0 20px; max-width: 13ch; }
.h-hero .lede { max-width: 46ch; }
.eyebrow-row { display: flex; align-items: center; gap: 10px; }
.eyebrow-row::before { content: ""; width: 8px; height: 1px; background: var(--accent); }
.eyebrow-row .eyebrow { margin: 0; }
.h-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; }
.h-facts span { display: inline-flex; align-items: center; gap: 8px; }
.h-facts span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.h-stage { position: relative; height: clamp(500px, 62vw, 640px); display: grid; place-items: center; }
.h-stage .device.front { --w: clamp(230px, 26vw, 290px); z-index: 3; transform: rotate(-3deg); }
.h-stage .device.back {
  --w: clamp(190px, 21vw, 238px); position: absolute; z-index: 1; opacity: .9;
  left: 2%; top: 14%; transform: rotate(-12deg);
}
.h-stage .hero-char {
  position: absolute; z-index: 4; right: -4%; bottom: 2%; width: clamp(170px, 20vw, 240px); height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6));
}
.h-stage .note-tag {
  position: absolute; z-index: 5; padding: 8px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--fill-solid) 82%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(12px); white-space: nowrap;
}
.h-stage .note-tag.a { top: 8%; right: 6%; }
.h-stage .note-tag.b { bottom: 18%; left: 0; }
.h-stage .note-tag b { color: var(--accent-lit); font-weight: 500; }
@media (max-width: 600px) {
  .h-stage { height: 470px; }
  .h-stage .device.back { left: -6%; top: 10%; }
  .h-stage .hero-char { right: -10%; }
  .h-stage .note-tag.a { right: 0; }
}

/* A floating die, because there is always one on the table. */
.die {
  position: absolute; width: 54px; height: 54px; border-radius: 12px;
  background: linear-gradient(145deg, #fffaf0, #e5dccb); top: 4%; left: 18%; z-index: 5;
  box-shadow: inset -4px -6px 10px rgba(0, 0, 0, .18), 0 18px 30px -10px rgba(0, 0, 0, .7);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 9px;
  animation: bob 6s var(--ease) infinite alternate;
}
.die i { width: 9px; height: 9px; border-radius: 50%; background: #1b1108; place-self: center; }
.die i:nth-child(1) { grid-area: 1 / 1; } .die i:nth-child(2) { grid-area: 1 / 3; }
.die i:nth-child(3) { grid-area: 2 / 2; }
.die i:nth-child(4) { grid-area: 3 / 1; } .die i:nth-child(5) { grid-area: 3 / 3; }
@keyframes bob { to { transform: translateY(-14px) rotate(18deg); } }

/* ----------------------------------------------------------- the ticker */

.ticker {
  border-block: 1px solid var(--line); padding: 16px 0; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: tick 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span {
  display: inline-flex; align-items: center; gap: 22px; padding-right: 22px;
  font: 500 13px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ticker span::after { content: "✦"; color: var(--accent); }
@keyframes tick { to { transform: translateX(-50%); } }

/* -------------------------------------------------------- section heads */

.h-sec { padding: clamp(72px, 10vw, 128px) 0 0; }
.head-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.head-rule { border-top: 1px solid var(--line); padding-top: 34px; display: grid; gap: 18px; }
@media (min-width: 980px) { .head-rule { grid-template-columns: 1.1fr .9fr; align-items: end; gap: 48px; } }
.head-rule h2 { margin: 0; }
.head-rule .lede { margin: 0; }
@media (max-width: 700px) { .hide-mobile { display: none; } }

/* ------------------------------------------------- the game, in phones */

.shots { margin-top: 44px; display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(50% - 50vw); padding: 10px max(18px, calc(50vw - 560px)) 30px;
  scroll-padding-inline: max(18px, calc(50vw - 560px)); scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { flex: none; scroll-snap-align: start; display: grid; gap: 16px; width: 250px; }
.shot .device { --w: 250px; }
.shot figcaption { display: grid; gap: 4px; }
.shot figcaption b { font-weight: 600; font-size: 15.5px; }
.shot figcaption span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.shot .num { color: var(--accent); font-size: 11px; letter-spacing: .14em; }
@media (min-width: 1150px) { .shots { justify-content: center; overflow: visible; } }

/* -------------------------------------------------------- Table Mode */

.tm { margin-top: 56px; position: relative; }
.tm-phones { position: absolute; inset: auto 0 -40px; display: flex; justify-content: space-between; pointer-events: none; }
.tm-phones .device { --w: clamp(90px, 13vw, 150px); }
.tm-phones .device:first-child { transform: rotate(-10deg) translate(-10%, 10%); }
.tm-phones .device:last-child { transform: rotate(9deg) translate(10%, 10%); }
.steps { display: grid; gap: 0; margin-top: 88px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.step { border-top: 1px solid var(--accent); padding: 18px 0 22px; }
.step .num { color: var(--accent); font-size: 11px; letter-spacing: .14em; }
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; margin: 8px 0; }
.step p { color: var(--muted); margin: 0; font-size: 15px; }

/* ------------------------------------------------------------- modes */

.modes { margin-top: 44px; display: grid; gap: 16px; }
@media (min-width: 720px) { .modes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .modes { grid-template-columns: repeat(4, 1fr); } }
.mode {
  position: relative; overflow: hidden; border-radius: var(--radius-card); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--fill-solid) 60%, transparent); min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px;
  transition: transform .5s var(--ease), border-color .5s var(--ease); text-decoration: none; color: var(--ink);
}
.mode:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mode img { position: absolute; inset: 0 0 auto; width: 100%; height: 72%; object-fit: cover; object-position: 50% 12%;
  mask-image: linear-gradient(#000 55%, transparent); }
.mode .label { color: var(--accent); position: relative; }
.mode h3 { position: relative; font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; margin: 4px 0 6px; }
.mode p { position: relative; color: var(--muted); font-size: 14.5px; margin: 0; }
.mode .seat { position: absolute; top: 16px; left: 16px; width: 10px; height: 10px; border-radius: 50%; }

/* ------------------------------------------------------------- the cast */

.cast { margin-top: 44px; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .cast { grid-template-columns: repeat(4, 1fr); } }
.who {
  position: relative; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  color: var(--ink); text-decoration: none; transition: border-color .5s var(--ease);
  background: radial-gradient(90% 70% at 50% 30%, var(--tint, #3a2a17), transparent 75%), color-mix(in srgb, var(--fill-solid) 70%, transparent);
}
.who img { position: absolute; inset: 4% 0 auto; width: 100%; height: 78%; object-fit: contain; object-position: 50% 0;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55)); transition: transform .6s var(--ease); }
.who:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.who:hover img { transform: scale(1.04) translateY(-4px); }
.who b { position: relative; font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; }
.who span { position: relative; color: var(--muted); font-size: 13px; }
.who.create { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 50%, transparent); justify-content: center; text-align: center; }
.who.create .plus { font: 300 54px/1 var(--font-display); color: var(--accent); margin-bottom: 10px; }

/* ------------------------------------------------------------ the rules */

.rules { margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--fill-solid) 55%, transparent); backdrop-filter: blur(12px); }
.rule { display: grid; grid-template-columns: 44px 1fr; gap: 6px 16px; padding: 20px 22px; }
.rule + .rule { border-top: 1px solid var(--line); }
@media (min-width: 860px) { .rule { grid-template-columns: 60px 260px 1fr; align-items: baseline; } }
.rule .num { color: var(--accent); font-size: 12px; letter-spacing: .1em; }
.rule b { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; }
.rule p { margin: 0; color: var(--muted); font-size: 15px; grid-column: 2; }
@media (min-width: 860px) { .rule p { grid-column: 3; } }

/* -------------------------------------------------------------- stats */

.stats { margin-top: 64px; display: grid; grid-template-columns: repeat(2, 1fr); border-block: 1px solid var(--line); }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { padding: 26px 20px; display: grid; gap: 6px; }
.stats div + div { border-left: 1px solid var(--line); }
@media (max-width: 859px) { .stats div:nth-child(3) { border-left: 0; } .stats div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.bignum {
  font: 500 clamp(2.6rem, 6vw, 4.2rem)/.95 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--accent-lit), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- FAQ */

.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: center;
  padding: 22px 4px; font-size: clamp(1.02rem, 1.6vw, 1.15rem); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--font-mono); color: var(--accent); transition: transform .3s var(--ease); justify-self: end; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -6px 4px 22px; color: var(--muted); max-width: 70ch; }

/* ----------------------------------------------------------- CTA panel */

.cta-panel {
  position: relative; margin: clamp(72px, 10vw, 128px) 0 clamp(56px, 8vw, 96px); text-align: center;
  border: 1px solid var(--line); border-radius: 16px; padding: clamp(72px, 9vw, 112px) 24px;
  background-image: linear-gradient(rgba(242, 231, 206, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 231, 206, .045) 1px, transparent 1px);
  background-size: 64px 64px; overflow: hidden;
}
.cta-panel::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 50% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.cta-panel h2 { font-size: clamp(2.3rem, 6vw, 4.4rem); max-width: 16ch; margin: 0 auto 18px; }
.cta-panel .lede { margin: 0 auto; }
.cta-panel .rail-cta { justify-content: center; }
.tick { position: absolute; width: 16px; height: 16px; border-color: var(--accent); border-style: solid; }
.tick.tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; } .tick.tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.tick.bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; } .tick.br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ----------------------------------------------------------- reveals */

.reveal { opacity: 0; transform: translateY(16px); filter: blur(8px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; }
  .ticker-track, .die { animation: none; }
}

/* =====================================================================
   SUPPORTING PAGES — the same grammar as the home page.
   ===================================================================== */

/* Page hero: words on the left, the game on the right (a device, a TV, or art). */
.p-hero { padding: clamp(28px, 6vw, 72px) 0 clamp(24px, 4vw, 48px); overflow: hidden; }
.p-hero .wrap { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 980px) { .p-hero .wrap { grid-template-columns: 1.1fr .9fr; } .p-hero.solo .wrap { grid-template-columns: 1fr; } }
.p-hero h1 { margin: 0 0 20px; max-width: 15ch; }
.p-hero .lede { max-width: 50ch; }
.p-visual { position: relative; display: grid; place-items: center; min-height: clamp(380px, 46vw, 560px); }
.p-visual .device { --w: clamp(220px, 24vw, 280px); transform: rotate(-3deg); }
.p-visual .device + .device { --w: clamp(180px, 19vw, 220px); position: absolute; left: 4%; top: 12%; transform: rotate(-12deg); z-index: -1; opacity: .9; }
.p-visual .art { width: min(100%, 520px); height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .6)); }
.p-visual .tv { max-width: 560px; }

/* Card grid: things that are genuinely objects. */
.cards { margin-top: 40px; display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards.three { grid-template-columns: repeat(3, 1fr); } .cards.four { grid-template-columns: repeat(4, 1fr); } }
.pcard {
  border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px 22px;
  background: color-mix(in srgb, var(--fill-solid) 60%, transparent); backdrop-filter: blur(12px) saturate(140%);
  display: grid; gap: 8px; align-content: start; color: var(--ink); text-decoration: none;
  transition: transform .5s var(--ease), border-color .5s var(--ease);
}
a.pcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pcard .num { color: var(--accent); font-size: 11px; letter-spacing: .14em; }
.pcard h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; margin: 0; }
.pcard p { color: var(--muted); font-size: 15px; margin: 0; }
.pcard .arrow { color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }

/* Rows with a date or status: changelogs, timelines, lists people scan. */
.timeline { margin-top: 40px; border-top: 1px solid var(--line); }
.tl-row { display: grid; gap: 6px 24px; padding: 22px 4px; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .tl-row { grid-template-columns: 160px 1fr; } }
.tl-row .label { color: var(--accent); }
.tl-row h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin: 0 0 6px; }
.tl-row p { color: var(--muted); margin: 0; max-width: 70ch; }
.status { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  font: 500 10.5px var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-lit); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.status.ok { color: #6fd39a; background: rgba(63, 191, 111, .12); border-color: rgba(63, 191, 111, .3); }

/* Reading layout for policies and long text: a contents rail and calm prose. */
.reading { display: grid; gap: 40px; padding-bottom: 40px; }
@media (min-width: 1000px) { .reading { grid-template-columns: 240px 1fr; gap: 64px; } }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 2px; }
@media (max-width: 999px) { .toc { position: static; } }
.toc a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 0; border-left: 1px solid var(--line); padding-left: 14px; }
.toc a:hover { color: var(--accent-lit); border-color: var(--accent); }
.prose { max-width: 70ch; }
.prose section { padding: 0 0 36px; margin: 0 0 36px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 6px 0 14px; }
.prose h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--ink-2, #d9ccb0); font-size: 16px; line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose .num { color: var(--accent); font-size: 11px; letter-spacing: .14em; }

/* A quiet callout inside a section. */
.callout { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft);
  border-radius: 16px; padding: 18px 20px; color: var(--ink); }
.callout b { color: var(--accent-lit); }

/* Character sheet bars, in the house dress. */
.bars-house { display: grid; gap: 8px; margin-top: 10px; }
.bars-house div { display: grid; grid-template-columns: 90px 1fr 34px; gap: 10px; align-items: center; font: 400 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bars-house i { height: 4px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.bars-house i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v, 50%); background: var(--accent); border-radius: inherit; }
.bars-house b { color: var(--ink); font-weight: 500; text-align: right; }
