/*
Theme Name: Crypto
Theme URI: https://wordpress.org
Author: Orkhan Chichitov
Author URI: https://wordpress.org
Description: A simple and clean WordPress theme for cryptocurrency-related websites. It features a modern design, responsive layout, and customizable options to create a unique online presence for your crypto business or blog.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================================
   ROOT VARIABLES — палитра Plum / Sage / Warm Cream / Olive
   (референс интерфейса — Kraken: светлые карточки, фиолетово-сливовый акцент)
   ===================================================================== */
:root {
    --crypto-bg: #f8f3ea;
    --crypto-surface: #ffffff;
    --crypto-surface-alt: #f1e7d7;
    --crypto-cream: #efe2cf;
    --crypto-text: #262b1f;
    --crypto-text-muted: #5d6450;
    --crypto-accent: #6e1a43;
    --crypto-accent-hover: #52102f;
    --crypto-accent-soft: rgba(110, 26, 67, 0.12);
    --crypto-sage: #a5b38d;
    --crypto-sage-dark: #6f7d58;
    --crypto-sage-soft: #e4e9d9;
    --crypto-olive: #3b4430;
    --crypto-olive-deep: #2c3324;
    --crypto-border: #e3d8c6;
    --crypto-up: #3f7a3a;
    --crypto-down: #a3263f;
    --crypto-radius: 18px;
    --crypto-radius-sm: 12px;
    --crypto-shadow: 0 10px 30px rgba(59, 68, 48, 0.08);
    --crypto-shadow-hover: 0 18px 44px rgba(110, 26, 67, 0.18);
    --crypto-section-y: 72px;
    --crypto-gap: 24px;
    --crypto-header-h: 76px;
    --crypto-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--crypto-text);
    background: var(--crypto-bg);
    -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
    overflow: hidden;
}

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

h1,
h2,
h3 {
    margin: 0 0 16px;
    line-height: 1.2;
    color: var(--crypto-text);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 4.2vw, 3.3rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.55rem, 2.8vw, 2.25rem);
    font-weight: 800;
}

h3 {
    font-size: 1.18rem;
    font-weight: 700;
}

p {
    margin: 0 0 16px;
}

a {
    color: var(--crypto-accent);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--crypto-accent-hover);
}

p a,
li a,
td a {
    color: var(--crypto-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

[id] {
    scroll-margin-top: calc(var(--crypto-header-h) + 16px);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Появление при скролле (класс .js ставится в header.php, без JS всё видно) */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--crypto-ease), transform 0.7s var(--crypto-ease);
    transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =====================================================================
   BUTTONS (стили через родителя — у ссылок только href)
   ===================================================================== */
.btn,
.cta__action a,
.button-row a,
.error404__actions a,
.cookie-popup__accept {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--crypto-accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(110, 26, 67, 0.28);
    transition: transform 0.25s var(--crypto-ease), box-shadow 0.25s ease, background 0.25s ease;
}

.cta__action a::after,
.button-row a::after {
    content: "→";
    transition: transform 0.25s var(--crypto-ease);
}

.btn:hover,
.cta__action a:hover,
.button-row a:hover,
.error404__actions a:hover,
.cookie-popup__accept:hover {
    background: var(--crypto-accent-hover);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(110, 26, 67, 0.36);
}

.cta__action a:hover::after,
.button-row a:hover::after {
    transform: translateX(4px);
}

.button-row {
    margin: 8px 0 24px;
}

.button-row a {
    background: transparent;
    color: var(--crypto-accent);
    border: 2px solid var(--crypto-accent);
    box-shadow: none;
}

.button-row a:hover {
    background: var(--crypto-accent);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 243, 234, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header--scrolled {
    border-color: var(--crypto-border);
    box-shadow: 0 6px 24px rgba(59, 68, 48, 0.08);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--crypto-header-h);
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-header__brand > a {
    color: var(--crypto-text);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.site-header__logo-icon {
    width: 36px;
    height: 36px;
    transition: transform 0.5s var(--crypto-ease);
}

.site-header__brand:hover .site-header__logo-icon {
    transform: rotate(180deg);
}

.site-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 11px;
    border: 1px solid var(--crypto-border);
    border-radius: 12px;
    background: var(--crypto-surface);
    cursor: pointer;
}

.site-header__burger-line {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--crypto-text);
    transition: transform 0.3s var(--crypto-ease), opacity 0.2s ease;
}

.site-header__burger[aria-expanded="true"] .site-header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header__burger[aria-expanded="true"] .site-header__burger-line:nth-child(2) {
    opacity: 0;
}

.site-header__burger[aria-expanded="true"] .site-header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav__list,
.site-nav__list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav__list > li {
    position: relative;
}

.site-nav__list a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--crypto-text);
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a {
    background: var(--crypto-accent-soft);
    color: var(--crypto-accent);
}

.site-nav__list .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.25s ease;
}

