/* ==========================================================================
   Legal pages (privacy policy, thank-you) and the 404
   ========================================================================== */

/* --- 404 -----------------------------------------------------------------
   A 404 is a navigation failure, so it is built as a menu rather than an
   apology: the ghost numeral sets the tone, the four links do the work. */

.notfound-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 150px var(--sp-5) var(--sp-11);
}

.notfound-code {
    font-family: var(--font-head);
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: var(--tracking-tight);
    margin: 0 0 var(--sp-4);
    /* Ghosted rather than solid — it is decoration, not the message. */
    background: linear-gradient(180deg, var(--slate-300), transparent 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.notfound-wrap h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-4); }
.notfound-lead {
    font-size: var(--fs-lg);
    color: var(--ink-3);
    line-height: var(--lh-base);
    max-width: 56ch;
    margin-bottom: var(--sp-8);
}

.notfound-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}

.notfound-link {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-5);
    background: var(--plane-2);
    border: 1px solid var(--hair-1);
    border-radius: var(--radius-lg);
    box-shadow: var(--el-1);
    text-decoration: none;
    color: var(--ink-2);
    transition: transform var(--dur-2) var(--ease-out),
                box-shadow var(--dur-2) var(--ease-out),
                border-color var(--dur-1) var(--ease-out) 40ms;
}
.notfound-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--el-2);
    border-color: var(--hair-2);
}
.notfound-link .icon { color: var(--primary-color); flex-shrink: 0; margin-top: 2px; }
.notfound-link span { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); color: var(--ink-3); }
.notfound-link strong { color: var(--ink-1); font-size: var(--fs-base); font-weight: 600; }

.notfound-actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }

/* The .notfound-wrap padding-top that used to live here is now handled by the
   max-width:900px block at the end of this file, which is both wider-reaching
   and later in the cascade — leaving it here would have been dead code that
   only looks authoritative. */

.page-legal .hero { padding: 160px var(--sp-5) var(--sp-9); }
.page-legal .hero h1 { font-size: var(--fs-3xl); }

.policy-wrap { max-width: 860px; margin: 0 auto; padding: 70px var(--sp-5) 90px; }

.policy-notice {
    background-color: var(--tint-blue);
    border-left: 4px solid var(--primary-color);
    padding: 18px 22px;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    line-height: var(--lh-base);
    color: var(--text-main);
    margin-bottom: var(--sp-10);
}

.policy-toc {
    background-color: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 26px var(--sp-6);
    margin-bottom: var(--sp-10);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}
.policy-toc h3 {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-bg);
    margin-bottom: 14px;
}
.policy-toc ol { padding-left: var(--sp-5); display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2) var(--sp-5); list-style: decimal; }
.policy-toc ol li a { font-size: var(--fs-sm); color: var(--text-main); text-decoration: none; font-weight: 600; }
.policy-toc ol li a:hover { color: var(--primary-color); }

.policy-section { margin-bottom: 42px; scroll-margin-top: calc(var(--header-h) + var(--sp-5)); }
.policy-section h2 {
    font-size: var(--fs-xl);
    color: var(--dark-bg);
    margin-bottom: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.policy-section h2 .icon { color: var(--primary-color); width: var(--icon-md); height: var(--icon-md); flex: none; }
.policy-section p { font-size: var(--fs-sm); line-height: 1.75; color: var(--text-main); margin-bottom: 14px; }
.policy-section ul { margin: 0 0 14px; padding-left: var(--sp-5); list-style: disc; }
.policy-section ul li { font-size: var(--fs-sm); line-height: 1.75; color: var(--text-main); margin-bottom: var(--sp-2); }
.policy-section a { color: var(--primary-color); font-weight: 600; text-decoration: none; }
.policy-section a:hover { text-decoration: underline; }

.contact-callout {
    background-color: var(--dark-bg);
    color: var(--white);
    border-radius: 14px;
    padding: 36px;
    text-align: center;
}
.contact-callout h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-3); color: var(--white); }
.contact-callout p { color: var(--slate-300); font-size: var(--fs-sm); margin-bottom: 18px; }

@media (max-width: 560px) {
    .policy-toc ol { grid-template-columns: 1fr; }
}

/* Same 150/160px-on-a-phone problem as insights.css — see the note there. */
@media (max-width: 900px) {
    .page-legal .hero,
    .notfound-wrap { padding-top: calc(var(--header-h) + var(--sp-7)); }
    .policy-wrap { padding: var(--sp-8) var(--sp-5) var(--sp-9); }
}
