/* ============================================================
   Legal pages — Terms / Privacy / Refund
   Scoped to body.legal-page; uses same Givonic + Lato system
   as Iskustva but stripped down for long-form reading.
   ============================================================ */

@font-face {
    font-family: 'Givonic';
    src: url('../css/fonts/givonic/Givonic-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Givonic';
    src: url('../css/fonts/givonic/Givonic-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Givonic';
    src: url('../css/fonts/givonic/Givonic-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.legal-page {
    --lg-bg:          #011415;
    --lg-bg-2:        #062B2E;
    --lg-gold:        #F1DAB0;
    --lg-gold-dim:    rgba(241, 218, 176, 0.45);
    --lg-gold-faint:  rgba(241, 218, 176, 0.12);
    --lg-cyan:        #E2FDFB;
    --lg-text:        #F0F2F4;
    --lg-text-muted:  #C1CDD0;
    --lg-text-dim:    #7B8B8B;
    --lg-border:      rgba(241, 218, 176, 0.16);
    --lg-glass:       rgba(1, 20, 21, 0.82);

    --lg-font-display: 'Givonic', 'Playfair Display', Georgia, serif;
    --lg-font-body:    'Lato', system-ui, sans-serif;

    background: linear-gradient(180deg, #011415 0%, #062B2E 50%, #011415 100%);
    color: var(--lg-text);
    font-family: var(--lg-font-body);
    position: relative;
    overflow-x: hidden;
}

.legal-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: overlay;
}

.legal-page #main-wrapper,
.legal-page .legal-main {
    position: relative;
    z-index: 2;
}

/* ============================================================
   HERO
   ============================================================ */
.legal-hero {
    padding: 96px 0 56px;
    text-align: center;
    border-bottom: 1px solid var(--lg-border);
}
.legal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--lg-cyan);
    margin-bottom: 28px;
}
.legal-hero__eyebrow::before,
.legal-hero__eyebrow::after {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--lg-gold-dim);
}
.legal-hero__title {
    font-family: var(--lg-font-display);
    font-weight: 700;
    font-size: clamp(40px, 7vw, 96px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--lg-text);
    margin: 0 0 24px;
}
.legal-hero__title em {
    font-style: italic;
    color: var(--lg-gold);
    font-weight: 400;
}
.legal-hero__updated {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lg-text-dim);
}
.legal-hero__updated strong {
    color: var(--lg-gold);
    font-weight: 700;
}

/* ============================================================
   LAYOUT: TOC sidebar + body
   ============================================================ */
.legal-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 72px;
    padding: 72px 0 120px;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 56px;
    padding: 28px 0;
    border-top: 1px solid var(--lg-border);
    border-bottom: 1px solid var(--lg-border);
}
.legal-toc__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--lg-gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.legal-toc__label::before { content: '★'; font-size: 13px; }
.legal-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.legal-toc__list a {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--lg-text-muted);
    text-decoration: none;
    border-left: 1px solid transparent;
    padding-left: 14px;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.legal-toc__list a:hover {
    color: var(--lg-text);
    border-left-color: var(--lg-gold-dim);
}
.legal-toc__list a.is-active {
    color: var(--lg-gold);
    border-left-color: var(--lg-gold);
}
.legal-toc__num {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--lg-gold-dim);
}
.legal-toc__list a.is-active .legal-toc__num { color: var(--lg-gold); }

/* ============================================================
   BODY
   ============================================================ */
.legal-body {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--lg-text);
    font-family: var(--lg-font-body);
}
.legal-body__intro {
    font-size: 19px;
    line-height: 1.7;
    color: var(--lg-text-muted);
    border-left: 2px solid var(--lg-gold);
    padding: 4px 0 4px 28px;
    margin-bottom: 64px;
    max-width: 640px;
}
.legal-body__intro p:last-child { margin-bottom: 0; }

