/* ============================================================
   Legal pages — privacy.html, cookie.html
   Plain vertical reading pages in the portfolio's type system.
   ============================================================ */

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

:root {
    --accent: #7EB8E0;
    --accent-ink: #3f7aa6;   /* accent dark enough to read on white */
    --black: #0a0a0a;
    --white: #fefefe;
    --gray: #6f6f6f;
    --rule: #ececec;
    --font-main: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--black);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

/* ── HEADER ────────────────────────────────────────────────── */

.legal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(20px, 5vw, 60px);
    background: rgba(254,254,254,0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.legal-logo img {
    display: block;
    width: clamp(140px, 18vw, 190px);
    height: auto;
}

.legal-back {
    flex: none;
    font-family: var(--font-main);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--black);
    text-decoration: none;
    padding: 12px 20px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 30px;
    white-space: nowrap;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.legal-back:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* ── BODY ──────────────────────────────────────────────────── */

.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(48px, 10vh, 110px) clamp(20px, 5vw, 40px) 88px;
}

.legal-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    font-family: var(--font-main);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-ink);
}

.legal-eyebrow::before {
    content: '';
    width: 48px;
    height: 1px;
    background: var(--accent);
}

.legal h1 {
    font-family: var(--font-main);
    font-size: clamp(2.6rem, 10vw, 5.5rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.legal .legal-lede {
    max-width: 58ch;
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    line-height: 1.6;
    color: #2b2b2b;
}

.legal .legal-updated {
    margin-top: 22px;
    font-family: var(--font-main);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gray);
}

.legal section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--rule);
}

.legal h2 {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 18px;
    font-family: var(--font-main);
    font-size: clamp(1.1rem, 2.4vw, 1.45rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.legal h2 span {
    flex: none;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent-ink);
}

.legal p,
.legal li {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #3a3a3a;
}

.legal p + p,
.legal p + ul,
.legal ul + p,
.legal dl + p {
    margin-top: 14px;
}

.legal p + dl {
    margin-top: 20px;
}

.legal ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal li {
    position: relative;
    padding-left: 24px;
}

.legal li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 12px;
    height: 1px;
    background: var(--black);
}

.legal strong {
    color: var(--black);
    font-weight: 600;
}

.legal a {
    color: var(--black);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.legal a:hover {
    text-decoration-color: var(--black);
}

/* Fact sheet — label / value rows */
.legal-facts {
    display: grid;
    grid-template-columns: 150px 1fr;
    border-top: 1px solid var(--rule);
}

.legal-facts dt,
.legal-facts dd {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}

.legal-facts dt {
    font-family: var(--font-main);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gray);
    padding-top: 18px;
}

.legal-facts dd {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--black);
}

/* ── FOOTER ────────────────────────────────────────────────── */

.legal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
    padding: 32px clamp(20px, 5vw, 60px) calc(32px + env(safe-area-inset-bottom));
    background: var(--black);
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
    line-height: 1.7;
}

.legal-footer a {
    color: rgba(255,255,255,0.8);
    text-underline-offset: 3px;
}

.legal-footer a:hover {
    color: var(--white);
}

.legal-footer nav {
    display: flex;
    gap: 18px;
}

/* ── MOBILE ────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .legal-back {
        padding: 10px 14px;
    }

    .legal-facts {
        grid-template-columns: 1fr;
    }

    .legal-facts dt {
        padding: 16px 0 2px;
        border-bottom: none;
    }

    .legal-facts dd {
        padding: 0 0 14px;
    }

    .legal-footer {
        flex-direction: column;
    }
}
