/* Colours, bevels and fonts follow Assets/_Project/UI/Resources/Wolfscribe.uss. The site is dark only, like the app. */
@font-face { font-family: 'Cormorant SC'; src: url('../fonts/CormorantSC-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Noto Serif Wolf'; src: url('../fonts/NotoSerif-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  --night: rgb(14, 10, 26);
  --panel: rgb(30, 23, 48);
  --card: rgb(34, 27, 52);
  --line: rgb(52, 44, 74);
  --ink: rgb(228, 224, 240);
  --hint: rgb(176, 170, 196);
  --gold: rgb(245, 214, 140);
  --candle: rgb(160, 112, 36);
  --bronze-light: rgb(150, 122, 92);
  --bronze-dark: rgb(46, 32, 24);
  --display: 'Cormorant SC', 'Noto Serif Wolf', Georgia, serif;
  --body: 'Noto Serif Wolf', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.7; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--gold); line-height: 1.2; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); margin: 0 0 .6em; }
h3 { font-size: 1.35rem; margin: 0 0 .35em; }
[hidden] { display: none !important; }

html[data-lang="vi"] body [lang="en"], html[data-lang="en"] body [lang="vi"] { display: none; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.lead { color: var(--hint); max-width: 40em; margin: 0 auto 2.2em; }

/* Top bar */
.topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.topbar.solid { position: static; background: var(--panel); border-bottom: 2px solid var(--bronze-dark); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.35rem; color: var(--gold); text-decoration: none; text-shadow: 0 1px 4px #000; min-height: 48px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--bronze-light); }
.lang { display: flex; gap: 4px; }

/* Buttons: a bronze bevel, light top and left, dark bottom and right. */
.button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; min-width: 52px; padding: 6px 22px; font-family: var(--display); font-size: 1.15rem; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; color: rgb(236, 230, 214); background: linear-gradient(rgb(68, 54, 86), rgb(42, 33, 55)); border: 2px solid; border-color: var(--bronze-light) var(--bronze-dark) var(--bronze-dark) var(--bronze-light); border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, .5); }
.button:active { transform: translateY(1px); }
.button-primary { color: rgb(255, 246, 220); background: linear-gradient(rgb(184, 132, 46), rgb(132, 90, 26)); border-color: rgb(240, 200, 110) var(--bronze-dark) var(--bronze-dark) rgb(240, 200, 110); text-shadow: 1px 1px 2px rgb(30, 14, 0); }
.lang .button { min-height: 48px; min-width: 56px; padding: 4px 12px; }
.lang .button[aria-pressed="true"] { background: rgb(108, 82, 150); border-color: rgb(250, 212, 130); }

/* Hero: the Home screen of the app. */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 1000px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero-art { position: absolute; inset: 0; background: url('../img/board/board_night.webp') center / cover; }
.hero-art canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; background: var(--night); }
.hero-art canvas.ready { opacity: 1; }
.hero-art::after { content: ''; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(transparent, var(--night)); }
.hero-title { position: absolute; left: 0; right: 0; top: clamp(76px, 10svh, 120px); display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.wordmark { position: relative; width: min(720px, 100%, 100svh); margin: 0; }
.wordmark img { width: 100%; }
.wordmark img + img { position: absolute; inset: 0; }
.slogan { display: flex; align-items: center; justify-content: center; gap: .6em; margin: -1.2vw 0 0; font-family: var(--display); font-size: clamp(1.1rem, 2.6vw, 1.6rem); letter-spacing: .06em; color: #dad6ec; text-align: center; text-shadow: 0 1px 6px #07030e, 0 0 3px #07030e; }
.slogan img { width: 4.5em; flex-shrink: 1; min-width: 0; }
.slogan img:last-child { transform: scaleX(-1); }
.hero-bottom { position: relative; text-align: center; padding: 0 16px max(28px, env(safe-area-inset-bottom)); }
.hero-bottom p { max-width: 34em; margin: 0 auto 18px; text-shadow: 0 1px 6px #000, 0 0 12px #000; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.actions .button { min-width: 200px; }
.button small { font-family: var(--body); font-size: .72rem; opacity: .85; }
.button[aria-disabled="true"] { cursor: default; box-shadow: none; }
.button[aria-disabled="true"]:active { transform: none; }
.button.available .soon { display: none !important; }
@media (orientation: portrait) {
  .hero-art { bottom: 26%; }
  .slogan img { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 100svh; height: auto; padding-top: 200px; }
  .hero-title { top: 52px; }
  .wordmark { width: min(340px, 80%); }
  .hero-bottom p { margin-bottom: 10px; line-height: 1.5; }
  .hero-bottom { padding-bottom: 14px; }
}

section.block { padding: clamp(56px, 9vw, 104px) 0 0; }

/* Framed cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); padding: 0; margin: 0; list-style: none; }
.card { background: linear-gradient(var(--card), rgb(24, 18, 38)); border: 2px solid; border-color: var(--bronze-light) var(--bronze-dark) var(--bronze-dark) var(--bronze-light); border-radius: 6px; padding: 20px 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.card p { margin: 0; }

/* The three times of day, in the gold frame of the board. */
.phases figure { margin: 0; }
.board { position: relative; aspect-ratio: 8 / 5; overflow: hidden; border-radius: 6px; }
.board > img { width: 100%; height: 100%; object-fit: cover; }
.board::after { content: ''; position: absolute; inset: 0; border: 24px solid transparent; border-image: url('../img/board/frame.png') 44 / 24px stretch; }
.phases figcaption { padding: 12px 6px 0; }

/* Roles, with the player medallions of the app. */
.role { display: flex; gap: 16px; align-items: flex-start; }
.medal { flex: 0 0 64px; height: 64px; display: grid; place-items: center; background: url('../img/board/medal.png') center / contain no-repeat; font-family: var(--display); font-size: 1.7rem; color: rgb(244, 238, 222); text-shadow: 0 2px 2px #000; }
.role-wolf .medal { background-image: url('../img/board/medal_wolf.png'); }
.role-wolf h3 { color: rgb(255, 140, 140); }

.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; border: 2px solid var(--gold); font-family: var(--display); font-size: 1.4rem; color: var(--gold); }

.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 4px; min-height: 52px; font-family: var(--display); font-size: 1.25rem; color: var(--gold); }
.faq details p { margin: 0; padding: 0 4px 18px; }

footer { margin-top: clamp(64px, 10vw, 120px); padding: 28px 0 max(28px, env(safe-area-inset-bottom)); border-top: 2px solid var(--bronze-dark); background: var(--panel); font-size: .9rem; color: var(--hint); text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
footer nav a { display: inline-flex; align-items: center; min-height: 48px; }
footer p { margin: 8px 0 0; }

/* Legal pages: long reading text keeps the body font. */
.legal { max-width: 780px; padding-top: 40px; }
.legal h1 { font-size: clamp(2.1rem, 6vw, 3rem); margin: 0 0 .3em; }
.legal h2 { font-size: 1.55rem; margin: 1.8em 0 .5em; }
.legal li { margin-bottom: .6em; }
.legal .meta { color: var(--hint); font-size: .92rem; }
.placeholder { color: rgb(255, 190, 120); border-bottom: 1px dashed currentColor; }
.placeholder::before { content: '['; }
.placeholder::after { content: ']'; }
