/* ==========================================================================
   pages.css — subpages, long-form documents and the contact form.

   Extends the design system in index.css and uses only its tokens; there is
   no second palette here. index.css must be loaded first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Utilities (replacing what used to be inline style attributes)
   -------------------------------------------------------------------------- */

.is-hidden { display: none !important; }
.center-text { text-align: center; }
.mt-sm { margin-top: 14px; }
.hero-mock { position: relative; z-index: 1; }
.link-gold { color: var(--gold-soft); }
.link-gold:hover { color: var(--gold-pale); }
.guide-aside { color: var(--muted); font-size: 15px; margin-top: 20px; line-height: 1.7; }
.price-note { text-align: center; color: var(--muted); font-size: 15px; margin-top: 30px; }

/* Small gold "on the roadmap" marker used inline in headings */
.tag-gold {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--line-gold);
    border-radius: 20px;
    padding: 2px 9px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Mobile nav panel, opened by .menu-toggle */
@media (max-width: 960px) {
    .nav-links.open {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        padding: 10px 28px 20px;
        background: rgba(6, 16, 14, .97);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(16px);
    }
    .nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .nav-links.open a:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Page header — the compact hero every subpage opens with
   -------------------------------------------------------------------------- */

.page-head {
    padding: 76px 0 34px;
    position: relative;
    border-bottom: 1px solid var(--line);
}
.page-head .wrap { max-width: 860px; }
.page-head h1 {
    font-size: clamp(34px, 4.6vw, 54px);
    margin-bottom: 16px;
}
.page-head h1 em { font-style: italic; color: var(--teal-soft); }
.page-head .lede {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.72;
    max-width: 52ch;
}
.page-head .updated {
    display: inline-block;
    margin-top: 20px;
    font-size: 12px;
    letter-spacing: .06em;
    color: var(--faint);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 14px;
}

/* --------------------------------------------------------------------------
   Document body — privacy, terms, security policy, acknowledgements
   -------------------------------------------------------------------------- */

.doc { padding: 22px 0 96px; }
.doc .wrap { max-width: 860px; }

.doc section {
    padding: 38px 0 8px;
    border-bottom: 1px solid var(--line);
}
.doc section:last-of-type { border-bottom: 0; }

.doc h2 {
    font-size: clamp(24px, 2.6vw, 31px);
    margin-bottom: 18px;
    line-height: 1.2;
}
.doc h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--ink);
    margin: 28px 0 10px;
}
.doc p {
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.75;
    margin-bottom: 16px;
}
.doc strong { color: var(--ink); font-weight: 500; }
.doc a { color: var(--teal-soft); border-bottom: 1px solid rgba(47, 169, 157, .3); }
.doc a:hover { border-bottom-color: var(--teal-soft); }

.doc ul { list-style: none; margin: 0 0 18px; }
.doc ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.7;
}
.doc ul li::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal-soft);
}

/* Highlighted card inside a document (e.g. "how to report") */
.doc-card {
    border: 1px solid var(--line-teal);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(var(--teal-rgb), .07), var(--bg-2));
    padding: 30px;
    margin: 6px 0 10px;
}
.doc-card h2 { margin-top: 0; }
.doc-card :last-child { margin-bottom: 0; }

.mail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin: 4px 0 20px;
}
.mail-label { font-size: 13px; color: var(--faint); }
.mail-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    color: var(--gold-soft);
    border-bottom: 1px solid var(--line-gold);
}
.mail-link:hover { color: var(--gold-pale); border-bottom-color: var(--gold); }

/* Two-column in-scope / out-of-scope */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 6px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; gap: 6px; } }

.col-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.col-in .col-label { color: var(--teal-soft); }
.col-out .col-label { color: var(--gold-soft); }
.col-out ul li::before { background: var(--gold); }
.offer-no ul li::before {
    width: 11px;
    height: 2px;
    border-radius: 0;
    top: 13px;
    left: 1px;
    background: var(--gold);
}

.note {
    border: 1px solid var(--line);
    border-left: 2px solid var(--teal);
    border-radius: 0 10px 10px 0;
    background: var(--bg-2);
    padding: 16px 20px;
    font-size: 14.5px;
    color: var(--muted);
    margin: 8px 0 0;
}

/* Researcher credits */
.credits { display: grid; gap: 9px; }
.credit {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg-2);
    padding: 13px 16px;
    font-size: 15px;
}
.credit::before {
    content: '';
    width: 8px;
    height: 11px;
    flex: none;
    border-radius: 1px;
    background: var(--teal-soft);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

.contact-layout {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 56px;
    align-items: start;
    padding: 56px 0 96px;
}
@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; gap: 44px; }
}

.form-card {
    border: 1px solid var(--line-gold);
    border-radius: 16px;
    background: var(--bg-2);
    padding: 34px;
}
@media (max-width: 560px) { .form-card { padding: 24px 20px; } }

