:root {
    --c-bg: #ffffff;
    --c-bg-alt: #f5f7fb;
    --c-text: #0f172a;
    --c-text-muted: #64748b;
    --c-border: #e2e8f0;
    --c-primary: #0f172a;
    --c-primary-hover: #1e293b;
    --c-accent: #2563eb;
    --c-accent-hover: #1d4ed8;
    --c-success: #22a06b;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius: 8px;
    --radius-lg: 12px;
    --max-w: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--c-text); line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 18px; font-weight: 600; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 24px;
}

.brand { display: flex; align-items: center; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 40px; width: auto; }

.nav { display: flex; gap: 28px; }
.nav a {
    color: var(--c-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.nav a:hover { color: var(--c-accent); }

.nav-toggle {
    display: none;
    width: 40px; height: 40px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero {
    padding: 80px 0 64px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid var(--c-border);
}
.hero-lead {
    margin-top: 18px;
    color: var(--c-text-muted);
    font-size: 18px;
    max-width: 720px;
}
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s, border-color 0.15s, color 0.15s;
    font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-hover); color: #fff; }

.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-bg-alt); color: var(--c-primary); }

.btn-outline { background: #fff; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-lead {
    color: var(--c-text-muted);
    margin: 8px 0 32px;
    font-size: 16px;
    max-width: 820px;
}

/* Terms */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.term-item {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--c-border);
}
.term-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-accent);
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 4px;
}
.term-item h3 { margin-bottom: 8px; }
.term-item p { color: var(--c-text-muted); font-size: 14px; }

/* About */
.about-text { max-width: 760px; }
.about-text p { margin-bottom: 14px; color: var(--c-text-muted); }
.about-text strong { color: var(--c-text); }

/* Contacts */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.contact-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.contact-label {
    font-size: 13px;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.contact-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 4px;
    text-decoration: none;
}
.contact-value:hover { color: var(--c-accent); text-decoration: none; }
.contact-value + .contact-value { margin-top: 2px; }
.contact-hint { font-size: 13px; color: var(--c-text-muted); }

/* Footer */
.site-footer {
    background: var(--c-primary);
    color: rgba(255, 255, 255, 0.85);
    padding: 56px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}
.footer-brand { color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 10px; }
.footer-desc { font-size: 14px; color: rgba(255, 255, 255, 0.6); }

.footer-req {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    font-size: 13px;
}
.footer-req dt { color: rgba(255, 255, 255, 0.6); }
.footer-req dd { color: #fff; word-break: break-all; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255, 255, 255, 0.7); }
.footer-links a:hover { color: #fff; }

/* Legal page */
.container-narrow { max-width: 820px; }
.legal { padding: 56px 0 80px; }
.legal h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 8px; }
.legal h2 {
    font-size: 20px;
    margin: 32px 0 12px;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal p { margin-bottom: 14px; color: var(--c-text); font-size: 15px; line-height: 1.7; }
.legal ul { margin: 8px 0 16px 22px; }
.legal li { margin-bottom: 8px; color: var(--c-text); font-size: 15px; line-height: 1.6; }
.legal-meta { color: var(--c-text-muted); font-size: 14px; margin-bottom: 24px; }
.legal-back { margin: 0 0 24px; font-size: 14px; }
.legal-back a { color: var(--c-accent); }
.legal-dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px 20px;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 12px 0 20px;
    font-size: 14px;
}
.legal-dl dt { color: var(--c-text-muted); }
.legal-dl dd { color: var(--c-text); }

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    animation: cookieSlide 0.3s ease-out;
}
@keyframes cookieSlide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    flex-wrap: wrap;
}
.cookie-banner-text {
    font-size: 14px;
    color: var(--c-text);
    flex: 1;
    min-width: 280px;
    line-height: 1.5;
}
.cookie-banner-text a { color: var(--c-accent); }
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.cookie-banner-actions .btn { padding: 10px 18px; font-size: 14px; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav {
        position: absolute;
        top: 68px;
        left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--c-border);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        display: none;
    }
    .nav.is-open { display: flex; }
    .nav a {
        padding: 14px 24px;
        border-top: 1px solid var(--c-border);
        font-size: 15px;
    }
    .nav a:first-child { border-top: 0; }
    .hero { padding: 56px 0 40px; }
    .section { padding: 48px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .legal-dl { grid-template-columns: 1fr; gap: 4px; }
    .legal-dl dt { margin-top: 8px; font-weight: 600; }
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 12px;
    }
    .cookie-banner-text { font-size: 13px; min-width: 0; }
    .cookie-banner-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .cookie-banner-actions .btn { padding: 9px 8px; font-size: 13px; }
}
