:root {
    --forest-950: #0b120e;
    --forest-900: #111a14;
    --forest-800: #1a2a20;
    --forest-700: #254332;
    --ember: #e56422;
    --ember-light: #ff9b54;
    --paper: #f5f0e7;
    --paper-strong: #fffdf8;
    --ink: #172018;
    --muted: #667066;
    --line: rgba(23, 32, 24, .13);
    --radius-lg: 28px;
    --radius-md: 18px;
    --shadow: 0 24px 70px rgba(14, 24, 17, .12);
}

html {
    scroll-behavior: smooth;
}

body.legal-page {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(19, 42, 28, .035) 1px, transparent 1px),
        linear-gradient(rgba(19, 42, 28, .035) 1px, transparent 1px),
        var(--paper);
    background-size: 38px 38px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
}

.legal-page .pp-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(38px, 7vw, 86px) 24px clamp(68px, 10vw, 128px);
    text-align: left;
    color: #fff;
    background:
        radial-gradient(circle at 82% 30%, rgba(229, 100, 34, .25), transparent 24%),
        linear-gradient(125deg, var(--forest-950), var(--forest-800) 72%, #263b2d);
}

.legal-page .pp-header::before {
    content: "IVKOVIĆ";
    position: absolute;
    z-index: -1;
    right: -1vw;
    bottom: -0.34em;
    color: rgba(255, 255, 255, .035);
    font-size: clamp(6rem, 19vw, 18rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.08em;
    pointer-events: none;
}

.legal-page .pp-header::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -42px;
    width: min(1100px, 88vw);
    height: 84px;
    border-radius: 50%;
    background: var(--paper);
    transform: translateX(-50%);
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto clamp(36px, 6vw, 72px);
    color: #fff !important;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-decoration: none !important;
    text-transform: uppercase;
}

.legal-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px 5px 14px 5px;
    color: var(--ember-light);
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .025);
    font-size: .84rem;
    letter-spacing: 0;
}

.legal-page .pp-header h1,
.legal-page .pp-header p,
.legal-page .pp-header .legal-brand {
    width: min(880px, 100%);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.legal-page .pp-header h1 {
    margin-top: 0;
    color: #fff;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    font-weight: 850;
    line-height: .98;
    letter-spacing: -.055em;
    text-shadow: none;
}

.legal-page .pp-header p {
    margin-top: 20px;
    color: rgba(255, 255, 255, .7);
    font-size: clamp(.98rem, 1.6vw, 1.14rem);
    letter-spacing: .01em;
}

.legal-page .container {
    position: relative;
    z-index: 1;
    width: min(880px, calc(100% - 32px));
    max-width: none;
    margin: -38px auto 0;
    padding: 0 0 70px;
}

.legal-page .section {
    position: relative;
    overflow: hidden;
    margin: 0 0 14px;
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 253, 248, .92);
    box-shadow: 0 8px 30px rgba(14, 24, 17, .055);
    backdrop-filter: blur(10px);
}

.legal-page .section:first-child {
    border-top: 4px solid var(--ember);
    box-shadow: var(--shadow);
}

.legal-page .section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(var(--ember), transparent 82%);
    opacity: .28;
}

.legal-page .section h2 {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: var(--forest-800);
    font-size: clamp(1.16rem, 2.2vw, 1.48rem);
    font-weight: 800;
    letter-spacing: -.025em;
}

.legal-page .section h2::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 12px;
    border-radius: 50%;
    background: var(--ember);
    box-shadow: 0 0 0 6px rgba(229, 100, 34, .1);
    vertical-align: .12em;
}

.legal-page .section p,
.legal-page .section li {
    color: #4d594f;
    font-size: 1rem;
}

.legal-page .section strong {
    color: var(--forest-900);
}

.legal-page .section ul {
    margin: 12px 0 0 22px;
}

.legal-page a:not(.back-btn):not(.legal-brand) {
    color: #a54013;
    text-underline-offset: 3px;
}

.legal-page .updated {
    margin: 28px 0 8px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-align: left;
    text-transform: uppercase;
}

