/* Публичный сайт Courage+. Без внешних шрифтов и скриптов; светлая и тёмная тема по prefers-color-scheme. */

:root {
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --text: #121826;
  --muted: #4a5468;
  --border: #d9deea;
  --accent: #1f56d6;
  --accent-hover: #1847b4;
  --accent-text: #ffffff;
  --accent-soft: #e5edff;
  --accent-ink: #1a47b0;
  --warn-bg: #fff5d6;
  --warn-text: #5c4300;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 6%);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --bg-alt: #111725;
    --surface: #151c2c;
    --surface-2: #1b2438;
    --text: #e8ecf5;
    --muted: #a7b0c4;
    --border: #273149;
    --accent: #4d7dff;
    --accent-hover: #6b93ff;
    --accent-text: #050a14;
    --accent-soft: #18264a;
    --accent-ink: #9db8ff;
    --warn-bg: #3a2f0d;
    --warn-text: #ffe3a1;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 820px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-text); padding: .6rem 1rem; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.logo { flex: none; display: block; }
.main-nav { margin-left: auto; }
.main-nav ul, .lang-switch ul, .footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-nav a {
  color: var(--text); text-decoration: none; padding: .5rem .7rem; border-radius: var(--radius-sm); font-weight: 550; font-size: .97rem;
}
.main-nav a:hover { background: var(--surface-2); }
.lang-switch a {
  display: inline-block; min-width: 2.6rem; text-align: center; padding: .4rem .5rem; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: .85rem; border: 1px solid transparent;
}
.lang-switch a[aria-current="true"] { color: var(--text); border-color: var(--border); background: var(--surface); }
.lang-switch a:hover { color: var(--text); }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .lang-switch { margin-left: auto; }
}
@media (max-width: 520px) {
  .header-cta span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .header-cta { padding: .55rem; }
}
@media (max-width: 400px) {
  .header-row { gap: .5rem; }
  .wrap { width: min(100% - 2rem, var(--wrap)); }
  .lang-switch a { min-width: 2.2rem; padding: .35rem .3rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-small { min-height: 40px; padding: .45rem 1rem; font-size: .92rem; }
.btn-large { min-height: 56px; padding: .9rem 1.8rem; font-size: 1.1rem; }
.icon { flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 1rem; padding: .3rem .8rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .88rem;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); }
.hero-media img { border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); aspect-ratio: 1092 / 614; object-fit: cover; width: 100%; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0 0; }
.facts div { border-left: 3px solid var(--accent); padding-left: .8rem; }
.facts dt { font-size: 1.5rem; font-weight: 800; }
.facts dd { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.35; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-lead { color: var(--muted); font-size: 1.12rem; max-width: 760px; margin-top: -.2rem; margin-bottom: 2rem; }

.cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.card p { color: var(--muted); }
.cards-5 { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.cards-features { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.feature { position: relative; }
.feature-num { display: block; font-weight: 800; color: var(--accent-ink); font-size: .95rem; margin-bottom: .5rem; letter-spacing: .05em; }

/* Gallery */
.gallery { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius-sm); border: 1px solid var(--border); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #0b0f17; }
.gallery figcaption { margin-top: .55rem; color: var(--muted); font-size: .93rem; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; } }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.step {
  counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 3.6rem 1.25rem 1.3rem;
}
.step::before {
  content: counter(step); position: absolute; top: 1.1rem; left: 1.25rem; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 800;
}
.step p { color: var(--muted); font-size: .97rem; }

/* Callouts */
.callout {
  margin-top: 2rem; padding: 1.4rem 1.5rem; border-radius: var(--radius);
  background: var(--warn-bg); color: var(--warn-text); border: 1px solid color-mix(in srgb, var(--warn-text) 25%, transparent);
}
.callout ol { margin: .5rem 0 0; padding-left: 1.3rem; }
.callout li + li { margin-top: .35rem; }

/* Pricing */
.plans { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 320px)); }
.plan { display: flex; flex-direction: column; gap: .3rem; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.price { margin: .2rem 0 1rem; color: var(--text); }
.price-amount { font-size: 2rem; font-weight: 800; }
.price-period { color: var(--muted); }
.pricing-empty { max-width: 680px; }
.pricing-empty .btn { margin-top: 1rem; }

/* Two columns */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.limits { margin: 0; padding: 0; list-style: none; }
.limits li { position: relative; padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px solid var(--border); color: var(--muted); }
.limits li::before { content: ""; position: absolute; left: .2rem; top: 1.05rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .6rem; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; font-weight: 650; position: relative; border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.2rem; top: 50%; width: .6rem; height: .6rem; margin-top: -.4rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -.1rem; }
.faq details p { padding: 0 1.2rem 1.1rem; color: var(--muted); }

/* Soon */
.soon { border: 1px dashed var(--border); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--surface); }
.soon h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.soon p { color: var(--muted); max-width: 760px; }
.badge {
  display: inline-block; margin-bottom: .8rem; padding: .2rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-ink);
}

/* Contacts */
.contacts { position: relative; isolation: isolate; color: #fff; padding: clamp(4rem, 9vw, 7rem) 0; overflow: hidden; background: #0b0f17; }
.contacts picture { position: absolute; inset: 0; z-index: -2; }
.contacts-bg { width: 100%; height: 100%; object-fit: cover; }
.contacts::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(5 9 18 / 92%) 0%, rgb(5 9 18 / 78%) 55%, rgb(5 9 18 / 55%) 100%); }
.contacts .lead { color: #d6dcea; max-width: 640px; }
.contacts .btn-primary { background: #4d7dff; color: #050a14; }
.contacts .btn-primary:hover { background: #6b93ff; }
.telegram-handle a { color: #c9d6ff; font-weight: 700; }

/* Footer */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
.footer-grid .brand { margin-bottom: .6rem; }
.footer-links { flex-direction: column; gap: .4rem; }
.copyright { grid-column: 1 / -1; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* Legal */
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; }
.legal section p { color: var(--text); }
.back-link { font-weight: 600; }
.draft {
  display: inline-block; padding: .55rem .9rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-weight: 650;
}
.toc { margin: 1.5rem 0; padding: 1rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.toc .toc-title { font-size: 1rem; margin: 0 0 .4rem; }
.toc ol { margin: 0; padding-left: 1.3rem; }

/* 404 */
.not-found { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.not-found .actions { justify-content: center; }
.nf-code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 850; line-height: 1; color: var(--accent); margin-bottom: .5rem; }

@media print {
  .site-header, .contacts, .actions, .lang-switch { display: none; }
  body { background: #fff; color: #000; }
}
