/* ==========================================================================
   NeuroConverse newsletter
   Minimal, calm, readable. Brand: navy #15005a · teal #049785 · gold #fece61
   Noto Sans (self-hosted). Light + dark mode, reduced motion, forced colours.
   ========================================================================== */

@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/noto-sans-regular.woff2") format("woff2");
}
@font-face {
    font-family: "Noto Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/noto-sans-700.woff2") format("woff2");
}

:root {
    --navy: #15005a;
    --navy-hover: #2b1585;
    --teal: #049785;
    --teal-text: #03705f;
    --mint: #81cbc2;
    --gold: #fece61;
    --gradient: linear-gradient(90deg, #049785, #81cbc2 40%, #e9d27a 75%, #fece61);

    --bg: #ffffff;
    --ink: #1b1930;
    --heading: var(--navy);
    --muted: #5d5a70;
    --line: #e7e6ee;
    --field: #ffffff;
    --field-line: #bdbbc9;
    --link: #006798;
    --error: #b3261e;
    --error-bg: #fdf0ef;
    --accent-bg: #f1f8f6;
    --button: var(--navy);
    --button-hover: var(--navy-hover);
    --button-ink: #ffffff;
    --focus: var(--navy);
    --ring: rgba(254, 206, 97, .75);

    --radius: 10px;
    --measure: 34rem;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0c22;
        --ink: #ecebf5;
        --heading: #ffffff;
        --muted: #aaa7bf;
        --line: #2a2550;
        --field: #17132f;
        --field-line: #4b4670;
        --link: #8fd0ee;
        --error: #ff9a90;
        --error-bg: #2e1517;
        --accent-bg: #12282a;
        --teal-text: #6fd6c4;
        --button: var(--gold);
        --button-hover: #ffd982;
        --button-ink: var(--navy);
        --focus: var(--gold);
        --ring: rgba(254, 206, 97, .45);
        color-scheme: dark;
    }
}

/* ------------------------------------------------------------------ base */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2 { color: var(--heading); line-height: 1.2; margin: 0 0 .75rem; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 1.55rem + 1.9vw, 2.7rem); }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
strong { font-weight: 700; }

a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

img, svg { max-width: 100%; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 1rem; top: 0; z-index: 10;
    padding: .6rem 1rem; background: var(--gold); color: var(--navy);
    font-weight: 700; border-radius: 0 0 var(--radius) var(--radius);
    transform: translateY(-110%);
}
.skip-link:focus { transform: none; }

/* ---------------------------------------------------------------- header */

