/*
|--------------------------------------------------------------------------
| Word Intelligence legal pages
|--------------------------------------------------------------------------
*/

:root {
    color-scheme: light;
    
    --wi-legal-bg: #ffffff;
    --wi-legal-surface: #f3f3f3;
    --wi-legal-surface-soft: #dffadf;
    --wi-legal-text: #121512;
    --wi-legal-muted: #667067;
    --wi-legal-line: #e0e0e0;
    --wi-legal-green: #347444;
    --wi-legal-green-soft: #dffadf;
    --wi-legal-amber: #ffb534;
    --wi-legal-header: rgba(246, 247, 243, 0.88);
    --wi-legal-shadow: 0 18px 55px rgba(28, 48, 31, 0.08);
}

html[data-wi-legal-theme="dark"] {
    color-scheme: dark;

    --wi-legal-bg: #111111;
    --wi-legal-surface: #1f1f1f;
    --wi-legal-surface-soft: #1d241b;
    --wi-legal-text: #f1f3ee;
    --wi-legal-muted: #a2aaa3;
    --wi-legal-line: #313131;
    --wi-legal-green: #9ad28e;
    --wi-legal-green-soft: #223321;
    --wi-legal-header: rgba(16, 18, 16, 0.88);
    --wi-legal-shadow: 0 22px 62px rgba(0, 0, 0, 0.32);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--wi-legal-text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.7;
}

a {
    color: inherit;
}

button,
a {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.wi-legal-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;

    padding: 10px 14px;

    border-radius: 8px;

    background: var(--wi-legal-amber);
    color: #151515;

    font-weight: 700;
    text-decoration: none;

    transform: translateY(-150%);
}

.wi-legal-skip-link:focus {
    transform: translateY(0);
}

/* Header */

.wi-legal-header__inner {
    display: grid;
    width: min(1440px, 100%);
    min-height: 84px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;

    margin: 0 auto;
    padding: 14px clamp(20px, 5vw, 72px);
}

.wi-legal-brand {
    display: inline-flex;
    width: fit-content;
    min-width: 0;
    align-items: center;
    gap: 12px;

    text-decoration: none;
}

.wi-legal-brand__mark {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    place-items: center;

    border-radius: 50%;

    background: var(--wi-legal-green-soft);
}

.wi-legal-brand__mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.wi-legal-brand__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.wi-legal-brand__copy strong {
    font-family: "PT Serif", Georgia, serif;
    font-size: 1.08rem;
    line-height: 1.2;
}

.wi-legal-brand__copy small {
    color: var(--wi-legal-muted);

    font-size: 0.66rem;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.wi-legal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.5vw, 36px);
}

.wi-legal-nav a {
    position: relative;

    color: var(--wi-legal-text);

    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.wi-legal-nav a::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;

    height: 2px;

    background: var(--wi-legal-amber);

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 160ms ease;
}

.wi-legal-nav a:hover::after,
.wi-legal-nav a:focus-visible::after {
    transform: scaleX(1);
}

.wi-legal-theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;

    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    justify-self: end;

    padding: 0;

    border: 1px solid var(--wi-legal-line);
    border-radius: 50%;

    background: var(--wi-legal-surface);
    color: var(--wi-legal-text);

    cursor: pointer;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.wi-legal-theme-toggle span {
    grid-area: 1 / 1;

    font-size: 1.1rem;
    line-height: 1;

    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.wi-legal-theme-toggle__moon,
html[data-wi-legal-theme="dark"]
.wi-legal-theme-toggle__sun {
    opacity: 0;
    transform: scale(0.65) rotate(-25deg);
}

html[data-wi-legal-theme="dark"]
.wi-legal-theme-toggle__moon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

/* Main */

.wi-legal-main {
    width: min(1440px, 100%);

    margin: 0 auto;
    padding:
        clamp(54px, 7vw, 104px)
        clamp(20px, 5vw, 72px)
        clamp(72px, 9vw, 130px);
}

.wi-legal-hero {
    max-width: 980px;
    margin-bottom: clamp(48px, 7vw, 86px);
}

.wi-legal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin: 0 0 18px;

    color: var(--wi-legal-green);

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.wi-legal-hero__eyebrow::before {
    content: "";

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--wi-legal-amber);

    box-shadow: 0 0 0 6px rgba(255, 181, 52, 0.14);
}

.wi-legal-hero h1 {
    max-width: 900px;
    margin: 0;

    color: var(--wi-legal-text);

    font-family: "PT Serif", Georgia, serif;
    font-size: clamp(3.2rem, 7vw, 7.8rem);
    font-weight: 700;
    letter-spacing: -0.058em;
    line-height: 0.94;
}

.wi-legal-hero__summary {
    max-width: 760px;
    margin: 28px 0 0;

    color: var(--wi-legal-muted);

    font-size: clamp(0.95rem, 1.4vw, 1.12rem);
    line-height: 1.82;
}

.wi-legal-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 26px;

    color: var(--wi-legal-muted);

    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wi-legal-layout {
    display: grid;
    grid-template-columns: minmax(210px, 280px) minmax(0, 820px);
    gap: clamp(42px, 7vw, 104px);
    align-items: start;
    justify-content: start;
}

.wi-legal-toc {
    position: relative;
}