.site-nav__list .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    background: var(--crypto-surface);
    box-shadow: var(--crypto-shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s var(--crypto-ease), visibility 0.25s;
}

.site-nav__list > li:hover > .sub-menu,
.site-nav__list > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.site-nav__list > li:hover > a::after {
    transform: translateY(0) rotate(225deg);
}

/* =====================================================================
   SECTIONS & LAYOUT
   ===================================================================== */
.section {
    padding: var(--crypto-section-y) 0;
}

.section--alt {
    background: var(--crypto-surface-alt);
}

.section--white {
    background: var(--crypto-surface);
}

.section__head {
    max-width: 820px;
    margin-bottom: 32px;
}

.section__head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section__head p {
    color: var(--crypto-text-muted);
    font-size: 1.05rem;
}

.icon-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.icon-heading h2 {
    margin: 0;
}

.icon-heading__icon,
.card__icon,
.faq__icon,
.snapshot__icon,
.policy-block__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--crypto-accent-soft);
    color: var(--crypto-accent);
    transition: transform 0.35s var(--crypto-ease), background 0.3s ease, color 0.3s ease;
}

.prose > *:last-child {
    margin-bottom: 0;
}

.prose ul,
.prose ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.prose li {
    margin-bottom: 8px;
}

.prose h3 {
    margin-top: 26px;
}

.prose li::marker {
    color: var(--crypto-accent);
    font-weight: 700;
}

/* Сплит: текст + картинка */
.split__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.split--reverse .split__media {
    order: -1;
}

.media {
    position: relative;
    overflow: hidden;
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
    aspect-ratio: 4 / 3;
    background: var(--crypto-olive);
    transition: box-shadow 0.4s ease, transform 0.4s var(--crypto-ease);
}

.media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, transparent 55%, rgba(110, 26, 67, 0.35));
    opacity: 0.6;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.media__img {
    width: 100%;
    height: calc(100% + 48px);
    margin-top: -24px;
    object-fit: cover;
    transform: translateY(var(--parallax-y, 0)) scale(1.02);
    transition: transform 0.6s var(--crypto-ease), filter 0.4s ease;
}

.media:hover {
    transform: translateY(-6px);
    box-shadow: var(--crypto-shadow-hover);
}

.media:hover .media__img {
    transform: translateY(var(--parallax-y, 0)) scale(1.08);
    filter: saturate(1.15);
}

.media:hover::after {
    opacity: 0.25;
}

.media--wide {
    aspect-ratio: 16 / 7;
}

/* =====================================================================
   HERO (с виджетом справа, без картинки)
   ===================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 72px;
    background:
        radial-gradient(circle at 85% 20%, rgba(165, 179, 141, 0.45), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(110, 26, 67, 0.14), transparent 45%),
        var(--crypto-bg);
}

.hero::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    top: -160px;
    left: 40%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 226, 207, 0.9), transparent 70%);
    animation: hero-float 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes hero-float {
    to {
        transform: translate(80px, 60px) scale(1.15);
    }
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 48px;
    align-items: center;
}

.hero__content > p {
    font-size: 1.1rem;
    color: var(--crypto-text-muted);
}

.hero__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
    align-items: center;
    color: var(--crypto-text-muted);
}

.hero__nav a {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--crypto-sage-soft);
    color: var(--crypto-olive);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero__nav a:hover {
    background: var(--crypto-accent);
    color: #fff;
    transform: translateY(-2px);
}

.hero__widget {
    position: relative;
}

.exchange-widget {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    padding: 10px;
    border-radius: 24px;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: 0 24px 60px rgba(59, 68, 48, 0.16);
    transition: transform 0.4s var(--crypto-ease), box-shadow 0.4s ease;
}

.exchange-widget::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--crypto-accent), var(--crypto-sage));
    opacity: 0.55;
    filter: blur(14px);
}

.exchange-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px rgba(110, 26, 67, 0.2);
}

.exchange-widget__frame {
    display: block;
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 16px;
}

/* Hero внутренних страниц: текст + картинка */
.page-hero {
    padding: 56px 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(165, 179, 141, 0.4), transparent 45%),
        var(--crypto-bg);
}

