/* ===== Fonts (font-display: optional — без сдвига макета при подмене шрифта, по рекомендациям Google CLS) ===== */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src: url('../fonts/Roboto-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-display: optional;
    src: url('../fonts/Roboto-Medium.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: optional;
    src: url('../fonts/Roboto-Bold.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 900;
    font-display: optional;
    src: url('../fonts/Roboto-Black.ttf') format('truetype');
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0a0f;
    color: #e0e0e8;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 0;
}
main {
    min-height: 100vh;
    display: block;
    position: relative;
}

/* ===== Variables ===== */
:root {
    --bg: #0a0a0f;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --neon-violet: #a855f7;
    --neon-cyan: #22d3ee;
    --neon-pink: #ec4899;
    --accent: var(--neon-violet);
    --text: #e0e0e8;
    --text-muted: #8888a0;
    --radius: 12px;
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.3);
    /* Переменные для анимации битов и плеера (переопределяются JS/PHP) */
    --beat-height: 30px;
    --beat-delay: 0s;
    --beat-i: 0;
    --now-playing-offset: 0px;
}

/* ===== Shimmer / card shine ===== */
.card-shine {
    position: relative;
    overflow: hidden;
}
.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transform: translateX(-100%) skewX(-15deg);
    animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(100%) skewX(-15deg); }
}
/* В модалке псевдоэлемент не должен раздувать высоту прокрутки (200% давало огромный scroll) */
.modal-content.card-shine::after {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Sections ===== */
.section {
    padding: 4rem 0;
}
.section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0 0 1.5rem;
    text-align: center;
    color: #fff;
}
.section-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    margin: 0 0 0.35rem;
    text-align: center;
    color: #fff;
}
.section-desc {
    text-align: center;
    color: var(--text-muted);
    margin: -0.5rem auto 2rem;
    max-width: 560px;
}

/* ===== Page hero (inner pages) ===== */
.page-hero {
    padding: 5rem 0 2rem;
    text-align: center;
}
.page-hero .container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.page-hero h1 {
    margin: 0 auto 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: #fff;
    text-align: center !important;
    max-width: 100%;
    width: 100%;
}
.page-hero .section-desc {
    margin: 0 auto;
    text-align: center !important;
    max-width: 560px;
}
.animate-in { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.section.visible { opacity: 1; transform: translateY(0); }

/* ===== Block dividers ===== */
.block-divider {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.block-divider::before {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-violet), transparent);
    border-radius: 2px;
    opacity: 0.7;
}
.block-divider-alt {
    height: 3rem;
}
.block-divider-alt::before {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-violet), var(--neon-pink), var(--neon-cyan));
    opacity: 0.6;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); opacity: 0.95; }
.btn-primary {
    background: linear-gradient(135deg, var(--neon-violet), var(--neon-pink));
    color: #fff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(168, 85, 247, 0.5); }
.btn-secondary {
    background: var(--surface);
    color: var(--neon-cyan);
    border: 1px solid rgba(34, 211, 238, 0.4);
}
.btn-secondary:hover { box-shadow: 0 0 20px rgba(34, 211, 238, 0.25); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-shine {
    position: relative;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.35);
}
.btn-shine:hover {
    box-shadow: 0 0 32px rgba(168, 85, 247, 0.5);
}
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* ===== Forms ===== */
.order-form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.order-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
}
.order-form input,
.order-form select,
.order-form textarea {
    padding: 0.65rem 0.85rem;
    background: #1a1a24;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #e8e8f0;
    font-family: inherit;
    font-size: 1rem;
}
.order-form select option {
    background: #1a1a24;
    color: #e8e8f0;
}
.order-form input::placeholder,
.order-form select:invalid {
    color: #8888a0;
}
.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
    outline: none;
    border-color: var(--neon-violet);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}
