/* Fabulandi / Tails & Tiles — "warm velvet boutique" palette from the game */
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/CormorantGaramond-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/CormorantGaramond-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/assets/fonts/Jost-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/assets/fonts/Jost-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --velvet-deep: #1c0810;
  --velvet: #3b1020;
  --velvet-light: #57192f;
  --gold: #d8b57a;
  --ivory: #f5ebdd;
  --rose: #c98a86;
  --ink: #d9c6bb;
  --line: rgba(216, 181, 122, 0.28);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 68rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--velvet-deep) radial-gradient(ellipse 90% 50% at 50% 0%, var(--velvet-light) 0%, var(--velvet) 35%, var(--velvet-deep) 75%) no-repeat;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--ivory); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ivory); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 9vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
strong { color: var(--ivory); font-weight: 500; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--velvet-deep); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ivory); font: 600 1.5rem/1 var(--serif); letter-spacing: 0.02em; }
.brand img { width: 2.25rem; height: 2.25rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

/* hero */
.hero { text-align: center; padding: 3.5rem 0 3rem; }
.hero .eyebrow { font: 500 0.85rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.hero .tagline { font: italic 500 clamp(1.4rem, 4.5vw, 1.9rem)/1.3 var(--serif); color: var(--rose); margin-bottom: 1.25rem; }
.hero .lead { max-width: 36rem; margin: 0 auto 2rem; }
.portraits { display: flex; justify-content: center; align-items: center; gap: clamp(1rem, 5vw, 3rem); margin: 0 auto 2rem; }
.portraits figure { margin: 0; }
.portraits img { width: clamp(7rem, 30vw, 11rem); height: clamp(7rem, 30vw, 11rem); border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(216, 181, 122, 0.12), 0 12px 40px rgba(0, 0, 0, 0.45); }
.portraits figcaption { margin-top: 0.6rem; font: 600 1.35rem/1 var(--serif); color: var(--ivory); }
.portraits .and { font: italic 500 2rem/1 var(--serif); color: var(--gold); }
.gems { display: flex; justify-content: center; gap: 0.5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.gems img { width: 2.75rem; height: 2.75rem; }

/* store badges (placeholders) */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.badge { display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 11.5rem; padding: 0.6rem 1.1rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(28, 8, 16, 0.6); color: var(--ivory); text-align: left; }
.badge small { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rose); }
.badge span { font: 500 1.1rem/1.3 var(--sans); }

/* sections */
section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.features { display: grid; gap: 1rem; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.card { background: linear-gradient(180deg, rgba(87, 25, 47, 0.55), rgba(59, 16, 32, 0.55)); border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; }
.card { text-align: center; }
.card img { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.card p:last-child { margin-bottom: 0; }
.shots { display: grid; gap: 1.5rem; grid-template-columns: 1fr; max-width: 22rem; margin: 0 auto; }
.shots figure { margin: 0; text-align: center; }
.shots img { border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.shots figcaption { margin-top: 0.6rem; font-size: 0.95rem; color: var(--rose); }
.about { display: grid; gap: 1.5rem; align-items: center; }
.about img { width: 8rem; margin: 0 auto; }

/* document pages */
.doc { padding: 2.5rem 0 3rem; }
.doc .wrap { max-width: 46rem; }
.doc h2 { font-size: 1.75rem; margin-top: 2.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.doc h3 { margin-top: 1.5rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.4em; }
.meta { color: var(--rose); font-size: 0.95rem; }
.toc { background: rgba(28, 8, 16, 0.5); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.25rem; }
.toc ol { margin: 0; padding-left: 1.25rem; columns: 1; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
th { color: var(--ivory); font-weight: 500; }
td a { overflow-wrap: anywhere; }
@media (max-width: 39.99rem) {
  /* на телефоне строки таблицы — карточки: партнёр, цель, ссылка друг под другом */
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 0.15rem 0; }
  td:first-child { color: var(--ivory); font-weight: 500; }
}
details { background: rgba(28, 8, 16, 0.5); border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.9rem 1.1rem; margin-bottom: 0.75rem; }
summary { cursor: pointer; color: var(--ivory); font-weight: 500; }
details[open] summary { margin-bottom: 0.6rem; }
.note { border-left: 3px solid var(--gold); padding: 0.25rem 0 0.25rem 1rem; }
.button { display: inline-block; background: var(--gold); color: var(--velvet-deep); font-weight: 500; text-decoration: none; padding: 0.75rem 1.5rem; border-radius: 999px; }
.button:hover { background: var(--ivory); color: var(--velvet-deep); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: 0.9rem; color: var(--ink); }
.site-footer .wrap { display: grid; gap: 1.25rem; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer .nav { font-size: 0.9rem; }
.copy { color: var(--rose); }

@media (min-width: 40rem) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .about { grid-template-columns: 9rem 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
  .toc ol { columns: 2; }
}
@media (min-width: 60rem) {
  .features { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .nav a { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
}

.center { text-align: center; }