.page-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.page-hero__inner--single {
    grid-template-columns: 1fr;
    max-width: 860px;
}

.page-hero__content > p {
    font-size: 1.08rem;
    color: var(--crypto-text-muted);
}

/* =====================================================================
   CARDS / FEATURES
   ===================================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--crypto-gap);
}

.cards--two {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    position: relative;
    padding: 28px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
    overflow: hidden;
    transition: transform 0.35s var(--crypto-ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

.card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--crypto-accent), var(--crypto-sage));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--crypto-ease);
}

.card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow: var(--crypto-shadow-hover);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover .card__icon,
.policy-block:hover .policy-block__icon {
    background: var(--crypto-accent);
    color: #fff;
    transform: rotate(-8deg) scale(1.08);
}

.card__icon {
    margin-bottom: 18px;
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    margin: 0;
    color: var(--crypto-text-muted);
}

.card > *:last-child {
    margin-bottom: 0;
}

/* Шаги */
.steps {
    counter-reset: step;
    display: grid;
    gap: 14px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.prose .steps {
    padding-left: 0;
}

.steps__item {
    counter-increment: step;
    position: relative;
    padding: 18px 20px 18px 74px;
    border-radius: var(--crypto-radius-sm);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    transition: transform 0.3s var(--crypto-ease), box-shadow 0.3s ease, border-color 0.3s ease;
}

.steps__item::before {
    content: counter(step);
    position: absolute;
    left: 18px;
    top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--crypto-accent);
    color: #fff;
    font-weight: 800;
    transition: transform 0.3s var(--crypto-ease);
}

.steps__item:hover {
    transform: translateX(6px);
    border-color: var(--crypto-sage);
    box-shadow: var(--crypto-shadow);
}

.steps__item:hover::before {
    transform: scale(1.1) rotate(-6deg);
}

.steps__item b {
    color: var(--crypto-text);
}

/* =====================================================================
   TABLES
   ===================================================================== */
.data-table {
    margin: 0 0 20px;
    overflow-x: auto;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s var(--crypto-ease);
}

.data-table:hover {
    box-shadow: var(--crypto-shadow-hover);
    transform: translateY(-3px);
}

.data-table table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--crypto-border);
    vertical-align: top;
}

.data-table th {
    background: var(--crypto-olive);
    color: var(--crypto-cream);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--crypto-sage-soft);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table__note {
    margin: 0;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--crypto-text-muted);
    border-top: 1px solid var(--crypto-border);
}

/* =====================================================================
   CHART (SVG рисуется на сервере)
   ===================================================================== */
.rate-chart {
    padding: 26px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
}

.rate-chart__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.rate-chart__pair {
    color: var(--crypto-text-muted);
    font-weight: 600;
}

.rate-chart__rate {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--crypto-accent);
}

.rate-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rate-stats--period {
    margin-top: 14px;
}

.rate-stats__item {
    display: flex;
    flex-direction: column;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    transition: transform 0.25s var(--crypto-ease), border-color 0.25s ease;
}

.rate-stats__item:hover {
    transform: translateY(-3px);
    border-color: var(--crypto-sage);
}