.wi-legal-toc__card {
    position: sticky;
    top: 112px;

    padding: 24px;

    border: 1px solid var(--wi-legal-line);
    border-radius: 18px;

    background: var(--wi-legal-surface);
}

.wi-legal-toc__card > p {
    margin: 0 0 14px;

    color: var(--wi-legal-muted);

    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.wi-legal-toc nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wi-legal-toc nav a {
    padding: 7px 9px;

    border-radius: 7px;

    color: var(--wi-legal-muted);

    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
}

.wi-legal-toc nav a:hover,
.wi-legal-toc nav a:focus-visible {
    background: var(--wi-legal-surface-soft);
    color: var(--wi-legal-green);
}

.wi-legal-toc__help {
    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid var(--wi-legal-line);
}

.wi-legal-toc__help strong,
.wi-legal-toc__help a {
    display: block;
}

.wi-legal-toc__help strong {
    font-size: 0.75rem;
}

.wi-legal-toc__help a {
    margin-top: 3px;

    color: var(--wi-legal-green);

    font-size: 0.72rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.wi-legal-document {
    min-width: 0;
}

.wi-legal-document section {
    padding: 0 0 42px;
    margin: 0 0 42px;

    border-bottom: 1px solid var(--wi-legal-line);
}

.wi-legal-document section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;

    border-bottom: 0;
}

.wi-legal-document h2,
.wi-legal-document h3 {
    color: var(--wi-legal-text);
}

.wi-legal-document h2 {
    margin: 0 0 20px;

    font-family: "PT Serif", Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.wi-legal-document h3 {
    margin: 30px 0 10px;

    font-size: 1rem;
    line-height: 1.35;
}

.wi-legal-document p,
.wi-legal-document li {
    color: var(--wi-legal-muted);

    font-size: 0.94rem;
    line-height: 1.88;
}

.wi-legal-document p {
    margin: 0 0 16px;
}

.wi-legal-document ul,
.wi-legal-document ol {
    margin: 16px 0 20px;
    padding-left: 1.3rem;
}

.wi-legal-document li + li {
    margin-top: 8px;
}

.wi-legal-document strong {
    color: var(--wi-legal-text);
}

.wi-legal-document a {
    color: var(--wi-legal-green);

    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.wi-legal-callout {
    margin: 26px 0;
    padding: 22px 24px;

    border: 1px solid var(--wi-legal-line);
    border-left: 4px solid var(--wi-legal-green);
    border-radius: 12px;

    background: var(--wi-legal-surface);
}

.wi-legal-callout--accent {
    border-left-color: var(--wi-legal-amber);
}

.wi-legal-callout > strong {
    display: block;
    margin-bottom: 6px;
}

.wi-legal-callout p:last-child {
    margin-bottom: 0;
}

.wi-legal-address {
    margin-top: 22px;
    padding: 22px 24px;

    border-radius: 12px;

    background: var(--wi-legal-surface-soft);
    color: var(--wi-legal-muted);

    font-style: normal;
    line-height: 1.8;
}

/* Footer */

.wi-legal-footer {
    border-top: 1px solid var(--wi-legal-line);

    background: var(--wi-legal-surface);
}

.wi-legal-footer__inner {
    display: flex;
    width: min(1440px, 100%);
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin: 0 auto;
    padding: 20px clamp(20px, 5vw, 72px);
}

.wi-legal-footer p {
    margin: 0;

    color: var(--wi-legal-muted);

    font-size: 0.72rem;
}

.wi-legal-footer nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.wi-legal-footer nav a {
    color: var(--wi-legal-muted);

    font-size: 0.72rem;
    font-weight: 650;
    text-decoration: none;
}

.wi-legal-footer nav a:hover {
    color: var(--wi-legal-green);
}

/* Focus */

.wi-legal-brand:focus-visible,
.wi-legal-nav a:focus-visible,
.wi-legal-theme-toggle:focus-visible,
.wi-legal-toc a:focus-visible,
.wi-legal-document a:focus-visible,
.wi-legal-footer a:focus-visible {
    outline: 3px solid rgba(255, 181, 52, 0.45);
    outline-offset: 4px;
}

/* Responsive */

@media (max-width: 980px) {
    .wi-legal-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .wi-legal-nav {
        display: none;
    }

    .wi-legal-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .wi-legal-toc__card {
        position: static;
    }

    .wi-legal-toc nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 86px;
    }

    .wi-legal-header__inner {
        min-height: 72px;
        padding: 10px 16px;
    }

    .wi-legal-brand__mark {
        width: 46px;
        height: 46px;
    }

    .wi-legal-brand__mark img {
        width: 29px;
        height: 29px;
    }

    .wi-legal-brand__copy small {
        display: none;
    }

    .wi-legal-main {
        padding:
            44px
            18px
            72px;
    }

    .wi-legal-hero {
        margin-bottom: 40px;
    }

    .wi-legal-hero h1 {
        font-size: clamp(2.8rem, 15vw, 4.6rem);
    }

    .wi-legal-hero__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .wi-legal-hero__meta span[aria-hidden="true"] {
        display: none;
    }

    .wi-legal-toc nav {
        grid-template-columns: 1fr;
    }

    .wi-legal-document section {
        padding-bottom: 34px;
        margin-bottom: 34px;
    }

    .wi-legal-document p,
    .wi-legal-document li {
        font-size: 0.9rem;
    }

    .wi-legal-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