.legal-page .back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 16px;
    padding: 0 22px;
    border: 1px solid var(--forest-900);
    border-radius: 999px;
    color: #fff;
    background: var(--forest-900);
    box-shadow: 0 12px 25px rgba(14, 24, 17, .15);
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}

.legal-page .back-btn:hover,
.legal-page .back-btn:focus-visible {
    color: #fff;
    background: var(--forest-700);
    opacity: 1;
    transform: translateY(-2px);
}

.legal-credit {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px 0 34px;
    border-top: 1px solid rgba(23, 32, 24, .12);
    color: #778078;
    font-size: .75rem;
    letter-spacing: .04em;
    text-align: center;
}

body.error-page {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100svh;
    padding: 34px 20px 72px;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 72% 28%, rgba(229, 100, 34, .2), transparent 19%),
        radial-gradient(circle at 15% 80%, rgba(63, 112, 76, .24), transparent 28%),
        linear-gradient(125deg, #090f0b, #142019 60%, #1c2d22);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.error-page::before,
.error-page::after {
    content: "";
    position: fixed;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    pointer-events: none;
}

.error-page::before {
    width: min(72vw, 820px);
    aspect-ratio: 1;
    transform: rotate(-12deg) scaleY(.48);
}

.error-page::after {
    width: min(48vw, 540px);
    aspect-ratio: 1;
    border-color: rgba(229, 100, 34, .24);
    transform: rotate(19deg) scaleY(.48);
}

.error-page .particles {
    opacity: .28;
}

.error-page .particle {
    background: var(--ember-light);
}

.error-page .container {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    max-width: none;
    padding: clamp(30px, 6vw, 68px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-lg);
    background: rgba(10, 18, 13, .7);
    box-shadow: 0 38px 100px rgba(0, 0, 0, .38);
    backdrop-filter: blur(18px);
}

.error-page .legal-brand {
    justify-content: center;
    margin-bottom: clamp(24px, 4vw, 44px);
}

.error-page .error-code {
    margin: 0;
    color: transparent;
    background: linear-gradient(135deg, #fff 12%, var(--ember-light) 55%, var(--ember) 82%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: clamp(6.4rem, 24vw, 12.5rem);
    font-weight: 900;
    line-height: .72;
    letter-spacing: -.095em;
    text-shadow: none;
    -webkit-text-fill-color: transparent;
}

.error-page .error-title {
    margin-top: clamp(34px, 6vw, 58px);
    color: #fff;
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.error-page .error-message {
    max-width: 560px;
    margin: 18px auto 0;
    color: rgba(255, 255, 255, .66);
    font-size: clamp(.96rem, 2vw, 1.08rem);
    line-height: 1.7;
}

.error-page .actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.error-page .btn {
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: 0 22px;
    font-size: .88rem;
    font-weight: 800;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.error-page .btn-primary {
    color: #17120d;
    background: var(--ember-light);
    box-shadow: 0 12px 32px rgba(229, 100, 34, .2);
}

.error-page .btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.error-page .btn:hover,
.error-page .btn:focus-visible {
    border-color: var(--ember-light);
    transform: translateY(-2px);
}

.error-page .footer {
    position: fixed;
    z-index: 3;
    bottom: 18px;
    left: 20px;
    right: 20px;
    color: rgba(255, 255, 255, .4);
    font-size: .72rem;
    letter-spacing: .05em;
    text-align: center;
}

.error-page .footer a {
    color: rgba(255, 255, 255, .68);
}

:focus-visible {
    outline: 3px solid var(--ember-light);
    outline-offset: 4px;
}

@media (max-width: 620px) {
    .legal-page .pp-header {
        padding-inline: 18px;
    }

    .legal-page .container,
    .legal-credit {
        width: min(100% - 24px, 880px);
    }

    .legal-page .section {
        padding: 23px 20px;
    }

    .legal-page .section p,
    .legal-page .section li {
        font-size: .93rem;
    }

    body.error-page {
        padding-inline: 12px;
    }

    .error-page .container {
        padding: 34px 20px;
        border-radius: 22px;
    }

    .error-page .actions {
        flex-direction: column;
    }

    .error-page .btn {
        width: 100%;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
