/*
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: 1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================================
   ROOT VARIABLES — Monochrome palette (Charcoal / Slate / Stone / Ash / Silver)
   ===================================================================== */
:root {
    --crypto-charcoal: #17181c;
    --crypto-slate: #40454f;
    --crypto-stone: #6e7480;
    --crypto-ash: #c4c8cf;
    --crypto-silver: #e7e9ec;

    --crypto-bg: #ffffff;
    --crypto-surface: #f6f7f8;
    --crypto-text: var(--crypto-charcoal);
    --crypto-text-muted: var(--crypto-stone);
    --crypto-border: var(--crypto-ash);

    --crypto-accent: var(--crypto-charcoal);
    --crypto-accent-hover: var(--crypto-slate);
    --crypto-accent-soft: rgba(23, 24, 28, 0.07);
    --crypto-accent-contrast: #ffffff;

    --crypto-section-y: 20px;
    --crypto-radius: 14px;
    --crypto-radius-sm: 8px;
    --crypto-shadow: 0 4px 24px rgba(23, 24, 28, 0.08);
    --crypto-shadow-hover: 0 12px 32px rgba(23, 24, 28, 0.14);
    --crypto-transition: 0.25s ease;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: var(--crypto-bg);
    color: var(--crypto-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; }
p a {
    color: red;
    font-weight: 600;
    text-decoration: underline;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.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;
}

section {
    padding: var(--crypto-section-y) 0;
}

.section-title {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--crypto-text);
}
.section-lead {
    color: var(--crypto-text-muted);
    max-width: 720px;
    margin-bottom: 32px;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--crypto-radius-sm);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--crypto-transition), box-shadow var(--crypto-transition), background var(--crypto-transition), color var(--crypto-transition);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--crypto-shadow-hover);
}
.btn--primary {
    background: var(--crypto-accent);
    color: var(--crypto-accent-contrast);
}
.btn--primary:hover { background: var(--crypto-accent-hover); }
.btn--secondary {
    background: transparent;
    color: var(--crypto-text);
    border-color: var(--crypto-border);
}
.btn--secondary:hover { border-color: var(--crypto-slate); }

/* =====================================================================
   HEADER
   ===================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--crypto-bg);
    border-bottom: 1px solid var(--crypto-border);
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.header__logo {
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.02em;
    color: var(--crypto-charcoal);
    flex-shrink: 0;
}
.header__nav { display: flex; }
.header__menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.header__item { position: relative; }
.header__link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--crypto-radius-sm);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--crypto-slate);
    transition: background var(--crypto-transition), color var(--crypto-transition);
}
.header__link:hover {
    background: var(--crypto-surface);
    color: var(--crypto-charcoal);
}
.header__item--has-children > .header__link::after {
    content: '';
    width: 6px; height: 6px;
    margin-left: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.header__submenu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    box-shadow: var(--crypto-shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--crypto-transition), transform var(--crypto-transition), visibility var(--crypto-transition);
}
.header__item--has-children:hover > .header__submenu,
.header__item--has-children:focus-within > .header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header__sublink {
    display: block;
    padding: 10px 12px;
    border-radius: var(--crypto-radius-sm);
    font-size: 14px;
    color: var(--crypto-slate);
}
.header__sublink:hover {
    background: var(--crypto-surface);
    color: var(--crypto-charcoal);
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    cursor: pointer;
}
.header__burger-line {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--crypto-charcoal);
    transition: transform var(--crypto-transition), opacity var(--crypto-transition);
}
.header__burger.is-active .header__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.is-active .header__burger-line:nth-child(2) { opacity: 0; }
.header__burger.is-active .header__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   HERO (двухколоночный: текст + виджет обмена)
   ===================================================================== */