.rate-stats__label {
    font-size: 0.75rem;
    color: var(--crypto-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rate-stats__value {
    font-weight: 800;
}

.rate-stats__value--up,
.snapshot__value--up {
    color: var(--crypto-up);
}

.rate-stats__value--down,
.snapshot__value--down {
    color: var(--crypto-down);
}

.rate-chart__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rate-chart__tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 999px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
}

.rate-chart__tab {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--crypto-text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rate-chart__tab:hover {
    color: var(--crypto-accent);
}

.rate-chart__panel {
    display: none;
    animation: chart-in 0.5s var(--crypto-ease);
}

.rate-chart__radio[value="24h"]:checked ~ .rate-chart__panel[data-period="24h"],
.rate-chart__radio[value="7d"]:checked ~ .rate-chart__panel[data-period="7d"],
.rate-chart__radio[value="30d"]:checked ~ .rate-chart__panel[data-period="30d"],
.rate-chart__radio[value="90d"]:checked ~ .rate-chart__panel[data-period="90d"],
.rate-chart__radio[value="1y"]:checked ~ .rate-chart__panel[data-period="1y"] {
    display: block;
}

.rate-chart__radio[value="24h"]:checked ~ .rate-chart__tabs [data-period="24h"],
.rate-chart__radio[value="7d"]:checked ~ .rate-chart__tabs [data-period="7d"],
.rate-chart__radio[value="30d"]:checked ~ .rate-chart__tabs [data-period="30d"],
.rate-chart__radio[value="90d"]:checked ~ .rate-chart__tabs [data-period="90d"],
.rate-chart__radio[value="1y"]:checked ~ .rate-chart__tabs [data-period="1y"] {
    background: var(--crypto-accent);
    color: #fff;
}

.rate-chart__radio:focus-visible ~ .rate-chart__tabs {
    outline: 2px solid var(--crypto-accent);
    outline-offset: 2px;
}

@keyframes chart-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.rate-chart__foot,
.snapshot__foot,
.converter__foot {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: var(--crypto-text-muted);
}

.chart__svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.chart__grid {
    stroke: var(--crypto-border);
    stroke-width: 1;
}

.chart__grid--v {
    stroke-dasharray: 4 4;
}

.chart__label {
    fill: var(--crypto-text-muted);
    font-size: 11px;
    font-family: inherit;
}

.chart__area {
    fill: var(--crypto-accent-soft);
}

.chart__line {
    fill: none;
    stroke: var(--crypto-accent);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 2000;
    animation: chart-draw 1.6s var(--crypto-ease) both;
}

@keyframes chart-draw {
    from {
        stroke-dashoffset: 2000;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.chart__dot {
    fill: var(--crypto-accent);
    stroke: #fff;
    stroke-width: 2;
}

.chart__hit {
    fill: transparent;
    cursor: crosshair;
    transition: fill 0.15s ease;
}

.chart__hit:hover {
    fill: var(--crypto-accent);
}

.chart-empty {
    padding: 24px;
    border-radius: var(--crypto-radius-sm);
    background: var(--crypto-sage-soft);
    color: var(--crypto-text-muted);
    text-align: center;
}

/* Сводка рынка */
.snapshot {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.snapshot__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
    transition: transform 0.3s var(--crypto-ease), box-shadow 0.3s ease;
}

.snapshot__card:hover {
    transform: translateY(-6px);
    box-shadow: var(--crypto-shadow-hover);
}

.snapshot__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
}

.snapshot__label {
    font-size: 0.85rem;
    color: var(--crypto-text-muted);
}

.snapshot__value {
    font-size: 1.35rem;
    font-weight: 800;
}

/* Конвертер */
.converter {
    padding: 28px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
}

.converter__fields {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.converter__field {
    flex: 1;
}

.converter__field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.converter__field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--crypto-border);
    border-radius: 12px;
    background: var(--crypto-bg);
    font: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--crypto-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.converter__field input:focus {
    outline: 0;
    border-color: var(--crypto-accent);
    box-shadow: 0 0 0 4px var(--crypto-accent-soft);
}

.converter__swap {
    display: inline-flex;
    padding: 14px;
    border-radius: 50%;
    background: var(--crypto-accent-soft);
    color: var(--crypto-accent);
}

.converter__result {
    margin: 18px 0 12px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--crypto-accent);
}

.converter__presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.converter__presets li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: 12px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    font-size: 0.85rem;
    text-align: center;
    transition: transform 0.25s var(--crypto-ease), border-color 0.25s ease;
}

.converter__presets li:hover {
    transform: translateY(-3px);
    border-color: var(--crypto-accent);
}

.converter__preset {
    border: 0;
    background: none;
    font: inherit;
    font-weight: 800;
    color: var(--crypto-accent);
    cursor: pointer;
}

/* =====================================================================
   ROUTES (списки направлений с логотипами монет)
   ===================================================================== */
.routes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--crypto-gap);
}

.routes__group {
    padding: 28px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
}

.routes__group > p {
    color: var(--crypto-text-muted);
}

