/*
 * Skin of the platform Rusau Learn ("верхний зал"): parchment ground, dark vault for header and footer,
 * torch-gold buttons, carved Podkova headings, painted course banners. Values are the platform's own
 * (src/app/globals.css via tilda/tokens.css) – contrast of every pair is checked there.
 * One palette, no theme switch and no gradients – the same decisions as on rusau.net (24.08.2026).
 */
@font-face { font-family: "Golos Text"; src: url("/assets/fonts/golos.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Podkova"; src: url("/assets/fonts/podkova.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  --surface: #efe8da; --raised: #faf5ea; --sunken: #e4d9c4;
  --line: rgb(90 62 26 / 0.16); --line-strong: rgb(90 62 26 / 0.3);
  --ink: #241a10; --ink-2: #54432d; --ink-3: #6a5740;
  --accent: #7f520c; --accent-hover: #67410a;
  --btn: #d9ad33; --btn-hover: #ecc451; --btn-ink: #1a1408; --gold-soft: #f0e2be; --ok: #1f6f47;
  --top: #171326; --top-ink: #ece2ce; --top-ink-2: #a99cc4;
  --shadow: 0 1px 2px rgb(74 48 12 / 0.1), 0 3px 12px rgb(74 48 12 / 0.08);
  --radius: 14px; --radius-sm: 10px;
  --font: "Golos Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --carved: "Podkova", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--carved); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; margin: 0; }
p, li { max-width: 72ch; }
.lead { font-size: 19px; color: var(--ink-2); }
.muted { color: var(--ink-3); font-size: 15px; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 6px; }

/* Header – dark vault, Arti as the mark, gold "Платформа" */
.top { background: var(--top); color: var(--top-ink); border-bottom: 2px solid var(--btn); }
.top-row { display: flex; align-items: center; gap: 12px 28px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--top-ink); text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand b { display: block; font-family: var(--carved); font-size: 20px; line-height: 1.1; }
.brand small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--btn); }
.top nav { display: flex; gap: 22px; flex: 1; }
.top nav a { color: var(--top-ink); text-decoration: none; font-size: 16px; }
.top nav a:hover { color: var(--btn-hover); }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.btn:hover { background: var(--btn-hover); color: var(--btn-ink); }
.btn-sm { min-height: 42px; padding: 0 20px; }
.btn-ghost { background: var(--raised); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--gold-soft); }

/* Hero */
.hero { padding: 56px 0 44px; }
.hero-small { padding: 36px 0 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.hero-art { width: 232px; filter: drop-shadow(0 10px 18px rgb(74 48 12 / 0.22)); }
.chip { display: inline-block; margin: 0 0 18px; padding: 6px 16px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-strong); font-weight: 600; font-size: 15px; box-shadow: var(--shadow); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.facts li { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.facts b { display: block; font-family: var(--carved); font-size: 22px; line-height: 1.2; }
.facts span { color: var(--ink-2); font-size: 15px; }

/* Platform band – warm gold ground with a golden border, not a dark hole in the parchment */
.band { background: var(--gold-soft); border-top: 1px solid var(--btn); border-bottom: 1px solid var(--btn); padding: 34px 0; }
.band .lead { margin-bottom: 0; }

.page { padding-top: 44px; padding-bottom: 12px; }
section.page + section.page { padding-top: 36px; }

/* Course cards – painted banners from the platform, equal heights in a row */
.courses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.course { display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.course:hover { transform: translateY(-2px); border-color: var(--btn); color: var(--ink); }
.course img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.course-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; flex: 1; }
.course-title { font-family: var(--carved); font-size: 18px; line-height: 1.3; margin: 0; }
.course-text { color: var(--ink-2); font-size: 15px; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--accent); border: 1px solid var(--btn); }
.badge.free { background: #dff0e4; color: var(--ok); border-color: #9fcdb0; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--btn); color: var(--ink); }
.tile b { font-family: var(--carved); font-size: 17px; }
.tile span { color: var(--ink-3); font-size: 14px; }

.faq { display: grid; gap: 10px; margin-top: 16px; max-width: 900px; }
.qa { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; }
.qa summary { cursor: pointer; list-style: none; padding: 12px 0; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { display: inline; font-size: 18px; }
.qa summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.qa[open] summary::after { content: "–"; }
.qa p { margin: 0 0 14px; color: var(--ink-2); }

/* Catalog */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cat { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.cat h2 { font-size: 22px; }
.count { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--accent); background: var(--gold-soft); border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.cat ul { padding-left: 20px; margin: 8px 0 0; }

/* Assignment page */
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 16px; }
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.src { font-size: 15px; }
.task { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px; margin: 16px 0; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.prep { background: var(--gold-soft); border: 1px solid var(--btn); border-radius: var(--radius); padding: 18px 20px; position: sticky; top: 16px; }
.prep h2 { font-size: 21px; }
.prep ul { padding-left: 18px; }
.prep.wide { position: static; margin-top: 24px; }
.one-course .course { box-shadow: none; }

/* Footer – the vault again */
.foot { background: var(--top); color: var(--top-ink-2); margin-top: 56px; padding: 40px 0 44px; font-size: 15px; }
.foot-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.foot a { color: var(--top-ink); }
.foot a:hover { color: var(--btn-hover); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--carved); font-size: 20px; color: var(--top-ink); margin-top: 0; }
.foot-cap { font-family: var(--carved); letter-spacing: .14em; text-transform: uppercase; color: var(--btn); font-size: 13px; margin-top: 0; }

@media (max-width: 1000px) {
  .courses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-grid { grid-template-columns: 1fr; }
  .prep { position: static; }
}
@media (max-width: 720px) {
  .hero { padding: 32px 0 28px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .facts { grid-template-columns: 1fr; }
  .courses, .cats, .foot-row { grid-template-columns: 1fr; }
  .top nav { order: 3; flex-basis: 100%; gap: 16px; padding-bottom: 10px; }
  .task { padding: 4px 16px; }
}
@media (prefers-reduced-motion: reduce) { .course { transition: none; } .course:hover { transform: none; } }
