/* ═══════════════════════════════════════════════════════
   base.css — общие примитивы для rodinateam.ru
   Подключается ПЕРВЫМ на всех страницах.
   Содержит: fonts, reset, variables, nav, buttons,
   section defaults, footer, cookie, accessibility.
   ═══════════════════════════════════════════════════════ */


/* ─── 0. FONTS (self-hosted) ─────────────────────────── */

/* Onest — body font, variable, cyrillic */
@font-face {
    font-family: 'Onest';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/onest-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Onest — body font, variable, latin */
@font-face {
    font-family: 'Onest';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/onest-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Montserrat — heading font (main page), variable, cyrillic */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/montserrat-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Montserrat — heading font (main page), variable, latin */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ─── 1. CSS-ПЕРЕМЕННЫЕ (Design Tokens) ──────────────── */

:root {
    /* Base colors */
    --black:      #0a0a0a;
    --white:      #ffffff;
    --cream:      #faf8f5;
    --warm:       #f5ede4;
    --gold:       #c9a96e;
    --gold-light: #e8d5b0;
    --gold-dark:  #b8934d;
    --text:       #2d2d2d;
    --text-light: #6b6b6b;
    --accent:     #8b6f47;

    /* Spacing (8px base scale) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */

    /* Typography (fluid, Major Third 1.25 ratio) */
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);       /* 13-14px */
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);         /* 16-18px */
    --text-lg: clamp(1.25rem, 1rem + 1.25vw, 1.5rem);           /* 20-24px */
    --text-xl: clamp(1.563rem, 1.1rem + 2vw, 2rem);             /* 25-32px */
    --text-2xl: clamp(1.953rem, 1.2rem + 3vw, 2.75rem);         /* 31-44px */
    --text-3xl: clamp(2.441rem, 1.5rem + 4vw, 3.5rem);          /* 39-56px */

    /* Line heights */
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-normal: 1.6;

    /* Surfaces */
    --radius-sm: 0.25rem;  /* 4px */
    --radius-md: 0.5rem;   /* 8px */
    --radius-lg: 1rem;     /* 16px */
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);

    /* Z-index system */
    --z-base: 1;
    --z-sticky: 100;
    --z-overlay: 200;
    --z-lightbox: 300;
    --z-nav: 400;
    --z-sticky-cta: 900;
    --z-progress: 9999;

    /* Optical sizing */
    font-optical-sizing: auto;

    /* Semantic color aliases */
    --color-bg: var(--white);
    --color-bg-warm: var(--cream);
    --color-text-primary: var(--text);
    --color-text-muted: var(--text-light);
    --color-accent: var(--gold);
    --color-accent-light: var(--gold-light);
    --color-accent-dark: var(--gold-dark);
    --color-surface: var(--warm);
    --color-dark: var(--black);
}


/* ─── 2. CSS RESET ───────────────────────────────────── */

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Onest', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}


/* Nav styles moved to nav.css */

/* Nav mobile moved to nav.css */


/* ─── 4. BUTTONS BASE ────────────────────────────────── */

.cta-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--black);
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-outline {
    display: inline-block;
    padding: 14px 36px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    transition: border-color 0.2s, color 0.2s;
}


/* ─── 5. SECTION DEFAULTS ────────────────────────────── */

section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}

.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 40px);
}

.section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 700;
    color: var(--black);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.about-tags span {
    background: var(--warm, #faf8f5);
    color: var(--accent, #c9a96e);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.section-desc {
    font-size: 16px;
    color: var(--text-light);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 40px;
}


/* ─── 6. FOOTER ──────────────────────────────────────── */

.site-footer {
    background: var(--black);
    color: var(--cream);
    margin-top: 80px;
    font-size: 14px;
}

.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px 32px;
}

.footer-top {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 64px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 13px;
    color: rgba(232, 224, 212, 0.5);
    margin-bottom: 20px;
    line-height: 1.5;
}

.footer-tg-cta {
    display: inline-block;
    border: 1px solid rgba(201, 169, 110, 0.4);
    color: var(--gold);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: rgba(232, 224, 212, 0.4);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(232, 224, 212, 0.35);
    margin-bottom: 16px;
}

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

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: rgba(232, 224, 212, 0.65);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: rgba(232, 224, 212, 0.3);
    flex-wrap: wrap;
}

.footer-legal-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.footer-legal a {
    color: rgba(232, 224, 212, 0.3);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-copy {
    color: rgba(232, 224, 212, 0.3);
}

/* Footer mobile */
@media (max-width: 768px) {
    .site-footer { margin-top: 0; }
    .site-footer .footer-inner { padding: 32px 20px 24px; }
    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 24px;
        padding-bottom: 24px;
    }
    .footer-nav {
        grid-template-columns: 1fr 1fr;
        gap: 20px 16px;
    }
    .footer-col-title { margin-bottom: 10px; }
    .footer-col ul li { margin-bottom: 8px; }
    .footer-legal {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .footer-nav { grid-template-columns: 1fr 1fr; }
}


/* ─── 7. COOKIE BANNER (152-ФЗ compliant) ────────────── */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1100px;
    z-index: 9999;
    background: rgba(26, 26, 26, 0.97);
    border-top: 1px solid rgba(201, 169, 110, 0.2);
    padding: 16px 24px;
}


.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-banner__text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    flex: 1;
}

.cookie-banner__link {
    color: var(--gold, #c9a96e);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cookie-banner__link:hover {
    color: #dbb978;
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-banner__btn {
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-banner__btn--reject {
    background: transparent;
    border: 1px solid var(--gold, #c9a96e);
    color: var(--gold, #c9a96e);
}

.cookie-banner__btn--reject:hover {
    background: rgba(201, 169, 110, 0.1);
}

.cookie-banner__btn--accept {
    background: var(--gold, #c9a96e);
    border: 1px solid var(--gold, #c9a96e);
    color: #1a1a1a;
}

.cookie-banner__btn--accept:hover {
    background: #dbb978;
    border-color: #dbb978;
}

.cookie-banner__btn:focus-visible {
    outline: 2px solid var(--gold, #c9a96e);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .cookie-banner { padding: 14px 16px; }
    .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 14px; }
    .cookie-banner__text { font-size: 13px; text-align: center; }
    .cookie-banner__actions { justify-content: center; gap: 10px; }
    .cookie-banner__btn { font-size: 13px; padding: 10px 20px; flex: 1; max-width: 160px; }
}


/* ─── 8. ACCESSIBILITY ───────────────────────────────── */

/* Skip-link: visually hidden, appears on focus */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    background: var(--black);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Focus-visible: keyboard-only outline for interactive elements */
a:focus-visible,
button:focus-visible,
.cta-btn:focus-visible,
.btn-outline:focus-visible,
.nav-cta:focus-visible,
.hamburger:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default outline on mouse click */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}


/* ─── 9. HOVER (touch-safe) ──────────────────────────── */

@media (hover: hover) {
    .cta-btn:hover { background: var(--gold-dark); }
    .btn-outline:hover { border-color: var(--black); color: var(--black); }
    .footer-col ul a:hover { color: #fff; }
    .footer-social a:hover { color: #c9a96e; }
    .footer-tg-cta:hover { border-color: #c9a96e; color: #dbb978; }
    .footer-legal a:hover { color: rgba(232, 224, 212, 0.65); }
}


/* ─── 10. PREFERS-REDUCED-MOTION ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .hamburger span,
    .nav-links a,
    .cta-btn,
    .btn-outline,
    .site-footer a {
        transition: none !important;
    }
}
