:root {
    --orange: #e65100;
    --orange-dark: #b84000;
    --ink: #27211d;
    --muted: #6f6761;
    --paper: #fffdf9;
    --cream: #faf5ee;
    --line: #ddd3c9;
    --soft-orange: #fff0e6;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Manrope", sans-serif;
    line-height: 1.7;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--orange);
}

.header-inner,
.footer-inner,
.legal-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand {
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 500;
    letter-spacing: 0.035em;
    text-decoration: none;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.back-home:hover,
.back-home:focus-visible {
    color: var(--orange);
    background: #fff;
    transform: translateY(-1px);
    outline: none;
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 78px;
    color: #fff;
    background: var(--orange);
}

.legal-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -170px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    box-shadow: 0 0 0 54px rgba(255, 255, 255, 0.045), 0 0 0 108px rgba(255, 255, 255, 0.035);
}

.legal-kicker {
    margin: 0 0 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.legal-hero h1 {
    max-width: 780px;
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(2.5rem, 7vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.legal-hero p:last-child {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
}

.legal-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 64px;
    padding: 72px 0 96px;
}

.legal-nav {
    position: sticky;
    top: 104px;
    align-self: start;
    padding: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.88);
}

.legal-nav strong {
    display: block;
    margin-bottom: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-nav a {
    display: block;
    padding: 8px 0;
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
    color: var(--orange);
    outline: none;
}

.legal-content {
    min-width: 0;
    padding: clamp(24px, 5vw, 64px);
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 24px 70px rgba(70, 48, 32, 0.08);
}

.legal-content section + section {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--line);
}

.legal-content h2 {
    margin: 0 0 16px;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.2;
}

.legal-content h3 {
    margin: 26px 0 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
}

.legal-content p,
.legal-content li {
    color: #514943;
}

.legal-content ul,
.legal-content ol {
    padding-left: 22px;
}

.legal-content li + li {
    margin-top: 9px;
}

.legal-content a {
    color: var(--orange-dark);
    text-underline-offset: 3px;
}

.legal-note {
    margin: 0 0 36px;
    padding: 20px 22px;
    border-left: 4px solid var(--orange);
    background: var(--soft-orange);
}

.legal-note strong {
    color: var(--ink);
}

.risk-warning {
    padding: 24px;
    color: #fff;
    background: var(--ink);
}

.risk-warning p {
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.site-footer {
    padding: 48px 0;
    color: #fff;
    background: var(--orange);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.footer-brand {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
}

.footer-copy {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 22px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    text-underline-offset: 4px;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links a[aria-current="page"] {
    color: #fff;
}

@media (max-width: 820px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 32px;
    }

    .legal-nav {
        position: static;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner {
        min-height: 64px;
    }

    .brand {
        max-width: 210px;
        line-height: 1.2;
    }

    .back-home {
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    .legal-hero {
        padding: 64px 0 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
