/* Dice & Sound — site styles.
   Palette and type follow the app's Fantasy theme (assets/data/ambiences/fantasy.json):
   dark wood background, gold accent, Cinzel for chrome, Uncial Antiqua for the wordmark.
   Fonts are self-hosted so the site makes no third-party requests. */

@font-face {
  font-family: "Uncial Antiqua";
  src: url("../fonts/UncialAntiqua-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #14100b;
  --bg-raised: #1f1810;
  --gold: #e3ad46;
  --gold-light: #f6d488;
  --gold-deep: #b9792a;
  --text: #ece2cf;
  --text-muted: #b1a48d;
  --line: rgba(227, 173, 70, 0.22);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --font-display: "Uncial Antiqua", "Cinzel", Georgia, serif;
  --font-chrome: "Cinzel", Georgia, serif;
  --font-body: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --max: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg) url("../img/texture.webp") repeat;
  background-size: 256px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: #fff1cc; }
a:focus-visible, .lang a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--gold); color: #1a1208; padding: 8px 14px; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 16px; }

/* ── Top bar ─────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(16, 12, 8, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--max); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-size: 1.2rem;
}
.brand img { width: auto; height: 36px; }
.brand:hover { color: var(--gold-light); }

.lang { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang a {
  font-family: var(--font-chrome); font-size: 0.8rem; letter-spacing: 0.08em;
  color: var(--text-muted); text-decoration: none;
  padding: 4px 12px; border-radius: 999px; min-width: 44px; text-align: center;
}
.lang a[aria-current] { background: var(--gold); color: #1a1208; font-weight: 700; }
.lang a:not([aria-current]):hover { color: var(--text); }

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 8vw, 88px) 16px clamp(48px, 8vw, 80px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero__glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(720px, 100%); height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(227, 173, 70, 0.20), rgba(227, 173, 70, 0) 70%);
}
.hero__logo {
  position: relative;
  width: auto; height: clamp(170px, 30vw, 280px);
  filter: drop-shadow(0 6px 24px rgba(227, 173, 70, 0.35));
  animation: rise 900ms ease-out both;
}
.eyebrow {
  position: relative;
  margin: 28px 0 6px;
  font-family: var(--font-chrome); font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}
.wordmark {
  position: relative;
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 10vw, 5.75rem); line-height: 1.05;
  background: linear-gradient(180deg, var(--gold-light) 10%, var(--gold) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 30px rgba(227, 173, 70, 0.15);
}
.wordmark .amp { font-size: 0.75em; }
.hero__lead {
  position: relative;
  max-width: 640px; margin: 20px auto 28px;
  font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--text);
}

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 22px;
  font-family: var(--font-chrome); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em;
  border-radius: 999px;
}
.badge--android {
  position: relative;
  color: #1a1208;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
  box-shadow: 0 6px 24px rgba(227, 173, 70, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.badge svg { width: 22px; height: 22px; fill: currentColor; }

.stats {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  width: 100%; max-width: 620px; margin: 44px auto 0;
}
.stats div { padding: 4px 8px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font-family: var(--font-chrome); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.2rem); color: var(--gold-light); line-height: 1.1; }
.stats dd { margin: 4px 0 0; font-size: 0.92rem; color: var(--text-muted); line-height: 1.35; }

/* ── Sections ────────────────────────────────────────────── */

.section { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 72px) 16px; }
.section__title {
  margin: 0 0 8px; text-align: center;
  font-family: var(--font-chrome); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--text);
}
.section__title::after {
  content: ""; display: block; width: 84px; height: 2px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section__lead { max-width: 620px; margin: 12px auto 0; text-align: center; color: var(--text-muted); }

/* Features */

.features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px;
}
.feature {
  padding: 26px 24px;
  background: linear-gradient(180deg, rgba(40, 31, 20, 0.85), rgba(26, 20, 13, 0.85));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}