.site-header { background: var(--navy); }
.site-header::after { content: ""; display: block; height: 3px; background: var(--gradient); }
.site-header__inner {
    max-width: 68rem; margin: 0 auto; padding: .95rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-header__logo { display: inline-flex; line-height: 0; }
.site-header__logo img { width: clamp(150px, 34vw, 190px); height: auto; }
.site-header a { color: #fff; }
.site-header a:focus-visible { outline-color: var(--gold); }
.site-header__link { font-size: .9rem; text-decoration: none; opacity: .85; }
.site-header__link:hover { opacity: 1; text-decoration: underline; }

/* ------------------------------------------------------------------ main */

.site-main { flex: 1; width: 100%; outline: none; }

.page {
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(2.5rem, 9vh, 5.5rem) 1.25rem clamp(3rem, 8vh, 5rem);
}

.brandmark { display: block; width: 72px; height: auto; margin: 0 0 1.75rem; }

.lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 2.25rem; }
.muted { color: var(--muted); font-size: .95rem; }

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

.form { margin: 0; }

.field { margin-bottom: 1.25rem; }
.field > label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
.optional { font-weight: 400; color: var(--muted); }

.field input[type="email"],
.field input[type="text"] {
    display: block;
    width: 100%;
    min-height: 3.1rem;
    padding: .7rem .95rem;
    font: inherit;
    color: var(--ink);
    background: var(--field);
    border: 1px solid var(--field-line);
    border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: var(--muted); opacity: .8; }
.field input:hover { border-color: var(--muted); }
.field input:focus-visible {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 4px var(--ring);
}

.hint { margin: .4rem 0 0; font-size: .9rem; color: var(--muted); }

.field--invalid input[type="email"],
.field--invalid input[type="text"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field__error { margin: .45rem 0 0; font-size: .92rem; font-weight: 700; color: var(--error); }
.field__error[hidden] { display: none; }

.field--check {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .75rem;
    align-items: start;
    margin: 1.5rem 0;
}
.field--check > label { margin: 0; font-size: .95rem; font-weight: 400; color: var(--muted); line-height: 1.55; }
.field--check .hint, .field--check .field__error { grid-column: 2; }
.field--check input[type="checkbox"] {
    width: 1.3rem; height: 1.3rem; margin: .1rem 0 0;
    accent-color: var(--button); cursor: pointer;
}
.field--invalid input[type="checkbox"] { outline: 2px solid var(--error); outline-offset: 2px; }

/* Honeypot: off-screen rather than display:none (some bots skip hidden fields). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert {
    margin: 0 0 1.5rem;
    padding: .8rem 1rem;
    border-left: 3px solid var(--error);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--error-bg);
    color: var(--error);
    font-size: .95rem;
    font-weight: 700;
}
.alert[hidden] { display: none; }
.alert .button { margin-top: .75rem; }

/* ---------------------------------------------------------------- button */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 3.1rem;
    padding: .7rem 1.5rem;
    font: inherit;
    font-weight: 700;
    color: var(--button-ink);
    background: var(--button);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease;
}
.button:hover { background: var(--button-hover); text-decoration: none; }
.button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.button[disabled] { opacity: .7; cursor: progress; }
.button--block, .form .button { width: 100%; }
.button--ghost { background: transparent; color: var(--link); border-color: var(--line); }
.button--ghost:hover { background: var(--accent-bg); }
.button--danger { background: var(--error); color: #fff; }
.button--danger:hover { background: #8f1d17; }

.spinner {
    display: none;
    width: 1rem; height: 1rem;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: spin .8s linear infinite;
}
.is-busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Small reassurance line under the button */
.assurances {
    display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
    margin: 1rem 0 0; padding: 0; list-style: none;
    font-size: .85rem; color: var(--muted);
}
.assurances li { display: inline-flex; align-items: center; gap: .45rem; }
.assurances li::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
}

/* ------------------------------------------------------------- sections */

.divider { height: 1px; border: 0; background: var(--line); margin: 3rem 0 2rem; }

.label {
    margin: 0 0 1rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--muted);
}

.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.benefits li { display: grid; grid-template-columns: 10px 1fr; gap: .9rem; align-items: baseline; }
.benefits li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--teal)); }
.benefits li:nth-child(2) { --dot: var(--mint); }
.benefits li:nth-child(3) { --dot: var(--gold); }

.smallprint { margin: 2rem 0 0; font-size: .8rem; line-height: 1.6; color: var(--muted); }

/* --------------------------------------------------------------- success */

.success { outline: none; }
.success[hidden], .form[hidden] { display: none; }

.steps { list-style: none; counter-reset: step; margin: 1.75rem 0; padding: 0; display: grid; gap: .9rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 1.9rem 1fr; gap: .8rem; align-items: center; }
.steps li::before {
    content: counter(step);
    display: grid; place-items: center;
    width: 1.9rem; height: 1.9rem; border-radius: 50%;
    background: var(--accent-bg); color: var(--teal-text);
    font-size: .9rem; font-weight: 700;
}

.plain-list { padding-left: 1.1rem; margin: 0 0 1.5rem; }
.plain-list li { margin-bottom: .55rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer__inner { max-width: 68rem; margin: 0 auto; padding: 1.75rem 1.25rem 2.25rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: .75rem; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 .3rem; }
.site-footer a { color: inherit; }

/* ----------------------------------------------------------- preferences */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (forced-colors: active) {
    .button { border-color: ButtonText; }
    .site-header::after { background: CanvasText; }
}

@media print {
    .site-header, .site-footer, .form, .button { display: none; }
}