.route-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.route-list__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    transition: transform 0.3s var(--crypto-ease), border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.route-list__item > a {
    flex: 1;
    color: var(--crypto-text);
    font-weight: 700;
    text-decoration: none;
}

.route-list__item > a::before {
    content: "";
    position: absolute;
    inset: 0;
}

.route-list__item::after {
    content: "→";
    color: var(--crypto-accent);
    font-weight: 800;
    transition: transform 0.3s var(--crypto-ease);
}

.route-list__item:hover {
    transform: translateX(6px);
    border-color: var(--crypto-accent);
    background: var(--crypto-surface);
    box-shadow: var(--crypto-shadow);
}

.route-list__item:hover::after {
    transform: translateX(4px);
}

.coin-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: transform 0.5s var(--crypto-ease);
}

.route-list__item:hover .coin-logo {
    transform: rotate(360deg) scale(1.08);
}

/* =====================================================================
   CTA (фоновая картинка + оливковый оверлей)
   ===================================================================== */
.cta {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    color: var(--crypto-cream);
    background: var(--crypto-olive-deep);
}

.cta__bg {
    position: absolute;
    inset: -40px 0;
    background-image: var(--cta-bg);
    background-size: cover;
    background-position: center;
    transform: translateY(var(--parallax-y, 0)) scale(1.05);
    opacity: 0.45;
}

.cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(44, 51, 36, 0.92), rgba(110, 26, 67, 0.75));
}

.cta__inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    text-align: center;
    margin: 0 auto;
}

.cta__icon {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(239, 226, 207, 0.14);
    color: var(--crypto-cream);
    animation: cta-pulse 3s ease-in-out infinite;
}

@keyframes cta-pulse {
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 12px rgba(239, 226, 207, 0.06);
    }
}

.cta h2 {
    color: #fff;
}

.cta p {
    color: rgba(239, 226, 207, 0.88);
    font-size: 1.08rem;
}

.cta__action {
    margin-top: 24px;
}

.cta__action a {
    background: var(--crypto-cream);
    color: var(--crypto-accent);
}

.cta__action a:hover {
    background: #fff;
    color: var(--crypto-accent-hover);
}

/* Блок CTA внутри секции (без фона) */
.inline-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding: 24px 28px;
    border-radius: var(--crypto-radius);
    background: linear-gradient(120deg, var(--crypto-sage-soft), var(--crypto-cream));
    border: 1px solid var(--crypto-border);
    transition: box-shadow 0.3s ease, transform 0.3s var(--crypto-ease);
}

.inline-cta:hover {
    transform: translateY(-4px);
    box-shadow: var(--crypto-shadow);
}

.inline-cta p {
    flex: 1 1 340px;
    margin: 0;
}

.inline-cta .cta__action {
    margin: 0;
}

.inline-cta .cta__action a {
    background: var(--crypto-accent);
    color: #fff;
}

/* =====================================================================
   FAQ
   ===================================================================== */
.faq {
    display: grid;
    gap: 14px;
    max-width: 900px;
}

.faq__item {
    border-radius: var(--crypto-radius-sm);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s var(--crypto-ease);
}

.faq__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--crypto-shadow);
}

.faq__item[open] {
    border-color: var(--crypto-accent);
    box-shadow: var(--crypto-shadow);
}

.faq__question {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    list-style: none;
    cursor: pointer;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question::after {
    content: "+";
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--crypto-accent);
    transition: transform 0.3s var(--crypto-ease);
}

.faq__item[open] .faq__question::after {
    transform: rotate(45deg);
}

.faq__question h3 {
    margin: 0;
    font-size: 1.05rem;
}

.faq__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.faq__answer {
    padding: 0 20px 18px 76px;
    color: var(--crypto-text-muted);
    animation: chart-in 0.4s var(--crypto-ease);
}

.faq__answer p {
    margin: 0;
}

/* =====================================================================
   ARTICLES (гайды блога)
   ===================================================================== */
.article__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    align-items: start;
}

.article__body > section {
    margin-bottom: 44px;
}

.article__aside {
    position: sticky;
    top: calc(var(--crypto-header-h) + 20px);
}

.answer-box {
    position: relative;
    margin: 0 0 28px;
    padding: 24px 24px 24px 84px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-sage-soft);
    border-left: 5px solid var(--crypto-sage-dark);
    transition: transform 0.3s var(--crypto-ease), box-shadow 0.3s ease;
}