.feature__icon {
  width: 34px; height: 34px;
  fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.feature h3 { margin: 14px 0 8px; font-family: var(--font-chrome); font-size: 1.15rem; color: var(--gold-light); }
.feature p { margin: 0; color: var(--text); font-size: 1rem; }

/* Screenshots */

.shots__row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); justify-content: center;
  gap: clamp(16px, 4vw, 44px); margin-top: 40px; align-items: start;
}
.phone { margin: 0; }
.phone:nth-child(2) { margin-top: -18px; }
.phone__screen {
  padding: 8px; border-radius: 30px;
  background: linear-gradient(160deg, #3a2d1d, #0d0a06 60%);
  border: 1px solid rgba(227, 173, 70, 0.35);
  box-shadow: var(--shadow);
}
.phone__screen img { border-radius: 23px; width: 100%; }
.phone figcaption {
  margin-top: 14px; text-align: center;
  font-family: var(--font-chrome); font-size: 0.95rem; letter-spacing: 0.04em; color: var(--text-muted);
}

/* Worlds */

.worlds__list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; margin-top: 36px;
}
.world--available { grid-column: 1 / -1; }
.world__art {
  position: relative; aspect-ratio: 12 / 5; border-radius: var(--radius); overflow: hidden;
  background: #1a1208; box-shadow: var(--shadow);
}
.world__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.world__frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 0.8; }
.world--soon .world__cover { filter: saturate(0.75) brightness(0.85); }
.world__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 45%);
}
.world__name {
  position: absolute; left: 22px; bottom: 14px; z-index: 1; margin: 0;
  font-family: var(--font-chrome); font-weight: 700; font-size: clamp(1.3rem, 3.4vw, 2rem);
  color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.world--available .world__name { font-size: clamp(1.6rem, 4.5vw, 2.6rem); }
.world__badge {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-chrome); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(12, 9, 6, 0.78); color: var(--gold-light); border: 1px solid rgba(227, 173, 70, 0.5);
}
.world--available .world__badge { background: var(--gold); color: #1a1208; border-color: transparent; }
.world__text { margin: 14px 4px 0; color: var(--text); }
.world__count {
  display: inline-block; margin-left: 6px;
  font-family: var(--font-chrome); font-size: 0.95rem; color: var(--gold-light); white-space: nowrap;
}
.worlds__more {
  margin: 36px 0 0; text-align: center;
  font-family: var(--font-chrome); font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--gold);
}

/* Call to action */

.cta {
  position: relative; text-align: center;
  margin-bottom: clamp(40px, 7vw, 72px);
  padding: clamp(36px, 6vw, 56px) 24px;
  max-width: calc(var(--max) - 32px);
  border-radius: var(--radius); border: 1px solid rgba(227, 173, 70, 0.4);
  background: linear-gradient(rgba(20, 14, 8, 0.55), rgba(20, 14, 8, 0.7)), url("../img/leather.webp") center / cover;
  box-shadow: var(--shadow);
}
.cta__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 5vw, 2.8rem); color: var(--gold-light); }
.cta p { max-width: 560px; margin: 12px auto 0; font-size: 1.1rem; }

/* ── Footer ──────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: rgba(10, 8, 5, 0.75); }
.footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 28px 16px 36px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 28px;
}
.footer__brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); color: var(--text); }
.footer__brand img { width: auto; height: 30px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer__links a { font-family: var(--font-chrome); font-size: 0.9rem; color: var(--text-muted); text-decoration: none; }
.footer__links a:hover { color: var(--gold-light); }
.footer__copy { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* ── Documents (privacy, terms, 404) ─────────────────────── */

.doc {
  max-width: 800px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 16px clamp(48px, 7vw, 80px);
}
.doc__back { font-family: var(--font-chrome); font-size: 0.9rem; text-decoration: none; }
.doc__title {
  margin: 18px 0 4px;
  font-family: var(--font-chrome); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.2;
  color: var(--gold-light);
}
.doc__meta { margin: 0 0 28px; color: var(--text-muted); font-size: 0.95rem; }
.doc__body {
  padding: clamp(20px, 4vw, 40px);
  background: rgba(26, 20, 13, 0.88);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}
.doc__body > :first-child { margin-top: 0; }
.doc__body h2 {
  margin: 2em 0 0.6em; padding-bottom: 0.35em;
  font-family: var(--font-chrome); font-size: 1.25rem; color: var(--gold);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.doc__body h3 { margin: 1.5em 0 0.4em; font-family: var(--font-chrome); font-size: 1.05rem; color: var(--gold-light); }
.doc__body ul { padding-left: 1.3em; }
.doc__body li { margin: 0.3em 0; }
.doc__body li::marker { color: var(--gold); }
.doc__body strong { color: #fff4dd; }
.doc__note { margin-top: 2.5em; font-size: 0.92rem; font-style: italic; color: var(--text-muted); }

.doc--center { text-align: center; }
.notfound__logo { width: auto; height: 160px; margin: 20px auto 0; filter: drop-shadow(0 6px 24px rgba(227, 173, 70, 0.35)); }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 860px) {
  .features__grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .worlds__list { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer__links { justify-content: center; }
}

@media (max-width: 640px) {
  /* Screenshots become a swipeable row instead of three tiny phones. */
  .shots__row {
    display: flex; gap: 16px; justify-content: flex-start;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 32px -16px 0; padding: 18px 16px 12px;
    scrollbar-width: none;
  }
  .shots__row::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 72%; scroll-snap-align: center; }
  .phone:nth-child(2) { margin-top: 0; }
  .stats dd { font-size: 0.82rem; }
  .eyebrow { font-size: 0.75rem; letter-spacing: 0.12em; }
  .world__name { left: 16px; bottom: 10px; }
  .world__badge { top: 10px; right: 10px; font-size: 0.7rem; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo { animation: none; }
}
