/* Gates of Olympus Hub - main.css
   Mythological Gold design system. Night Olympus (deep indigo/navy)
   + warm gold accents + marble-white text. Serif heading + modern sans body.
   Строгие радиусы, драматичные тени, Greek meander accents.
   Mobile-first без max-width на текстах. */

/* ==========================================================
   CSS CUSTOM PROPERTIES - Mythological Gold palette
   ========================================================== */
:root {
    /* Background - night Olympus (deep indigo/navy gradient base) */
    --bg-base: #0D1326;            /* nocturnal sky */
    --bg-surface: #141B33;         /* card surface */
    --bg-elevated: #1B2442;        /* raised card */
    --bg-pressed: #0A0F1F;
    --bg-glass: rgba(27, 36, 66, 0.78);
    --bg-marble: #F5E6C8;          /* white-marble tone */

    /* Text - warm marble on dark background */
    --text: #F5E6C8;               /* warm off-white */
    --text-muted: #B8A888;         /* aged marble */
    --text-dim: #7F7158;
    --text-on-accent: #0D1326;     /* dark on gold */
    --text-on-light-accent: #0D1326;

    /* Accents - Olympian gold / lightning / laurel */
    --accent: #D4A14A;             /* main gold */
    --accent-light: #E9B94A;       /* bright gold */
    --accent-dark: #8B5A0F;        /* deep aged gold */
    --accent-bg: rgba(212, 161, 74, 0.08);

    --accent-bolt: #FFD460;        /* lightning yellow (Zeus bolt) */
    --accent-bolt-light: #FFF4B2;
    --accent-wine: #8B3A3A;        /* Dionysus wine */
    --accent-sky: #5C7FAE;         /* sky between clouds */
    --accent-laurel: #8FAF7C;      /* laurel green */
    --accent-marble: #F5E6C8;

    --success: #8FAF7C;            /* laurel / victory green */
    --success-light: #B5CBA4;
    --danger: #B04B3D;             /* terracotta amphora */
    --danger-light: #D48575;

    /* Borders - subtle gold on dark */
    --border: rgba(212, 161, 74, 0.18);
    --border-hover: rgba(212, 161, 74, 0.42);

    /* Typography - serif heading + modern sans body */
    --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;

    /* Radii - более сдержанные (архитектурные), без claymorphism */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;

    /* Layout */
    --header-h: 72px;
    --container-max: 1320px;
    --container-pad: 20px;

    /* Transitions */
    --transition: 240ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 520ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Generic shadow alias */
    --shadow:
        0 1px 0 rgba(212, 161, 74, 0.12) inset,
        0 10px 30px rgba(0, 0, 0, 0.38),
        0 2px 4px rgba(0, 0, 0, 0.45);

    /* Shadow System - dramatic lightning-golden glow on dark backdrop */
    --shadow-clay-sm:
        0 1px 0 rgba(212, 161, 74, 0.10) inset,
        0 4px 10px rgba(0, 0, 0, 0.38),
        0 1px 2px rgba(0, 0, 0, 0.40);

    --shadow-clay-card:
        0 1px 0 rgba(212, 161, 74, 0.12) inset,
        0 16px 36px rgba(0, 0, 0, 0.45),
        0 4px 8px rgba(0, 0, 0, 0.35);

    --shadow-clay-card-hover:
        0 1px 0 rgba(212, 161, 74, 0.22) inset,
        0 0 0 1px rgba(212, 161, 74, 0.22),
        0 22px 44px rgba(0, 0, 0, 0.52),
        0 6px 14px rgba(0, 0, 0, 0.40),
        0 0 30px rgba(212, 161, 74, 0.14);

    --shadow-clay-button:
        0 1px 0 rgba(255, 244, 178, 0.45) inset,
        0 -1px 0 rgba(139, 90, 15, 0.30) inset,
        0 8px 20px rgba(139, 90, 15, 0.45),
        0 2px 4px rgba(0, 0, 0, 0.40);

    --shadow-clay-button-hover:
        0 1px 0 rgba(255, 244, 178, 0.55) inset,
        0 -1px 0 rgba(139, 90, 15, 0.30) inset,
        0 12px 28px rgba(212, 161, 74, 0.52),
        0 4px 10px rgba(0, 0, 0, 0.40),
        0 0 36px rgba(255, 212, 96, 0.30);

    --shadow-clay-pressed:
        0 2px 6px rgba(0, 0, 0, 0.50) inset,
        0 -1px 0 rgba(255, 244, 178, 0.18) inset;

    --shadow-clay-deep:
        0 1px 0 rgba(212, 161, 74, 0.14) inset,
        0 30px 60px rgba(0, 0, 0, 0.55),
        0 10px 20px rgba(0, 0, 0, 0.40),
        0 0 0 1px rgba(212, 161, 74, 0.10);

    --shadow-bolt-glow: 0 0 40px rgba(255, 212, 96, 0.32);
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(92, 127, 174, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 161, 74, 0.06) 0%, transparent 55%),
        linear-gradient(180deg, #0D1326 0%, #0A0F1F 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: var(--header-h);
    position: relative;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-bolt); }

button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font-family: inherit; color: var(--text); }

ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* Typography - serif headings (classical antiquity feel) */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;              /* serif smaller weight looks heavier */
    line-height: 1.15;
    color: var(--text);
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }

p { margin-bottom: 14px; }
strong { font-weight: 700; color: var(--text); }
em { color: var(--accent-light); font-style: italic; }

/* Prose links - golden thread */
p a, li a {
    color: var(--accent-light);
    border-bottom: 1px solid rgba(212, 161, 74, 0.38);
    transition: color var(--transition), border-color var(--transition);
}
p a:hover, li a:hover {
    color: var(--accent-bolt);
    border-bottom-color: var(--accent-bolt);
}