.legal-section {
    padding-top: 40px;
    margin-bottom: 56px;
    border-top: 1px solid var(--lg-border);
}
.legal-section:first-of-type { border-top: 0; padding-top: 0; }
.legal-section__num {
    display: inline-block;
    font-family: var(--lg-font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--lg-gold);
    margin-bottom: 14px;
}
.legal-section__title {
    font-family: var(--lg-font-display);
    font-weight: 600;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--lg-text);
    margin: 0 0 28px;
}
.legal-body p {
    margin: 0 0 1.3em;
    color: var(--lg-text);
}
.legal-body p:last-child { margin-bottom: 0; }
.legal-body ul,
.legal-body ol {
    padding-left: 0;
    margin: 0 0 1.5em;
    list-style: none;
}
.legal-body li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--lg-text);
}
.legal-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 14px;
    height: 1px;
    background: var(--lg-gold);
}
.legal-body a {
    color: var(--lg-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: color 0.25s ease;
    word-break: break-word;
}
.legal-body a:hover { color: var(--lg-cyan); }
.legal-body strong { color: var(--lg-text); font-weight: 700; }

/* ============================================================
   CONTACT CTA AT BOTTOM
   ============================================================ */
.legal-contact {
    margin-top: 80px;
    padding: 56px clamp(28px, 5vw, 64px);
    border: 1px solid var(--lg-border);
    border-radius: 28px;
    background: linear-gradient(135deg,
        rgba(241, 218, 176, 0.04) 0%,
        rgba(226, 253, 251, 0.02) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.legal-contact::before {
    content: '✦';
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--lg-gold);
    font-size: 18px;
}
.legal-contact__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--lg-cyan);
    margin: 20px 0 18px;
}
.legal-contact__title {
    font-family: var(--lg-font-display);
    font-weight: 600;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--lg-text);
    margin: 0 0 16px;
}
.legal-contact__text {
    color: var(--lg-text-muted);
    font-size: 17px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 28px;
}
.legal-contact__email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border: 1px solid var(--lg-gold);
    border-radius: 999px;
    color: var(--lg-gold);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.3s ease;
}
.legal-contact__email::before { content: '✉'; font-size: 16px; }
.legal-contact__email:hover {
    background: var(--lg-gold);
    color: var(--lg-bg);
}

/* ============================================================
   CROSS-LINKS (between policy pages)
   ============================================================ */
.legal-crosslinks {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: 32px;
    border-top: 1px solid var(--lg-border);
}
.legal-crosslinks a {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--lg-text-dim);
    text-decoration: none;
    transition: color 0.25s ease;
    padding: 6px 4px;
}
.legal-crosslinks a:hover { color: var(--lg-gold); }
.legal-crosslinks a[aria-current="page"] { color: var(--lg-gold); }
.legal-crosslinks span {
    color: var(--lg-text-dim);
    opacity: 0.4;
    user-select: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .legal-hero { padding: 64px 0 40px; }
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 0 80px;
    }
    .legal-toc {
        position: static;
        padding: 24px 24px;
        border-radius: 20px;
        border: 1px solid var(--lg-border);
        background: rgba(255, 255, 255, 0.015);
    }
    .legal-toc__list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
    }
    .legal-toc__list a {
        flex: 0 0 50%;
        padding: 8px 14px;
        font-size: 13px;
        border-left: none;
        border-bottom: 1px solid transparent;
    }
    .legal-toc__list a:hover,
    .legal-toc__list a.is-active { border-left: none; border-bottom-color: var(--lg-gold); }
}

@media (max-width: 575px) {
    .legal-hero { padding: 48px 0 32px; }
    .legal-hero__title { font-size: clamp(36px, 11vw, 56px); }
    .legal-body { font-size: 16px; }
    .legal-body__intro { font-size: 17px; padding-left: 20px; margin-bottom: 48px; }
    .legal-section__title { font-size: 24px; }
    .legal-contact { padding: 40px 24px; border-radius: 20px; }
    .legal-toc__list a { flex: 0 0 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .legal-toc__list a,
    .legal-contact__email { transition: none; }
}
