:root {
    color-scheme: light;
    --ink: #10243b;
    --muted: #5f6d7c;
    --line: rgba(24, 59, 86, .14);
    --line-strong: rgba(24, 59, 86, .22);
    --orange: #ad591f;
    --blue: #155ac8;
    --paper: #fbfcfe;
    --content: 78rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
    margin: 0;
    min-width: 20rem;
    overflow-x: clip;
    color: var(--ink);
    background:
        linear-gradient(180deg, #f8fbfd 0, #fff 48rem, #f5f9fc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
p, h1, h2 { margin: 0; }
p { color: var(--muted); line-height: 1.75; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.skip-link {
    position: fixed;
    z-index: 100;
    top: 1rem;
    left: 1rem;
    transform: translateY(-180%);
    padding: .75rem 1rem;
    border-radius: 999px;
    color: #fff;
    background: var(--ink);
}
.skip-link:focus { transform: none; }

.legal-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 5rem;
    padding: .75rem max(1.25rem, calc((100% - var(--content)) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(251, 252, 254, .82);
    box-shadow: 0 10px 35px rgba(36, 75, 104, .05);
    backdrop-filter: blur(18px) saturate(1.2);
}
.legal-header > * { min-width: 0; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-weight: 850;
    letter-spacing: -.03em;
}
.brand img { width: 3.6rem; height: auto; filter: saturate(.9) contrast(1.05); }
.legal-header nav {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    color: #536b80;
    font-size: .85rem;
    font-weight: 680;
}
.legal-header nav a {
    position: relative;
    padding: .55rem .1rem;
    transition: color .18s ease;
}
.legal-header nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: .22rem;
    left: 0;
    height: 1px;
    transform: scaleX(0);
    background: var(--ink);
    transition: transform .18s ease;
}
.legal-header nav a:hover,
.legal-header nav a[aria-current="page"] { color: var(--ink); }
.legal-header nav a:hover::after,
.legal-header nav a[aria-current="page"]::after { transform: scaleX(1); }

.legal-tools,
.languages { display: flex; align-items: center; }
.legal-tools { gap: .65rem; }
.languages {
    gap: .12rem;
    padding: .22rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .62);
    box-shadow: 0 8px 24px rgba(28, 70, 105, .06);
}
.language-button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    filter: grayscale(.35);
    transition: background .18s ease, filter .18s ease, transform .18s ease;
}
.language-button:hover { transform: translateY(-1px); filter: none; }
.language-button.is-active { background: #fff; box-shadow: 0 3px 12px rgba(31, 72, 102, .12); filter: none; }
.back-to-site {
    padding: .72rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: var(--ink);
    box-shadow: 0 10px 26px rgba(16, 36, 59, .13);
    font-size: .8rem;
    font-weight: 720;
    transition: transform .18s ease, background .18s ease;
}
.back-to-site:hover { transform: translateY(-1px); background: #1b3b5b; }

.legal-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: min(43rem, 72svh);
    overflow: hidden;
    padding: 10rem 1.25rem 5rem;
    background: #f8fbfd url('/static/images/porcelain-poster.jpg') center / cover no-repeat;
}
.legal-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, .26), rgba(255, 255, 255, .55) 46%, #fbfcfe 100%),
        radial-gradient(circle at 68% 28%, rgba(255, 255, 255, .08), rgba(232, 243, 250, .38) 72%);
}
.legal-hero-inner {
    position: relative;
    width: 100%;
    max-width: var(--content);
    min-width: 0;
    margin-inline: auto;
    animation: porcelain-legal-enter .65s both cubic-bezier(.2, .7, .2, 1);
}
.section-label {
    color: var(--orange);
    font-size: .72rem;
    font-weight: 780;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.legal-hero h1 {
    max-width: min(13ch, 100%);
    margin-top: 1rem;
    font-size: clamp(4rem, 8vw, 8rem);
    line-height: .87;
    letter-spacing: -.065em;
}
.legal-hero-inner > p:last-child {
    width: 100%;
    max-width: 38rem;
    margin-top: 1.5rem;
    color: #506377;
    font-size: 1rem;
}
@keyframes porcelain-legal-enter {
    from { opacity: 0; transform: translateY(1.2rem); }
}

.legal-panel {
    width: min(56rem, calc(100% - 2.5rem));
    margin-inline: auto;
    padding: clamp(5rem, 9vw, 9rem) 0;
    counter-reset: legal-section;
}
.legal-panel > .section-label { margin-bottom: 3rem; }
.legal-panel h2 {
    counter-increment: legal-section;
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 1rem;
    margin: 3.5rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -.035em;
}
.legal-panel h2::before {
    content: counter(legal-section, decimal-leading-zero);
    padding-top: .25rem;
    color: #8291a0;
    font-size: .7rem;
    letter-spacing: .12em;
}
.legal-panel p + p { margin-top: 1rem; }
.legal-panel strong { color: var(--ink); }
.legal-panel a {
    color: var(--ink);
    font-weight: 680;
    text-decoration: underline;
    text-decoration-color: rgba(21, 90, 200, .48);
    text-underline-offset: .2em;
    transition: color .18s ease, text-decoration-color .18s ease;
}
.legal-panel a:hover { color: var(--blue); text-decoration-color: var(--blue); }
.legal-panel code {
    padding: .1rem .35rem;
    border: 1px solid var(--line);
    border-radius: .35rem;
    color: #884716;
    background: #f0f5f8;
}
.legal-note {
    margin-bottom: 2rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(173, 89, 31, .25);
    border-radius: 1rem;
    background: rgba(228, 154, 99, .11);
}

.legal-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    width: min(var(--content), calc(100% - 2.5rem));
    margin-inline: auto;
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--line);
    color: #6d7d8d;
    font-size: .78rem;
}
.legal-footer p { color: inherit; }
.legal-footer > a:last-child { justify-self: end; font-weight: 650; }
.legal-footer > a:last-child:hover { color: var(--ink); }

@media (max-width: 720px) {
    .legal-header { grid-template-columns: minmax(0, 1fr) auto; min-height: 4.5rem; padding: .6rem .75rem; }
    .legal-header nav { display: none; }
    .brand { font-size: .92rem; }
    .brand img { width: 2.8rem; }
    .legal-tools { gap: .4rem; }
    .languages { padding: .16rem; }
    .language-button { width: 1.85rem; height: 1.85rem; }
    .back-to-site { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; font-size: 0; }
    .back-to-site [aria-hidden="true"] { font-size: .95rem; }
    .legal-hero { min-height: 34rem; padding: 8rem .75rem 4rem; }
    .legal-hero h1 { font-size: clamp(3.2rem, 14vw, 4.5rem); overflow-wrap: anywhere; }
    .legal-hero-inner > p:last-child { font-size: .94rem; }
    .legal-panel { width: calc(100% - 1.5rem); padding-block: 4.5rem; }
    .legal-panel h2 { grid-template-columns: 2rem minmax(0, 1fr); margin-top: 2.75rem; }
    .legal-footer { grid-template-columns: 1fr; gap: 1rem; width: calc(100% - 1.5rem); }
    .legal-footer > a:last-child { justify-self: start; }
}

@media (max-width: 380px) {
    .legal-header .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