/* ==========================================================
   LAYOUT UTILITIES
   Правило проекта: никаких max-width на параграфах и заголовках.
   max-width только у .container и специальных блоков.
   ========================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    width: 100%;
}

.section { padding: 72px 0; position: relative; }
.section--tight { padding: 32px 0; }

.section-head { margin-bottom: 40px; }
.section-head__title { margin-bottom: 14px; }
.section-head__subtitle {
    font-size: 1.06rem;
    color: var(--text-muted);
    line-height: 1.7;
    /* no max-width — заголовочный абзац на всю ширину контейнера */
}
.section-head__prose {
    margin: 20px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
    /* no max-width */
}
.section-head__prose p { margin-bottom: 16px; }
.section-head__prose a { color: var(--accent-light); font-weight: 500; }

.section-foot { margin-top: 40px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 999;
    background: var(--accent);
    color: var(--text-on-accent);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 700;
}
.skip-link:focus { left: 8px; }

.text-accent { color: var(--accent-light); }
.text-muted { color: var(--text-muted); }

/* ==========================================================
   OLYMPUS CLOUDS (ambient background)
   Заменяет clay-blobs из SR. Тёмно-золотые туманности вместо candy-облаков.
   ========================================================== */
.olymp-clouds {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.olymp-cloud {
    position: absolute;
    width: 60vh;
    height: 60vh;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
}
.olymp-cloud--1 { background: rgba(212, 161, 74, 0.42); top: -12%; left: -8%; animation: olymp-drift 22s ease-in-out infinite; }
.olymp-cloud--2 { background: rgba(92, 127, 174, 0.42); top: 25%; right: -14%; animation: olymp-drift 28s ease-in-out infinite reverse; }
.olymp-cloud--3 { background: rgba(255, 212, 96, 0.22); bottom: -10%; left: 35%; animation: olymp-drift 34s ease-in-out infinite; }

@keyframes olymp-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(18px, -24px) scale(1.06); }
    66% { transform: translate(-14px, 18px) scale(0.96); }
}

/* Legacy aliases — чтобы старые шаблоны с .clay-blobs не ломались */
.clay-blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.clay-blob { position: absolute; width: 60vh; height: 60vh; border-radius: 50%; filter: blur(90px); opacity: 0.25; }
.clay-blob--1 { background: rgba(212, 161, 74, 0.42); top: -12%; left: -8%; animation: olymp-drift 22s ease-in-out infinite; }
.clay-blob--2 { background: rgba(92, 127, 174, 0.42); top: 25%; right: -14%; animation: olymp-drift 28s ease-in-out infinite reverse; }
.clay-blob--3 { background: rgba(255, 212, 96, 0.22); bottom: -10%; left: 35%; animation: olymp-drift 34s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .olymp-cloud, .clay-blob { animation: none; }
}

/* ==========================================================
   BUTTONS - чуть более архитектурные, меньше радиус, золотое свечение
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    min-height: 48px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn--sm { padding: 9px 18px; min-height: 40px; font-size: 0.88rem; }
.btn--lg { padding: 16px 32px; min-height: 56px; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn--primary {
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-dark) 100%);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-clay-button);
    border-color: rgba(139, 90, 15, 0.55);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-button-hover);
    color: var(--text-on-accent);
}
.btn--primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-clay-pressed);
}

.btn--ghost {
    background: var(--bg-surface);
    color: var(--accent-light);
    box-shadow: var(--shadow-clay-sm);
    border-color: var(--border);
}
.btn--ghost:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-card);
    color: var(--accent-bolt);
    border-color: var(--border-hover);
}

.btn--secondary {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: var(--shadow-clay-sm);
    border-color: var(--border);
}
.btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-clay-card);
    color: var(--accent-light);
    border-color: var(--border-hover);
}

/* Focus */
*:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

::selection { background: var(--accent); color: var(--text-on-accent); }

/* ==========================================================
   BREADCRUMBS
   ========================================================== */
.crumbs {
    padding: 18px 0 4px;
    font-size: 0.9rem;
}
.crumbs__link { color: var(--text-muted); border-bottom: 0; }
.crumbs__link:hover { color: var(--accent-light); }
.crumbs__sep { color: var(--text-dim); margin: 0 8px; }
.crumbs__current { color: var(--text); font-weight: 500; }

/* ==========================================================
   SCROLLBARS - gold on dark
   ========================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-pressed); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

/* ==========================================================
   GATES-SPECIFIC ACCENT: Greek Meander decorative border
   Используется как разделитель секций / акцент под H2.
   ========================================================== */
.meander-divider {
    display: block;
    width: 120px;
    height: 16px;
    margin: 16px 0 24px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'><path d='M0 8 H14 V2 H26 V14 H38 V2 H50 V14 H62 V2 H74 V14 H86 V2 H98 V14 H110 V8 H120' stroke='%23D4A14A' stroke-width='1.4' fill='none' stroke-linejoin='miter'/></svg>");
    background-repeat: no-repeat;
    background-position: left center;
    opacity: 0.72;
}
.meander-divider--center { margin-left: auto; margin-right: auto; background-position: center; }

/* Lightning-bolt accent (тонкая молния для декора) */
.bolt-accent {
    display: inline-block;
    color: var(--accent-bolt);
    filter: drop-shadow(var(--shadow-bolt-glow));
}

/* Card with gold frame — универсальная Gates-карточка */
.golden-frame {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-clay-card);
}
.golden-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(212, 161, 74, 0.14) 0%, transparent 40%);
    pointer-events: none;
}