.hero { padding: 56px 0; }
.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.hero__title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}
.hero__text { color: var(--crypto-text-muted); margin-bottom: 16px; }
.hero__widget { display: flex; justify-content: flex-end; }
.exchange-widget {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 16px;
    box-shadow: var(--crypto-shadow);
    width: 100%;
    max-width: 500px;
}
.exchange-widget iframe { width: 100%; border-radius: var(--crypto-radius-sm); }

/* =====================================================================
   CARDS (переиспользуемый компонент: числа, преимущества, партнёры, гайды)
   ===================================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 24px;
    transition: transform var(--crypto-transition), box-shadow var(--crypto-transition), border-color var(--crypto-transition);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--crypto-shadow-hover);
    border-color: var(--crypto-stone);
}
.card__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
    transition: transform var(--crypto-transition);
}
.card:hover .card__icon { transform: scale(1.08); }
.card__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card__text { color: var(--crypto-text-muted); font-size: 14.5px; margin: 0; }

.card--media { padding: 0; overflow: hidden; }
.card--media .card__media {
    width: 100%; height: 180px; object-fit: cover;
    transition: transform 0.4s ease;
}
.card--media:hover .card__media { transform: scale(1.06); }
.card--media .card__body { padding: 20px; }

/* =====================================================================
   TABLES (сравнение, ставки)
   ===================================================================== */
.compare-table__wrapper, .rate-table__wrapper, .conditions-table__wrapper {
    overflow-x: auto;
    border-radius: var(--crypto-radius);
    border: 1px solid var(--crypto-border);
}
.compare-table, .rate-table, .conditions-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
}
.compare-table th, .compare-table td,
.rate-table th, .rate-table td,
.conditions-table th, .conditions-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--crypto-border);
    font-size: 14.5px;
}
.compare-table th, .rate-table th, .conditions-table th {
    background: var(--crypto-charcoal);
    color: #fff;
    font-weight: 600;
}
.compare-table tr:last-child td, .rate-table tr:last-child td, .conditions-table tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover, .rate-table tbody tr:hover { background: var(--crypto-surface); }

/* =====================================================================
   STEPS
   ===================================================================== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: step; }
.steps__item {
    position: relative;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 28px 24px 24px;
    transition: transform var(--crypto-transition), box-shadow var(--crypto-transition);
}
.steps__item:hover { transform: translateY(-6px); box-shadow: var(--crypto-shadow-hover); }
.steps__number {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--crypto-charcoal);
    color: #fff;
    font-weight: 700;
    margin-bottom: 14px;
}
.steps__title { font-weight: 700; margin-bottom: 8px; }
.steps__text { color: var(--crypto-text-muted); font-size: 14.5px; margin: 0; }

/* =====================================================================
   REVIEWS
   ===================================================================== */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.review {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 22px;
    transition: transform var(--crypto-transition), box-shadow var(--crypto-transition);
}
.review:hover { transform: translateY(-4px); box-shadow: var(--crypto-shadow-hover); }
.review__stars { color: var(--crypto-charcoal); letter-spacing: 2px; margin-bottom: 10px; }
.review__text { font-style: italic; color: var(--crypto-slate); margin: 0; }

/* =====================================================================
   FAQ
   ===================================================================== */
.faq__item {
    border-bottom: 1px solid var(--crypto-border);
    padding: 18px 0;
}
.faq__question {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}
.faq__answer { color: var(--crypto-text-muted); margin: 0; }

/* =====================================================================
   CHART (SVG-график, БЭМ по CLAUDE.md)
   ===================================================================== */
.chart { width: 100%; }
.chart__svg { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--crypto-border); stroke-width: 1; }
.chart__grid--v { stroke-dasharray: 3 4; }
.chart__label { fill: var(--crypto-text-muted); font-size: 11px; font-family: inherit; }
.chart__area { fill: var(--crypto-accent-soft); stroke: none; }
.chart__line { fill: none; stroke: var(--crypto-accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--crypto-accent); stroke: #fff; stroke-width: 2; }
.chart-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--crypto-text-muted);
    background: var(--crypto-surface);
    border-radius: var(--crypto-radius);
    border: 1px dashed var(--crypto-border);
}

/* =====================================================================
   RELATED LINKS / PARTNERS / NUMBERS
   ===================================================================== */
.related-links { display: flex; flex-wrap: wrap; gap: 12px; }
.related-links__item {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--crypto-border);
    font-size: 14px;
    font-weight: 500;
    transition: background var(--crypto-transition), border-color var(--crypto-transition), transform var(--crypto-transition);
}
.related-links__item:hover {
    background: var(--crypto-charcoal);
    color: #fff;
    border-color: var(--crypto-charcoal);
    transform: translateY(-2px);
}

.cta {
    background: var(--crypto-charcoal);
    color: #fff;
    border-radius: var(--crypto-radius);
    padding: 40px;
    text-align: center;
}
.cta .section-title, .cta .section-lead { color: #fff; margin-left: auto; margin-right: auto; }
.cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta .btn--secondary { border-color: rgba(255,255,255,0.3); color: #fff; }
.cta .btn--secondary:hover { border-color: #fff; }

/* =====================================================================
   404
   ===================================================================== */
.error404__wrapper { padding: 100px 0; }
.error404__inner { text-align: center; }
.error404__code {
    font-size: clamp(80px, 14vw, 160px);
    font-weight: 800;
    color: var(--crypto-charcoal);
    line-height: 1;
}
.error404__title { font-size: 28px; font-weight: 700; margin: 12px 0; }
.error404__text { color: var(--crypto-text-muted); margin-bottom: 24px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
    background: var(--crypto-charcoal);
    color: var(--crypto-ash);
    margin-top: 40px;
}
.footer__inner {
    display: grid;
    grid-template-columns: 1.6fr repeat(5, 1fr);
    gap: 28px;
    padding: 56px 0 32px;
}
.footer__logo { font-weight: 800; font-size: 18px; color: #fff; margin-bottom: 10px; }
.footer__desc { color: var(--crypto-stone); font-size: 14px; }
.footer__title { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.footer__menu { display: flex; flex-direction: column; gap: 10px; }
.footer__link {
    color: var(--crypto-ash);
    font-size: 14px;
    transition: color var(--crypto-transition);
}
.footer__link:hover { color: #fff; }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
}
.footer__copyright { color: var(--crypto-stone); font-size: 13px; margin: 0; }

/* =====================================================================
   SCROLL-REVEAL & PARALLAX ANИМАЦИИ
   ===================================================================== */
.reveal {
    opacity: 1;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

[data-parallax] { will-change: transform; }

/* =====================================================================
   RESPONSIVE — 768px
   ===================================================================== */
@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 76px;
        left: 0; right: 0;
        bottom: 0;
        background: var(--crypto-bg);
        display: block;
        max-height: 0;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }
    .header__nav.is-open {
        max-height: calc(100vh - 76px);
        opacity: 1;
        visibility: visible;
    }
    .header__menu { flex-direction: column; align-items: stretch; padding: 16px 24px; gap: 2px; }
    .header__link { padding: 14px 8px; }
    .header__submenu {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        box-shadow: none;
        border: none;
        padding-left: 12px;
        display: none;
    }
    .header__item--has-children.is-open .header__submenu { display: block; }
    .header__burger { display: flex; }

    .hero__inner { grid-template-columns: 1fr; }
    .hero__widget { justify-content: center; }

    .footer__inner { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   RESPONSIVE — 480px
   ===================================================================== */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    section { padding: calc(var(--crypto-section-y) * 0.75) 0; }
    .hero { padding: 36px 0; }
    .cards, .steps, .reviews { grid-template-columns: 1fr; }
    .compare-table__wrapper, .rate-table__wrapper { font-size: 13px; }
    .footer__inner { grid-template-columns: 1fr; padding: 40px 0 24px; }
    .cta { padding: 28px 20px; }
}