.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.field .req { color: var(--gold); }

.field input,
.field select,
.field textarea {
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-size: 15.5px;
    color: var(--ink);
    background: rgba(0, 0, 0, .28);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 14px;
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 168px; resize: vertical; line-height: 1.65; }

/* The native dropdown list is drawn by the OS, so it needs a colour that is
   readable on its own light background rather than inheriting the dark one. */
.field select option { background: #0F1F1B; color: var(--ink); }

.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--teal-mid);
    box-shadow: 0 0 0 3px rgba(var(--teal-rgb), .16);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: rgba(220, 120, 90, .65); }

.field-error {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    color: #E29A7C;
}

.field-hint { margin-top: 7px; font-size: 12.5px; color: var(--faint); }

/* Honeypot: kept in the accessibility tree's blind spot but off-screen rather
   than display:none, since some bots skip fields that are not rendered. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 26px;
}
.form-actions .btn { cursor: pointer; }

.privacy-note {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--faint);
}
.privacy-note a { color: var(--teal-soft); }

/* Turnstile widget slot — reserves height so the form does not jump when the
   managed widget decides it needs to show something. */
.turnstile-slot { margin-top: 22px; min-height: 66px; }

/* Alerts ------------------------------------------------------------------ */

.alert {
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 26px;
    font-size: 14.5px;
    line-height: 1.65;
}
.alert p { margin: 0; }
.alert p + p { margin-top: 8px; }
.alert a { border-bottom: 1px solid currentColor; }

.alert-success {
    border: 1px solid rgba(var(--teal-rgb), .4);
    background: linear-gradient(160deg, rgba(var(--teal-rgb), .13), rgba(var(--teal-rgb), .04));
    color: var(--ink);
}
.alert-success b { color: var(--teal-soft); font-weight: 500; }

.alert-error {
    border: 1px solid rgba(220, 120, 90, .4);
    background: rgba(220, 120, 90, .08);
    color: var(--ink);
}
.alert-error a { color: #E29A7C; }

/* Aside next to the form ---------------------------------------------------- */

.contact-aside .block { margin-bottom: 34px; }
.contact-aside h3 {
    font-size: 21px;
    margin-bottom: 10px;
}
.contact-aside p { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.contact-aside a { color: var(--teal-soft); }
.contact-aside .direct {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    color: var(--gold-soft);
}

/* --------------------------------------------------------------------------
   Brand logo
   -------------------------------------------------------------------------- */

/*
 * Two colour variants are supplied (white artwork for dark surfaces, black for
 * light), so there is no CSS recolouring here — the correct file is chosen in
 * the Blade partial. Height is set per context; width follows the artwork.
 */
.site-logo {
    display: block;
    width: auto;
    flex: none;
}

.brand { color: var(--ink); transition: opacity .2s; }
.brand:hover { opacity: .82; }

/* The nav bar is 68px tall, so the logo has to stay comfortably under that. */
nav .site-logo { height: 44px; }
footer .site-logo { height: 48px; margin-bottom: 4px; }

@media (max-width: 560px) {
    nav .site-logo { height: 34px; }
}

/* --------------------------------------------------------------------------
   Consent banner
   -------------------------------------------------------------------------- */

.consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: rgba(10, 23, 20, .97);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-gold);
    box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, .9);
    padding: 20px 28px;
}
.consent[hidden] { display: none; }

.consent-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.consent-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--muted);
    max-width: 62ch;
}
.consent-text a { color: var(--teal-soft); border-bottom: 1px solid rgba(47, 169, 157, .35); }
.consent-text a:hover { color: var(--ink); }

.consent-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.consent-actions .btn { cursor: pointer; }

@media (max-width: 700px) {
    .consent { padding: 18px 20px; }
    .consent-inner { gap: 16px; }
    .consent-actions { width: 100%; }
    .consent-actions .btn { flex: 1; justify-content: center; }
}

/* Consent controls on the privacy page */

.consent-controls {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-2);
    padding: 22px 24px;
    margin-top: 6px;
}
.consent-controls p { margin-bottom: 14px; }
#consent-status { color: var(--ink); font-size: 15px; }
.consent-controls .btn { cursor: pointer; }
.consent-controls .btn[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Error pages
   -------------------------------------------------------------------------- */

.error-page {
    min-height: 62vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 90px 0;
}
.error-page .code {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(72px, 12vw, 132px);
    line-height: 1;
    color: rgba(240, 235, 224, .07);
    margin-bottom: -14px;
}
.error-page h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; }
.error-page h1 em { font-style: italic; color: var(--teal-soft); }
.error-page p {
    color: var(--muted);
    font-size: 16.5px;
    max-width: 34rem;
    margin: 0 auto 30px;
    line-height: 1.7;
}
.error-page .hero-actions { justify-content: center; }