.order-form textarea { resize: vertical; min-height: 80px; }
.order-form textarea.story-field {
    max-height: 120px;
    resize: vertical;
}
.form-label-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.form-success {
    color: #4ade80;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 8px;
}
.form-error {
    color: #f87171;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 8px;
}
.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.form-message {
    font-size: 0.9rem;
    margin: 0;
}
.form-message.error { color: #f87171; }
.form-message.success { color: #4ade80; }
.modal .order-form .form-message:empty {
    display: none;
}

/* ===== Modal (contain: strict — не участвует в расчёте макета до открытия, снижает CLS) ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    contain: strict;
}
.modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}
.modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    min-height: 200px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(168, 85, 247, 0.15);
    transform: translateZ(0);
    contain: layout style;
}
.modal-content .modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}
.modal-content .order-form {
    flex: none;
    min-height: 0;
}
.modal-content .order-form > *:last-child {
    margin-bottom: 0;
}
.modal .order-form label {
    margin-bottom: 0;
    gap: 0.2rem;
}
.modal .order-form label + label { margin-top: 0.5rem; }
.modal .order-form .btn { margin-top: 0.5rem; margin-bottom: 0; }
.modal .order-form input,
.modal .order-form select,
.modal .order-form textarea {
    padding: 0.5rem 0.7rem;
    font-size: 0.95rem;
}
.modal .order-form textarea.story-field {
    min-height: 78px;
    max-height: 120px;
}
.modal .order-form .usdt-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 0.25rem;
}
.modal .order-form .form-policy-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
    line-height: 1.35;
}
.modal .order-form .form-policy-note a {
    color: var(--neon-cyan);
    text-decoration: none;
}
.modal .order-form .form-policy-note a:hover { text-decoration: underline; }
.modal .order-form .label-amount { align-items: flex-start; }
.thank-you-content {
    margin: 1rem 0;
    text-align: center;
}
.thank-you-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
}
.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.modal-close:hover {
    color: #fff;
    background: var(--surface);
}
.modal-title {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    text-align: center;
    color: #fff;
}

/* ===== Ticker / marquee ===== */
.ticker-wrap {
    overflow: hidden;
    padding: 0.75rem 0;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.ticker {
    display: flex;
    width: max-content;
    animation: ticker-scroll 60s linear infinite;
}
.ticker:hover {
    animation-play-state: paused;
}
.ticker-item {
    white-space: nowrap;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.ticker-item span {
    color: var(--text-muted);
    margin-right: 0.5rem;
}
.ticker-item .ticker-icon {
    color: var(--neon-cyan);
    display: inline-block;
}
@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== FAB Buttons (Share & Back to Top) ===== */
.share-site-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 100;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    background: rgba(10, 10, 12, 0.92);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.share-site-fab:hover {
    background: rgba(34, 211, 238, 0.12);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
    transform: scale(1.05);
}
.share-site-fab:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.5);
}
.share-site-fab.copied {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.4);
}
.share-site-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-site-fab-icon svg {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
}
.back-to-top-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 5rem;
    z-index: 100;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    background: rgba(10, 10, 12, 0.92);
    color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}
.back-to-top-fab.visible {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top-fab:hover {
    background: rgba(34, 211, 238, 0.12);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
    transform: scale(1.05);
}
.back-to-top-fab:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.5);
}
.back-to-top-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top-fab-icon svg {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
}

/* ===== Common Components ===== */
.seo-content {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto;
}
.seo-content p {
    margin: 0 0 1rem;
}
.seo-content p:last-child {
    margin-bottom: 0;
}
.seo-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 2rem auto 0;
    line-height: 1.7;
}
.cta {
    text-align: center;
    padding: 4rem 0;
}
.cta h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.cta .btn + .btn {
    margin-left: 0.75rem;
}
.order-message-banner {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.order-message-banner .form-success,
.order-message-banner .form-error {
    margin-bottom: 0;
}
.order-intro {
    text-align: center;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
}
