/* Ludo website — shared styles. Colours follow the app's Mandala Classic theme (light) and Mandala Night (dark). */
:root {
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --surface-2: #f8f4ec;
  --ink: #23201c;
  --muted: #6b6560;
  --line: #e5ddcf;
  --red: #b0504d;
  --green: #3d6b44;
  --yellow: #dcb44c;
  --blue: #3f5f93;
  --accent: #3d6b44;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(35, 32, 28, .06), 0 8px 24px rgba(35, 32, 28, .07);
  --radius: 20px;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e1c;
    --surface: #161a30;
    --surface-2: #1b2039;
    --ink: #efe6d0;
    --muted: #a9a294;
    --line: #272c4a;
    --red: #c0444f;
    --green: #2f8a62;
    --yellow: #d8a92e;
    --blue: #4268b8;
    --accent: #d9b45a;
    --accent-ink: #12152a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: .2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow); }
.brand span { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; opacity: .8; }
.nav a:hover { opacity: 1; background: var(--surface-2); }
.nav a[aria-current="page"] { opacity: 1; background: var(--surface); box-shadow: var(--shadow); }
.menu-btn { display: none; margin-left: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  width: 42px; height: 42px; font-size: 20px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; padding: 10px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .site-header .btn { display: none; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 15px;
  border-radius: 14px; padding: 12px 20px; border: 0; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-play { background: #111; color: #fff; padding: 10px 18px 10px 14px; border-radius: 12px; box-shadow: var(--shadow); }
.btn-play svg { width: 26px; height: 26px; }
.btn-play small { display: block; font-size: 10.5px; font-weight: 700; opacity: .8; letter-spacing: .4px; line-height: 1.1; }
.btn-play b { display: block; font-size: 17px; line-height: 1.15; }
@media (prefers-color-scheme: dark) { .btn-play { background: #f4f1ea; color: #111; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 48px; }
.hero::before { content: ''; position: absolute; width: 760px; height: 760px; right: -220px; top: -240px; border-radius: 50%;
  background: conic-gradient(from -45deg, var(--red) 0 25%, var(--blue) 0 50%, var(--green) 0 75%, var(--yellow) 0);
  opacity: .12; filter: blur(2px); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); margin: 18px 0 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.meta-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--muted); font-weight: 700; font-size: 14px; }
.meta-row span::before { content: '✓'; color: var(--green); margin-right: 6px; font-weight: 900; }
.phone { width: min(300px, 78vw); margin: 0 auto; border-radius: 40px; padding: 10px; background: #15161c;
  box-shadow: 0 30px 60px rgba(0,0,0,.25), inset 0 0 0 2px #2b2d36; transform: rotate(3deg); }
.phone img { border-radius: 31px; aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
.phone.second { position: absolute; width: min(230px, 56vw); right: -10px; bottom: -30px; transform: rotate(-7deg); opacity: .95; }
.hero-art { position: relative; padding-bottom: 30px; }
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .phone.second { display: none; }
}

/* ---------- sections ---------- */
section.block { padding: 64px 0; }
section.block.alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 0 32px; }
.section-head h2 { font-size: clamp(32px, 4vw, 44px); margin: 8px 0 10px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }
.kicker { font-weight: 900; font-size: 12.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--accent); }

.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin: 12px 0 6px; font-weight: 900; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; }
.i-red { background: color-mix(in srgb, var(--red) 16%, transparent); }
.i-green { background: color-mix(in srgb, var(--green) 16%, transparent); }
.i-yellow { background: color-mix(in srgb, var(--yellow) 22%, transparent); }
.i-blue { background: color-mix(in srgb, var(--blue) 16%, transparent); }

.mode { position: relative; overflow: hidden; }
.mode::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--accent)); }
.mode .tag { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .6px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px; margin-top: 10px; }

/* screenshots */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 18px; overflow-x: auto; padding: 6px 4px 18px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
.shots figcaption { text-align: center; font-weight: 800; font-size: 14px; color: var(--muted); margin-top: 10px; }

.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.theme-chip { display: flex; gap: 6px; margin-top: 12px; }
.theme-chip i { width: 22px; height: 22px; border-radius: 7px; display: block; border: 1px solid rgba(0,0,0,.08); }
@media (max-width: 760px) { .themes { grid-template-columns: 1fr; } }

.band { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.band .big { font-size: 42px; }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; text-align: left; } }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- document pages (rules, privacy, terms) ---------- */
.page-hero { padding: 54px 0 30px; border-bottom: 1px solid var(--line); background:
  radial-gradient(600px 220px at 85% 0%, color-mix(in srgb, var(--yellow) 18%, transparent), transparent),
  radial-gradient(500px 200px at 10% 100%, color-mix(in srgb, var(--blue) 12%, transparent), transparent); }
.page-hero h1 { font-size: clamp(40px, 5.5vw, 60px); margin: 10px 0 8px; }
.page-hero p { color: var(--muted); margin: 0; font-size: 17px; max-width: 680px; }
.updated { display: inline-block; margin-top: 14px; font-size: 13.5px; font-weight: 800; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

.doc { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding-top: 40px; padding-bottom: 70px; align-items: start; }
.toc { position: sticky; top: 90px; font-size: 14.5px; }
.toc b { display: block; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 700; }
.toc a:hover, .toc a.active { color: var(--ink); border-left-color: var(--accent); }
.prose { min-width: 0; }
.prose section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 18px;
  box-shadow: var(--shadow); scroll-margin-top: 86px; }
.prose h2 { font-size: 30px; margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.prose h2 .n { font-family: var(--sans); font-size: 13px; font-weight: 900; color: var(--accent-ink); background: var(--accent);
  width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; }
.prose h3 { font-size: 17px; font-weight: 900; margin: 20px 0 6px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0; }
.prose th, .prose td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.table-scroll { overflow-x: auto; }
@media (max-width: 860px) {
  .doc { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
  .prose section { padding: 20px 18px; }
}

.note { border-radius: 14px; padding: 14px 16px; margin: 14px 0; border: 1px solid var(--line); background: var(--surface-2); font-size: 15px; }
.note.good { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 9%, var(--surface)); }
.note.warn { border-color: color-mix(in srgb, var(--yellow) 60%, transparent); background: color-mix(in srgb, var(--yellow) 12%, var(--surface)); }
.note b { color: var(--ink); }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 4px; }
.summary div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 14.5px; }
.summary div strong { display: block; font-size: 15.5px; margin-bottom: 2px; }
@media (max-width: 700px) { .summary { grid-template-columns: 1fr; } }

.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; margin: 14px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 32px; height: 32px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 900; display: grid; place-items: center; }

.dice-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.dice-step { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-weight: 800; }
.die { width: 34px; height: 34px; border-radius: 9px; background: #e8f3ff; border: 1px solid #bcd6f2; display: grid; place-items: center;
  color: #1f4a78; font-weight: 900; font-size: 16px; }
.arrow { color: var(--muted); }
.figure { margin: 14px 0; display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
.figure img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 640px) { .figure { grid-template-columns: 1fr; } .figure img { max-width: 240px; } }
.pill { display: inline-block; font-family: var(--sans); font-size: 12.5px; font-weight: 900; padding: 2px 10px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 30px; color: var(--muted); font-size: 14.5px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
.site-footer h4 { margin: 0 0 10px; color: var(--ink); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--ink); }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }
