/* WITCRAFT website v2 — layout modelled on a game download landing page: big key-art hero, app tile, one large
   gradient download button, numbered "how to play" rows with pictures, FAQ accordion, closing call to action.
   Colours are a working draft (blue → cyan from the mascot and team artwork). No external fonts or assets. */
:root {
  --bg: #f4f7fd;
  --surface: #ffffff;
  --surface-2: #eef3fc;
  --ink: #18203f;
  --muted: #5a6385;
  --line: #dfe5f2;
  --blue: #2f6ff0;
  --cyan: #19b8d6;
  --violet: #7b5cf0;
  --gold: #f3b94d;
  --grad: linear-gradient(90deg, var(--blue), var(--cyan));
  --heading: #1f6fe0;
  --warn-bg: #fff4d6;
  --warn-ink: #7a5300;
  --radius: 18px;
  --wrap: 1120px;
  --shadow: 0 10px 30px rgba(31, 60, 140, .12);
  --font: "Noto Sans Thai", "Leelawadee UI", "Sarabun", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 var(--font); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); color: var(--heading); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip-link:focus { left: 16px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.draft-bar { margin: 0; padding: 6px 16px; background: var(--warn-bg); color: var(--warn-ink); font-size: .85rem; text-align: center; }
.header-row { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: .12em; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand-small { font-size: 1.05rem; margin: 0; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--blue); background: var(--surface-2); }
.nav-toggle { display: none; margin-left: auto; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, filter .15s; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(47, 111, 240, .32); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(47, 111, 240, .4); }
.btn-primary[disabled] { background: #b9c1d6; color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-large { padding: 16px 40px; font-size: 1.15rem; min-width: min(360px, 100%); }
.release-wait { margin: 10px 0 0; color: var(--warn-ink); background: var(--warn-bg); border-radius: 10px; padding: 6px 12px; font-size: .92rem; display: inline-block; }

/* hero: key art on the right, text on a dark wash on the left */
.hero { position: relative; color: #fff; overflow: hidden; background: #14204d; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 18, 56, .92) 0%, rgba(10, 18, 56, .72) 38%, rgba(10, 18, 56, .12) 72%, transparent 100%),
              linear-gradient(0deg, rgba(10, 18, 56, .55), transparent 40%); }
.hero-inner { position: relative; z-index: 1; padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 84px); }
.hero-inner > * { max-width: 620px; }
.app-row { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.app-tile { width: clamp(84px, 13vw, 124px); height: auto; aspect-ratio: 1; border-radius: 26%; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); background: #fff; }
.app-title h1 { margin: 0; letter-spacing: .06em; }
.tagline { margin: 4px 0 0; color: #ffd98a; font-weight: 700; letter-spacing: .14em; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 6px; padding: 0; list-style: none; color: #cfe0ff; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 22px; color: #dbe5ff; font-size: .95rem; }
.meta b { color: #fff; }
.hero-lead { color: #e6ecff; max-width: 52ch; }
.hero .release-wait { background: rgba(255, 244, 214, .95); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.art-credit { position: absolute; z-index: 1; right: 14px; bottom: 10px; margin: 0; font-size: .75rem; color: rgba(255, 255, 255, .75); }

/* sections */
section[id] { scroll-margin-top: 84px; }
.section { padding: clamp(44px, 7vw, 84px) 0; }
.section-alt { background: var(--surface); }
.section-title { position: relative; padding-bottom: 14px; margin-bottom: 26px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 4px; background: var(--grad); }
.center { text-align: center; }
.center .section-title::after, .section-title.center::after { left: 50%; transform: translateX(-50%); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 22px; }

/* "how to play" rows: text and picture side by side, alternating */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.split + .split { margin-top: clamp(40px, 6vw, 72px); }
.split.reverse .split-media { order: -1; }
.split-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media figcaption { margin-top: 8px; color: var(--muted); font-size: .85rem; }
.numbered { list-style: none; counter-reset: n; padding: 0; margin: 0 0 22px; }
.numbered li { counter-increment: n; position: relative; padding: 4px 0 10px 46px; }
.numbered li::before { content: counter(n); position: absolute; left: 0; top: 4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: .95rem; }
.numbered b { color: var(--ink); }
.numbered p { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }

/* facts under the game-copy row */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 22px; padding: 0; }
.facts div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 700; color: var(--heading); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); }
.faq details[open] summary { background: var(--grad); color: #fff; }
.faq details[open] summary::after { content: "−"; color: #fff; }
.faq .answer { padding: 16px 20px 6px; color: var(--muted); }
.faq .answer code { color: var(--ink); }

/* closing call to action */
.cta-band { background: linear-gradient(120deg, #1e3c9e, #2f6ff0 45%, #19b8d6); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e3ecff; }
.cta-band p a { color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--blue); }
.cta-band .btn-primary[disabled] { background: rgba(255, 255, 255, .45); color: #fff; }
.cta-band [data-release-button] { display: flex; flex-direction: column; align-items: center; }

/* shared pieces used by the other pages */
.page-head { padding: clamp(40px, 7vw, 72px) 0 8px; }
.page-head p { color: var(--muted); max-width: 64ch; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 10px rgba(31, 60, 140, .05); }
.card p:last-child { margin-bottom: 0; }
.card-meta { color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 12px; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt + .section, .section + .section-alt, .cta-band { border-top: 0 !important; }
.prose { max-width: 70ch; }
.prose li { margin-bottom: .4em; }
.empty { color: var(--muted); }
.pending { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); border: 1px dashed #e0b860; border-radius: 8px; padding: 1px 9px; font-size: .88rem; }
.hero .pending { background: rgba(255, 244, 214, .95); }
.is-pending { color: var(--muted); font-weight: 400; }
.hero .is-pending { color: #c8d4f5; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { width: 34%; color: var(--muted); font-weight: 400; }
.table td { overflow-wrap: anywhere; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font: .9em Consolas, "Cascadia Mono", monospace; overflow-wrap: anywhere; }
.links-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* footer */
.site-footer { background: #121a3d; color: #c9d2ee; padding: 30px 0; }
.site-footer .brand { color: #fff; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: #c9d2ee; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-note { margin: 0 0 0 auto; font-size: .88rem; }

@media (max-width: 820px) {
  body { font-size: 16px; }
  .header-row { flex-wrap: wrap; gap: 10px; padding: 8px 0; }
  .brand { font-size: 1.05rem; letter-spacing: .08em; }
  .brand img { width: 30px; height: 30px; }
  .nav-toggle { display: inline-block; margin-left: 0; order: 3; padding: 7px 14px; }
  .header-cta { order: 2; margin-left: auto; padding: 7px 14px; }
  .site-nav { display: none; order: 5; flex-basis: 100%; flex-direction: column; margin: 0; padding-bottom: 8px; }
  .site-nav.is-open { display: flex; }
  .hero::after { background: linear-gradient(0deg, rgba(10, 18, 56, .94) 0%, rgba(10, 18, 56, .8) 55%, rgba(10, 18, 56, .35) 100%); }
  .hero-actions, .hero-actions [data-release-button], .hero-actions .btn { width: 100%; }
  .btn-large { min-width: 0; width: 100%; }
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .table th { width: 40%; }
  .footer-note { margin-left: 0; }
}