.answer-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--crypto-shadow);
}

.answer-box__icon {
    position: absolute;
    left: 22px;
    top: 24px;
    display: inline-flex;
    padding: 10px;
    border-radius: 12px;
    background: var(--crypto-sage-dark);
    color: #fff;
}

.answer-box p:last-child {
    margin: 0;
}

.toc {
    padding: 24px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
}

.toc__title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--crypto-accent);
}

.toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc li {
    border-top: 1px solid var(--crypto-border);
}

.toc li > a {
    display: block;
    padding: 9px 0 9px 16px;
    position: relative;
    color: var(--crypto-text);
    font-weight: 600;
    font-size: 0.93rem;
    text-decoration: none;
    transition: color 0.2s ease, padding 0.25s var(--crypto-ease);
}

.toc li > a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--crypto-sage);
    transform: translateY(-50%);
}

.toc li > a:hover {
    color: var(--crypto-accent);
    padding-left: 22px;
}

.article__figure {
    margin: 0 0 28px;
}

/* Список гайдов (категория блога) */
.guide-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guide-list__item {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px;
    border-radius: var(--crypto-radius-sm);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    color: var(--crypto-text-muted);
    transition: transform 0.3s var(--crypto-ease), box-shadow 0.3s ease, border-color 0.3s ease;
}

.guide-list__icon {
    display: inline-flex;
    padding: 10px;
    border-radius: 12px;
    background: var(--crypto-accent-soft);
    color: var(--crypto-accent);
    transition: background 0.3s ease, color 0.3s ease;
}

.guide-list__item > div > a {
    display: block;
    margin-bottom: 4px;
    color: var(--crypto-text);
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
}

.guide-list__item > div > a::before {
    content: "";
    position: absolute;
    inset: 0;
}

.guide-list__item:hover {
    transform: translateY(-5px);
    border-color: var(--crypto-accent);
    box-shadow: var(--crypto-shadow-hover);
}

.guide-list__item:hover .guide-list__icon {
    background: var(--crypto-accent);
    color: #fff;
}

.guide-list__item:hover > div > a {
    color: var(--crypto-accent);
}

/* =====================================================================
   POLICY / INFO BLOCKS
   ===================================================================== */
.policy-block {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 22px;
    padding: 30px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    box-shadow: var(--crypto-shadow);
    transition: transform 0.3s var(--crypto-ease), box-shadow 0.3s ease;
}

.policy-block:hover {
    transform: translateY(-4px);
    box-shadow: var(--crypto-shadow-hover);
}

.policy-block h2 {
    font-size: 1.45rem;
}

/* Дополнительные модификаторы */
.card--media {
    padding-top: 0;
}

.card--media .media {
    margin: 0 -28px 22px;
    border-radius: 0;
    box-shadow: none;
    aspect-ratio: 16 / 9;
}

.card--media .media:hover {
    transform: none;
}

.card h2 {
    font-size: 1.35rem;
}

.card p + p {
    margin-top: 12px;
}

.section__note {
    margin-top: 20px;
}

.data-table--spaced {
    margin-top: 32px;
}

.page-hero .snapshot {
    margin-top: 32px;
}

.guide-list--grid {
    grid-template-columns: repeat(2, 1fr);
}

.article__figure.media {
    margin: 8px 0 28px;
}

.toc__title .icon {
    width: 20px;
    height: 20px;
}

.toc__title b {
    color: var(--crypto-text);
}

/* =====================================================================
   404
   ===================================================================== */
.error404__wrapper {
    padding: 110px 0;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(165, 179, 141, 0.4), transparent 55%), var(--crypto-bg);
}

