/* ==========================================================================
   LEGAL PAGES  (privacy.html, terms.html, cookies.html, gdpr.html)
   ==========================================================================

   These four pages used to be their own small design system: a frosted pill
   nav, a glass card floating on #fafafa over a background image that had been
   deleted from the repo, Inter-only headings at fixed px sizes - about 9.6k of
   inline CSS duplicated four ways, drifting further from index.html and
   pricing.html with every change.

   They now wear the same chrome as the rest of the public site: the shared
   .wl-header from css/site-chrome.css, a short photo band carrying the title
   (the same hero-bg.jpg and uppercase Space Grotesk as pricing.html), the
   homepage's 24px graph-paper band behind the text, and the standard black
   curved footer. This file is the only page-specific CSS left, and it is
   shared by all four - so there is one copy to change, not four.

   Load order matters: link this AFTER css/main.css and css/site-chrome.css,
   which is where .footer-curved and .wl-header* come from.
   ========================================================================== */

/* NO universal `* { margin: 0; padding: 0 }` reset here, deliberately.
   css/tailwind.css is Tailwind v4, which emits its utilities inside
   `@layer utilities` - and unlayered CSS beats a layer no matter how low its
   specificity. A blanket `*` reset in this file therefore silently wins over
   `mx-auto`, `px-4` and `py-12`, which is what squashed the shared footer flat
   against the viewport edge on these four pages. (`max-w-7xl` survived only
   because the reset says nothing about max-width, which is what made the
   breakage look like a half-applied stylesheet rather than a cascade problem.)
   Tailwind's own preflight does the same reset inside @layer base, so nothing
   is lost by leaving it out. */

body {
    font-family:
        Inter,
        -apple-system,
        blinkmacsystemfont,
        'Segoe UI',
        sans-serif;
    background: #fff;
    color: #1f2937;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Title band ──
   The same photograph and display type pricing.html wears, at about half the
   height: these pages are documents, so the band names the page and gets out
   of the way. js/site-header.js drives the nav's transparent -> glass -> blue
   states off `.legal-hero`, exactly as it does off `.pricing-hero`. */
.legal-hero {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 42vh;
    padding: 132px 40px 44px;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #1433d2;
    background-image: url('../assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.legal-hero-heading,
.legal-hero-sub {
    position: relative;
    z-index: 1;
}

.legal-hero-heading {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    line-height: 0.96;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.legal-hero-line {
    display: block;
}

.legal-hero-sub {
    margin: 0;
    font-size: 0.85rem;
    color: rgb(255 255 255 / 72%);
}

/* ── Document band ──
   The homepage's graph-paper band (24px tile, --app-grid-line colour), so the
   page below the photo reads as the same surface as index.html's second
   section. */
.legal-body {
    position: relative;
    z-index: 10;
    background-color: #fff;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 23px,
            rgb(0 0 0 / 4.5%) 23px,
            rgb(0 0 0 / 4.5%) 24px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 23px,
            rgb(0 0 0 / 4.5%) 23px,
            rgb(0 0 0 / 4.5%) 24px
        );
    padding: 3.5rem 24px 5rem;
}

@media (width >= 640px) {
    .legal-body {
        padding-top: 4.5rem;
        padding-bottom: 6rem;
    }
}

/* The card sits on the gridlines rather than a photo now, so it is opaque -
   the old translucent glass had nothing left behind it to blur. */
.legal-card {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgb(15 23 42 / 8%);
    border-radius: 16px;
    padding: 48px 44px;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    /* Line the link up with the card's left edge rather than the band's.
       The card is a 760px box centred in this same content box, so its inset
       is half the leftover width - and 0 once the viewport is narrower than
       the card. Doing it with margin keeps the hit area on the link itself;
       a 760px-wide flex wrapper would make the whole strip clickable. */
    margin: 0 0 20px max(0px, calc((100% - 760px) / 2));
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s ease;
}

.legal-back:hover {
    color: #111827;
}

/* ── Document typography ──
   Every selector is scoped to .legal-card. The previous version styled bare
   `p`, `ul` and `li`, which leaked out of the card and into the shared black
   footer - giving it disc bullets and a #4b5563 copyright line that was
   almost invisible on black. */
.legal-card h2 {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    margin: 36px 0 12px;
}

.legal-card h2:first-of-type {
    margin-top: 0;
}

.legal-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 24px 0 8px;
}

.legal-card p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 14px;
}

.legal-card ul,
.legal-card ol {
    margin: 0 0 14px 20px;
    padding-left: 8px;
}

.legal-card ul {
    list-style-type: disc;
}

.legal-card ol {
    list-style-type: decimal;
}

.legal-card li {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #4b5563;
    margin-bottom: 8px;
}

.legal-card strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-card a {
    color: var(--brand-primary, #1433d2);
    text-decoration: underline;
}

.legal-card a:hover {
    color: var(--brand-secondary, #0e2399);
}

/* cookies.html's category tables. */
.legal-card table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.legal-card th,
.legal-card td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgb(15 23 42 / 8%);
    line-height: 1.6;
}

.legal-card th {
    font-weight: 600;
    color: #111827;
    background: #f8fafc;
}

.legal-card td {
    color: #4b5563;
}

/* The "Cookie settings" button in the body of cookies.html, which reopens the
   consent card through CookieConsent's [data-cc-open] binding. */
.cookie-settings-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    margin: 4px 0 18px;
    border: 1px solid rgb(15 23 42 / 14%);
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.cookie-settings-link:hover {
    border-color: rgb(15 23 42 / 28%);
    background: #f8fafc;
}

@media (width <= 640px) {
    .legal-hero {
        min-height: 34vh;
        padding: 110px 20px 32px;
    }

    .legal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .legal-card {
        padding: 32px 22px;
        border-radius: 14px;
    }

    .legal-card table {
        display: block;
        overflow-x: auto;
    }
}
