/* The game's palette, so the site and the app read as one thing.
   Values are taken from lib/app/theme/tiny_dungeon_theme.dart. */
:root {
  --navy: #0a0c1c;
  --charcoal: #1e2a40;
  --gold: #e8b44a;
  --amber: #ffd37a;
  --crimson: #8e1b1b;
  --parchment: #f6e7c8;
  --body: #cfd6e6;
  --rule: rgba(232, 180, 74, 0.28);
  --measure: 68ch;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--body);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  /* A faint torchlight from the top, rather than a flat field. */
  background-image: radial-gradient(
    120% 60% at 50% 0%,
    rgba(255, 154, 60, 0.1),
    transparent 60%
  );
  background-repeat: no-repeat;
}

.preview-banner {
  background: var(--crimson);
  color: #fff;
  margin: 0;
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 600;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--gold);
  color: var(--navy);
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: Cinzel, Georgia, "Times New Roman", serif;
  color: var(--amber);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  margin: 0 0 0.4em;
}
h2 {
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  font-weight: 700;
  margin: 2.4em 0 0.6em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--rule);
}
h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--parchment);
  margin: 1.8em 0 0.4em;
}

a {
  color: var(--amber);
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a:hover,
a:focus-visible {
  color: var(--gold);
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Documents read best at a narrow measure. The landing page needs the room
   to put artwork beside the text, so it opts out. */
main.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

main.wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 0 4rem;
}
main.wide > section:last-of-type {
  padding: 0 1.25rem;
}

/* --- header / footer --- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: Cinzel, Georgia, serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--amber);
  text-decoration: none;
}
.brand img {
  border-radius: 9px;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  max-width: 1080px;
  margin: 3rem auto 0;
  padding: 2rem 1.25rem 3rem;
  font-size: 0.92rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0.8rem 0;
}
.fine {
  color: #8e97ad;
  font-size: 0.85rem;
}

/* --- landing page --- */

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1rem;
}
@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding-top: 4rem;
  }
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--parchment);
}
.shot {
  justify-self: center;
  width: min(300px, 78vw);
  border-radius: 22px;
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: block;
  height: auto;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.store-button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--gold);
  color: var(--amber);
  background: rgba(232, 180, 74, 0.08);
}
.store-button[aria-disabled="true"] {
  border-color: #3b4661;
  color: #8e97ad;
  background: none;
  cursor: default;
}
.store-button small {
  opacity: 0.75;
  font-weight: 400;
}

.features {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  list-style: none;
}
.features li {
  background: rgba(30, 42, 64, 0.55);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
}
.features h2 {
  margin: 0 0 0.35em;
  font-size: 1.05rem;
  border: 0;
  padding: 0;
  color: var(--amber);
}

/* --- documents --- */

.doc-meta {
  color: #8e97ad;
  font-size: 0.9rem;
  margin-top: -0.5em;
}

.callout {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  background: rgba(30, 42, 64, 0.5);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.6rem 0;
}
.callout.warn {
  border-left-color: var(--crimson);
}
.callout :first-child {
  margin-top: 0;
}
.callout :last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
th,
td {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--parchment);
  background: rgba(30, 42, 64, 0.6);
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(30, 42, 64, 0.8);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

ul,
ol {
  padding-left: 1.3rem;
}
li + li {
  margin-top: 0.35em;
}

.toc {
  background: rgba(30, 42, 64, 0.45);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem 1.3rem;
  margin: 1.8rem 0;
}
.toc h2 {
  margin: 0 0 0.5em;
  font-size: 1rem;
  border: 0;
  padding: 0;
}
.toc ol {
  margin: 0;
}