.error404__code {
    font-size: clamp(6rem, 18vw, 11rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--crypto-accent), var(--crypto-sage-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error404__text {
    color: var(--crypto-text-muted);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
    padding: 64px 0 28px;
    background: var(--crypto-olive);
    color: rgba(239, 226, 207, 0.82);
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(5, 1fr);
    gap: 32px;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.site-footer__brand img {
    width: 36px;
    height: 36px;
}

.site-footer__about {
    font-size: 0.92rem;
}

.site-footer__mail {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-footer__mail-icon {
    display: inline-flex;
    padding: 8px;
    border-radius: 10px;
    background: rgba(239, 226, 207, 0.12);
    color: var(--crypto-sage);
}

.site-footer p a {
    color: var(--crypto-cream);
}

.footer-menu__title {
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: #fff;
}

.footer-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-menu__list li {
    margin-bottom: 8px;
}

.footer-menu__list li > a {
    position: relative;
    color: rgba(239, 226, 207, 0.78);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, padding 0.25s var(--crypto-ease);
}

.footer-menu__list li > a:hover {
    color: var(--crypto-sage);
    padding-left: 6px;
}

.site-footer__bottom {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(239, 226, 207, 0.15);
    font-size: 0.85rem;
}

.site-footer__copy {
    margin: 0;
}

/* =====================================================================
   COOKIE POPUP
   ===================================================================== */
.cookie-popup {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 18px;
    width: calc(100% - 32px);
    max-width: 760px;
    padding: 18px 22px;
    border-radius: var(--crypto-radius);
    background: var(--crypto-olive-deep);
    color: var(--crypto-cream);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translate(-50%, 30px);
    transition: opacity 0.4s ease, transform 0.4s var(--crypto-ease);
}

.cookie-popup--visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.cookie-popup__icon {
    display: inline-flex;
    padding: 12px;
    border-radius: 14px;
    background: rgba(165, 179, 141, 0.2);
    color: var(--crypto-sage);
}

.cookie-popup__body {
    flex: 1;
}

.cookie-popup__title {
    margin: 0 0 2px;
    font-weight: 800;
    color: #fff;
}

.cookie-popup__text {
    margin: 0;
    font-size: 0.9rem;
}

.cookie-popup__text a {
    color: var(--crypto-sage);
}

.cookie-popup__accept {
    flex-shrink: 0;
    padding: 12px 26px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .site-footer__identity {
        grid-column: 1 / -1;
    }

    .hero__inner {
        grid-template-columns: 1fr 440px;
    }

    .site-nav__list a {
        padding: 10px 8px;
        font-size: 0.88rem;
    }
}

@media (max-width: 960px) {
    :root {
        --crypto-header-h: 68px;
    }

    .site-header__burger {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--crypto-header-h));
        overflow-y: auto;
        padding: 12px 24px 24px;
        background: var(--crypto-surface);
        border-bottom: 1px solid var(--crypto-border);
        box-shadow: 0 20px 40px rgba(59, 68, 48, 0.15);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.3s ease, transform 0.3s var(--crypto-ease), visibility 0.3s;
    }

    .site-nav--open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav__list a {
        padding: 12px 10px;
        font-size: 1rem;
    }

    .site-nav__list .sub-menu {
        position: static;
        min-width: 0;
        padding: 0 0 0 14px;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border-left: 2px solid var(--crypto-sage-soft);
    }

    .site-nav__list .menu-item-has-children > a::after {
        display: none;
    }

    .hero__inner,
    .page-hero__inner,
    .split__inner,
    .article__layout {
        grid-template-columns: 1fr;
    }

    .split--reverse .split__media {
        order: 0;
    }

    .article__aside {
        position: static;
        order: -1;
    }

    .exchange-widget {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --crypto-section-y: 52px;
    }

    .container {
        padding: 0 20px;
    }

    .cards--two,
    .routes,
    .guide-list--grid {
        grid-template-columns: 1fr;
    }

    .snapshot {
        grid-template-columns: repeat(2, 1fr);
    }

    .converter__presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .policy-block {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .hero {
        padding: 40px 0 52px;
    }

    .cta {
        padding: 64px 0;
    }

    .media--wide {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 16px;
    }

    .snapshot,
    .site-footer__grid,
    .converter__presets {
        grid-template-columns: 1fr;
    }

    .converter__fields {
        flex-direction: column;
        align-items: stretch;
    }

    .converter__swap {
        align-self: center;
        transform: rotate(90deg);
    }

    .exchange-widget {
        padding: 6px;
    }

    .card,
    .routes__group,
    .rate-chart,
    .converter {
        padding: 20px;
    }

    .faq__answer {
        padding-left: 20px;
    }

    .answer-box {
        padding: 76px 20px 20px;
    }

    .cta__action a,
    .button-row a {
        width: 100%;
    }

    .cookie-popup {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-popup__icon {
        align-self: center;
    }

    .cookie-popup__accept {
        width: 100%;
    }
}
