/* Открытые страницы caravex.trade (стартовая, страницы разделов, правила, «Данные», 404): готовый HTML из landing/render.mjs.
   Цвета и шрифт — те же, что в приложении (src/styles.css): тёмный фон, золото #cfb27c. Ореола за словом
   «CARAVEX» нет (Ваня 10.10.2026) — свечение только у самой монеты, оно нарисовано в картинке. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e5e7ea; background: #0c0e11; font-synthesis: none; color-scheme: dark;
  --muted: #a0a6b1; --faint: #7d8593; --gold: #cfb27c; --line: #272b33; --panel: #15181e;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: 15px; line-height: 1.6;
  background: radial-gradient(ellipse 90% 520px at top, #1a1812 0%, #0c0e11 100%) no-repeat #0c0e11; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px 56px; }

/* Шапка */
.site-header { width: 100%; max-width: 1040px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 17px; font-weight: 650; text-decoration: none; }
.brand img { display: block; margin: -4px; }
.brand-word { letter-spacing: .11em; margin-right: -.11em; }
/* На стартовой слово «CARAVEX» уже стоит крупно под шапкой — в шапке остаётся только монета. */
.home .site-header .brand-word { display: none; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.site-nav > a { color: var(--muted); text-decoration: none; }
.site-nav > a:hover, .site-nav > a[aria-current] { color: #e5e7ea; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; font-size: 12px; font-weight: 600; }
.lang-switch a, .lang-switch span { padding: 5px 9px; text-decoration: none; color: var(--muted); }
.lang-switch a:hover { color: #e5e7ea; }
.lang-switch .lang-current { background: #20242c; color: var(--gold); }
.site-nav > a.header-enter { padding: 7px 14px; border: 1px solid #6b5a33; border-radius: 7px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.site-nav > a.header-enter:hover { background: rgba(207, 178, 124, .08); color: var(--gold); }

/* Первый экран */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 0 52px; }
.lockup { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 30px; color: var(--gold); }
.lockup img { display: block; margin: -10px; }
.lockup-name { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.lockup-name .brand-word { font-size: 34px; font-weight: 650; }
.brand-tagline { color: #a39a8c; font-size: 13px; font-weight: 500; letter-spacing: .5px; white-space: nowrap; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
h1 { max-width: 760px; font-size: 40px; line-height: 1.18; letter-spacing: -1px; font-weight: 650; text-wrap: balance; }
.lead { max-width: 620px; margin-top: 18px; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.hint { max-width: 460px; margin-top: 14px; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.discord-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; margin-top: 30px; padding: 12px 26px;
  border-radius: 9px; background: #5865F2; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s; }
.discord-button:hover { background: #4752C4; }
.discord-button:focus-visible { outline-color: #fff; border-radius: 9px; }
/* Человек уже вошёл (site.js): кнопка открывает приложение — золотая, без значка Discord. */
.discord-button.is-app { background: var(--gold); color: #17140d; }
.discord-button.is-app:hover { background: #dcc293; }
.discord-button.is-app svg { display: none; }
.signed-in .hint { display: none; }
/* Способов входа два (site.js ставит на <html> класс login-choice): нейтральная кнопка «Войти», фразы «Яндекс или Discord». */
.cta-choice, .when-choice, .hint.hint-choice { display: none; }
.login-choice .cta-default, .login-choice .when-discord, .login-choice .hint.hint-default, .login-choice .discord-button .discord-logo { display: none; }
.login-choice .cta-choice, .login-choice .when-choice { display: inline; }
.login-choice .hint.hint-choice { display: block; }
.login-choice .discord-button { background: var(--gold); color: #17140d; }
.login-choice .discord-button:hover { background: #dcc293; }

/* Блоки */
.block { padding: 34px 0 0; }
.block > h2, .note h2 { font-size: 20px; font-weight: 620; letter-spacing: -.3px; margin-bottom: 18px; }
/* Восемь карточек разделов: 4 × 2 на широком экране, 2 × 4 на планшете, столбик на телефоне — без пустых клеток. */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.features > li { display: flex; }
.feature, .note, .steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
/* Карточка — ссылка на страницу раздела; стрелка в углу подсказывает это и там, где нет наведения (телефон). */
.feature { position: relative; display: block; width: 100%; padding: 20px 20px 22px; text-decoration: none; transition: border-color .15s, background .15s; }
.feature:hover, .feature:focus-visible { border-color: #6b5a33; background: #181b22; }
.feature:focus-visible { border-radius: 12px; }
.feature-go { position: absolute; top: 18px; right: 16px; display: inline-flex; color: var(--faint); transition: color .15s, transform .15s; }
.feature:hover .feature-go, .feature:focus-visible .feature-go { color: var(--gold); transform: translateX(2px); }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 10px; color: var(--gold); background: rgba(207, 178, 124, .09); border: 1px solid rgba(207, 178, 124, .22); }
.feature h3, .steps h3 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.feature p, .steps p, .note p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.note { padding: 22px; }
.note h2 { font-size: 17px; margin-bottom: 4px; }
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.faq h3 { font-size: 16px; font-weight: 600; line-height: 1.35; }
/* Нечётный последний вопрос занимает всю ширину — без пустой клетки рядом. */
.faq .note:last-child:nth-child(odd) { grid-column: 1 / -1; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { display: flex; gap: 14px; padding: 20px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%; border: 1px solid #6b5a33; color: var(--gold); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.final { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 52px; }
.final h2 { margin-bottom: 0; font-size: 24px; }
.final .discord-button { margin-top: 22px; }

/* Страница раздела (/ru/albion/trade/) */
.back a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back a:hover { color: var(--gold); }
.back svg { transform: rotate(180deg); }
.section-page .hero { padding: 14px 0 44px; }
.section-page .hero .back { align-self: flex-start; margin-bottom: 30px; }
.section-page h1 { font-size: 34px; letter-spacing: -.8px; }
.prose p { max-width: 760px; color: #c3c7cf; text-wrap: pretty; }
.prose p + p { margin-top: 12px; }
.steps-4 { grid-template-columns: repeat(2, 1fr); }
.points { margin-top: 10px; }
.points li { position: relative; padding-left: 18px; color: var(--muted); font-size: 14px; }
.points li + li { margin-top: 8px; }
.points li::before { content: ''; position: absolute; left: 2px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .75; }
.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.related a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; transition: border-color .15s; }
.related a:hover, .related a:focus-visible { border-color: #6b5a33; }
.related .feature-icon { width: 34px; height: 34px; margin-bottom: 0; flex-shrink: 0; }
.section-page .final { padding-top: 34px; }

/* Правила и «Данные» */
.legal { max-width: 720px; margin: 0 auto; padding-top: 18px; }
.legal h1 { margin-top: 18px; font-size: 32px; }
.legal .updated { margin-top: 8px; color: var(--faint); font-size: 13px; }
.legal section { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal h2 { font-size: 19px; font-weight: 620; margin-bottom: 10px; }
.legal section p { color: #c3c7cf; text-wrap: pretty; }
.legal section p + p { margin-top: 10px; }

/* 404 */
.not-found { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding-top: 40px; }
.not-found > div { padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.not-found h1 { font-size: 24px; letter-spacing: -.4px; }
.not-found p { margin-top: 8px; color: var(--muted); }
.not-found .links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }
.not-found .links a { color: var(--gold); }

/* Подвал */
.site-footer { width: 100%; border-top: 1px solid var(--line); padding: 24px 20px 30px; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 13px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--gold); }
.disclaimer { max-width: 620px; margin: 14px auto 0; color: var(--faint); font-size: 12px; line-height: 1.5; text-wrap: balance; }
.adults { margin-top: 6px; color: var(--faint); font-size: 12px; }
.site-footer .version { margin-top: 6px; color: var(--faint); font-size: 11px; letter-spacing: .04em; }

@media (max-width: 860px) {
  .features, .steps, .related { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 32px; letter-spacing: -.7px; }
  .section-page h1 { font-size: 30px; letter-spacing: -.6px; }
}
@media (max-width: 600px) {
  main { padding: 0 16px 44px; }
  .site-header { padding: 12px 16px; }
  .site-nav { gap: 12px; }
  /* На телефоне «Правила» и «Данные» остаются в подвале — в шапке только язык и вход. */
  .site-nav > a:not(.header-enter) { display: none; }
  .hero { padding: 22px 0 38px; }
  .lockup { margin-bottom: 22px; }
  .lockup img { width: 88px; height: 88px; margin: -8px; }
  .lockup-name .brand-word { font-size: 28px; }
  .brand-tagline { font-size: 12px; }
  h1 { font-size: 27px; letter-spacing: -.5px; }
  .lead { font-size: 15.5px; }
  .discord-button { width: 100%; }
  .features, .steps, .two, .faq, .not-found, .related { grid-template-columns: 1fr; }
  /* Значок слева от названия — карточки ниже, на экран помещается больше. */
  .feature { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; align-items: start; padding: 16px 40px 16px 16px; }
  .feature-go { top: 16px; right: 14px; }
  .section-page h1 { font-size: 25px; letter-spacing: -.4px; }
  .section-page .hero { padding: 8px 0 34px; }
  .section-page .hero .back { margin-bottom: 22px; }
  .feature-icon { grid-row: span 2; margin-bottom: 0; }
  .feature p { margin-top: 2px; }
  .steps li, .note { padding: 16px; }
  .block { padding-top: 28px; }
  .legal h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .discord-button, .feature, .feature-go, .related a { transition: none; } }
