/* ==========================================================================
   OwnYourStack — public site stylesheet
   Every colour and font is a custom property on :root (theme hooks):
   swap the values below to re-theme the site. Dark mode (mobile) overrides
   them in mobile.css. Per-category colour comes from categories.color (--tint).
   ========================================================================== */

:root {
    /* ---- Text and backgrounds ---- */
    --ink: #1f2933;
    --ink-soft: #52606d;
    --ink-light: #7b8794;
    --bg: #ffffff;
    --bg-alt: #f2f7f8;
    --line: #dbe4ea;

    /* ---- Brand ("Shield" theme: deep navy + teal, coral accent) ---- */
    --brand-dark: #0b2540;       /* headings, menu, footer */
    --brand: #0e7c86;            /* teal: hover, secondary */
    --brand-bright: #0e9aa7;     /* links, buttons, "Your" in the logo */
    --brand-light: #5cc4cc;
    --brand-pale: #e3f3f4;       /* tinted backgrounds, menu hover, pills */
    --brand-wash: #f5fafb;       /* very light backgrounds */
    --brand-dark-fixed: #0b2540; /* stays dark in dark mode (badges, footer) */
    --brand-fixed: #0e7c86;      /* stays the same in dark mode (badges) */
    --accent: #ff6b4a;           /* coral: header stripe, Comparison badge, newsletter button */
    --accent-ink: #2b0d05;       /* text on the accent */
    --accent-hover: #ff8a6e;
    --on-brand: #ffffff;         /* text on brand backgrounds */

    /* ---- Header ---- */
    --header-stripe: linear-gradient(90deg, var(--brand-dark), var(--brand-bright) 60%, var(--accent));

    /* ---- Logo mark (partials/logo.php) ---- */
    --logo-shield: #0b2540;
    --logo-inner: #0e9aa7;
    --logo-bar: #ffffff;
    --logo-bar-accent: #ff6b4a;

    /* ---- Placeholder visual (article without an image): category colour to a darker shade ---- */
    --placeholder-shade: #000000;
    --placeholder-icon: #ffffff;

    /* ---- Footer (dark band) ---- */
    --footer-bg: #0b2540;
    --footer-ink: #d6e4ea;
    --footer-ink-light: #9fb6c6;
    --footer-line: rgba(255, 255, 255, .12);

    /* ---- Feedback ---- */
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --danger-line: #fecdca;
    --danger-bright: #e5484d;

    /* ---- Mobile version (light values; dark values in mobile.css) ---- */
    --m-header-bg: rgba(255, 255, 255, .94);
    --m-dark-bg: #0b2540;
    --m-footer-ink: #d6e4ea;
    --m-footer-ink-light: #9fb6c6;
    --m-bar-color: #0b2540;      /* browser / app bar colour (read by mobile.js) */

    /* ---- Shadows ---- */
    --shadow: 0 1px 2px rgba(11, 37, 64, .06), 0 4px 16px rgba(11, 37, 64, .06);
    --shadow-hover: 0 2px 4px rgba(11, 37, 64, .08), 0 12px 28px rgba(11, 37, 64, .12);

    /* ---- Fonts (system fonts, no external request) ---- */
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* body, kickers, logo */
    --font-head: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;         /* headlines */
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

    /* ---- Layout ---- */
    --radius: 12px;
    --radius-small: 6px;
    --width: 1200px;
    --width-narrow: 760px;
    --gutter: clamp(16px, 4vw, 32px);
}

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg-alt);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-bright); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--brand-dark); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }

code, kbd, pre { font-family: var(--font-mono); }

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

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--brand); color: var(--on-brand); padding: .6em 1em; z-index: 100; }
.skip-link:focus { left: 1em; top: 1em; }

.container { width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(var(--width-narrow) + 2 * var(--gutter)); }

.main { min-height: 60vh; padding-bottom: 3rem; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.site-header::after {
    content: ""; display: block; height: 3px;
    background: var(--header-stripe);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }

/* Logo mark colours come from tokens so the theme can recolour it */
.logo-mark__shield { fill: var(--logo-shield); }
.logo-mark__inner { fill: var(--logo-inner); }
.logo-mark__bar { fill: var(--logo-bar); }
.logo-mark__bar--accent { fill: var(--logo-bar-accent); }

/* Logo (markup in app/Views/partials/logo.php) */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--brand-dark); }
.logo__mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; }
.logo__mark svg { width: 100%; height: 100%; }
.logo__text { font-family: var(--font-body); font-size: 1.45rem; font-weight: 500; letter-spacing: -.02em; }
.logo__text b { font-weight: 850; color: var(--brand-bright); }

.menu ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.menu a {
    display: block; padding: .45rem .8rem; border-radius: 999px;
    font-weight: 600; font-size: .95rem; color: var(--brand-dark); text-decoration: none;
}
.menu a:hover { background: var(--brand-pale); color: var(--brand-dark); }
.menu a[aria-current="page"] { background: var(--brand-dark); color: var(--on-brand); }

.menu-button { display: none; }

@media (max-width: 900px) {
    .menu-button {
        display: grid; place-items: center; width: 44px; height: 44px;
        border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer;
    }
    .menu-button__bars, .menu-button__bars::before, .menu-button__bars::after {
        display: block; width: 20px; height: 2px; background: var(--brand-dark); border-radius: 2px; position: relative; content: "";
        transition: transform .2s;
    }
    .menu-button__bars::before { position: absolute; top: -6px; }
    .menu-button__bars::after { position: absolute; top: 6px; }
    .menu-button[aria-expanded="true"] .menu-button__bars { background: transparent; }
    .menu-button[aria-expanded="true"] .menu-button__bars::before { transform: translateY(6px) rotate(45deg); }
    .menu-button[aria-expanded="true"] .menu-button__bars::after { transform: translateY(-6px) rotate(-45deg); }

    .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .menu.open { display: block; }
    .menu ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
    .menu a { border-radius: var(--radius-small); padding: .75rem 1rem; }
}

/* --------------------------------------------------------------------------
   Buttons, pills, badges
   -------------------------------------------------------------------------- */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    padding: .7em 1.3em; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--brand-bright); color: var(--on-brand); font: inherit; font-weight: 700; text-decoration: none;
    transition: background .15s, transform .15s;
}
.button:hover { background: var(--brand); color: var(--on-brand); }
.button:active { transform: translateY(1px); }
.button--secondary { background: var(--brand-pale); color: var(--brand); }
.button--secondary:hover { background: color-mix(in srgb, var(--brand-pale) 80%, var(--brand-light)); color: var(--brand-dark); }

.pill {
    --tint: var(--brand-bright);
    display: inline-block; padding: .15em .65em; border-radius: 999px;
    font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
    color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, var(--bg));
}
a.pill:hover { background: var(--tint); color: var(--on-brand); }

/* Article type badges: Guide, Review, Comparison, Deep dive (News has no badge) */
.badge {
    display: inline-block; padding: .15em .6em; border-radius: var(--radius-small);
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    background: var(--brand-dark); color: var(--on-brand);
}
.badge--guide { background: var(--brand-dark); }
.badge--review { background: var(--brand); }
.badge--comparison { background: var(--accent); color: var(--accent-ink); }
.badge--feature { background: var(--brand-bright); }

/* --------------------------------------------------------------------------
   Article cards
   -------------------------------------------------------------------------- */
.card {
    display: flex; flex-direction: column;
    background: var(--bg); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
    position: relative;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-pale); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.03); }

/* Placeholder visual for an article without an image: category colour gradient + white line icon per category */
.card__placeholder {
    --tint: var(--brand-bright);
    display: grid; place-items: center; width: 100%; height: 100%; min-height: 64px;
    color: var(--placeholder-icon);
    background:
        radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--placeholder-icon) 25%, transparent), transparent 45%),
        linear-gradient(135deg, var(--tint), color-mix(in srgb, var(--tint) 55%, var(--placeholder-shade)));
}
.card__placeholder svg { width: 22%; height: auto; max-width: 72px; }

.card__body { display: flex; flex-direction: column; gap: .45rem; padding: 1.1rem 1.25rem 1.25rem; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; color: var(--ink-light); }
.card__title { margin: 0; }
.card__title a { color: var(--brand-dark); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* the whole card is clickable */
.card__title a:hover { color: var(--brand-bright); }
.card__meta a { position: relative; z-index: 1; }
.card__standfirst { margin: 0; color: var(--ink-soft); }
.card__date { margin: auto 0 0; font-size: .85rem; color: var(--ink-light); }

/* Main article */
.card--lead { display: grid; grid-template-columns: 1.6fr 1fr; }
.card--lead .card__media { aspect-ratio: auto; min-height: 380px; }
.card--lead .card__body { padding: 2rem; justify-content: center; gap: .8rem; }
.card--lead .card__title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.card--lead .card__standfirst { font-size: 1.05rem; }
.card--lead .card__date { margin-top: .5rem; }

/* Main article of a category */
.card--large .card__title { font-size: 1.45rem; }

/* Sidebar */
.card--compact { flex-direction: row; }
.card--compact .card__media { flex: 0 0 42%; aspect-ratio: 4 / 3; }
.card--compact .card__body { padding: .9rem 1rem; }
.card--compact .card__title { font-size: 1.02rem; }

@media (max-width: 900px) {
    .card--lead { grid-template-columns: 1fr; }
    .card--lead .card__media { min-height: 0; aspect-ratio: 16 / 9; }
    .card--lead .card__body { padding: 1.25rem; }
}
@media (max-width: 520px) {
    .card--compact { flex-direction: column; }
    .card--compact .card__media { aspect-ratio: 16 / 9; }
}

/* --------------------------------------------------------------------------
   Grids
   -------------------------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Home page — "press" layout: one large article (title, opening text,
   large image) then 3 small articles with thumbnails, separated by rules
   -------------------------------------------------------------------------- */
.press { padding-top: 1.6rem; }
.press-block { --tint: var(--brand-bright); padding: 1.6rem 0 1.4rem; border-bottom: 1px solid var(--line); }
.press-block:last-child { border-bottom: 0; }

.press-block__header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding-top: .55rem; border-top: 3px solid var(--tint); }
.press-block__header h2 { font-family: var(--font-body); margin: 0; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.press-block__header h2 a { color: var(--tint); text-decoration: none; }
.press-block__all { font-size: .85rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.press-block__all:hover { color: var(--tint); text-decoration: underline; }

.press__kicker { font-family: var(--font-body); margin: 0 0 .35rem; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--tint); }
.press__kicker a { color: inherit; text-decoration: none; }
.press__kicker a:hover { text-decoration: underline; }
.press__type { color: var(--ink-soft); }

.press__title { margin: 0 0 .7rem; font-family: var(--font-head); font-weight: 700; line-height: 1.18; letter-spacing: 0; font-size: 1.55rem; }
.press__title a, .mini__title a { color: var(--brand-dark); text-decoration: none; }
.press__title a:hover, .mini__title a:hover { color: var(--brand-bright); text-decoration: underline; text-decoration-thickness: 1px; }
.press__title--lead { font-size: clamp(1.7rem, 2.8vw, 2.25rem); margin-bottom: 1rem; }

.press__standfirst { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.press__date { margin: .6rem 0 0; font-size: .8rem; color: var(--ink-light); }

.press__img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.press__img.card__placeholder { display: grid; min-height: 0; }
figure.press-lead__image, figure.press-main__image { margin: 0; }
.press-lead__image figcaption, .press-main__image figcaption { margin-top: .3rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; text-align: right; color: var(--ink-light); }

/* Large article: opening text on the left (1/3), image on the right (2/3) */
.press-lead__body { display: grid; grid-template-columns: 1fr 2fr; gap: 1.6rem; align-items: start; }
.press-main { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }

/* Small articles (3, or one per other category): thumbnail + title, vertical rules between them */
.press-minis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.mini { --tint: var(--brand-bright); display: flex; gap: .8rem; align-items: flex-start; padding: 0 1.1rem; border-left: 1px solid var(--line); }
.mini:first-child { padding-left: 0; border-left: 0; }
.mini:last-child { padding-right: 0; }
.mini__media { flex: 0 0 96px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: var(--brand-pale); }
.mini__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini__media .card__placeholder { min-height: 0; }
.mini__media .card__placeholder svg { width: 34%; }
.mini__text { min-width: 0; }
.mini__text .press__kicker { font-size: .68rem; margin-bottom: .2rem; }
.mini__title { margin: 0; font-family: var(--font-head); font-size: 1.02rem; font-weight: 700; line-height: 1.25; letter-spacing: 0; }

@media (max-width: 900px) {
    .press-lead__body, .press-main { grid-template-columns: 1fr; gap: 1rem; }
    .press-lead__image, .press-main__image { order: -1; }
    .press-minis { grid-auto-flow: row; gap: 1rem; }
    .mini { padding: 0; border-left: 0; }
    .mini + .mini { padding-top: 1rem; border-top: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   Page headers (category, archive…)
   -------------------------------------------------------------------------- */
.page-header {
    --tint: var(--brand-bright);
    background:
        radial-gradient(circle at 90% -20%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 50%),
        linear-gradient(180deg, var(--brand-pale), var(--bg-alt));
    padding: 2.2rem 0 1.8rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line);
}
.page-header h1 { margin-bottom: .25rem; }
.page-header p { margin: 0; color: var(--ink-soft); max-width: 60ch; }

.breadcrumb { font-size: .85rem; color: var(--ink-light); margin-bottom: .75rem; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-bright); text-decoration: underline; }

.list { display: grid; gap: 1.5rem; }

/* --------------------------------------------------------------------------
   Reading an article
   -------------------------------------------------------------------------- */
.reading { --tint: var(--brand-bright); background: var(--bg); padding-bottom: 2.5rem; }
.reading__header { padding-top: 2rem; padding-bottom: 1.5rem; }
.reading__header .card__meta { margin-bottom: .8rem; }
.reading__header .pill { --tint: inherit; }
.reading__standfirst { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); font-weight: 500; }
.reading__info { font-size: .9rem; color: var(--ink-light); margin: 0; }

.reading__image { margin: 0 auto 2rem; }
.reading__image img { width: 100%; border-radius: var(--radius); }
.reading__image figcaption, .prose figcaption { font-size: .85rem; color: var(--ink-light); padding-top: .5rem; }
.credit { margin-left: .4em; font-style: italic; }

.prose { font-size: 1.08rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose a { color: var(--brand-bright); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose blockquote {
    margin: 1.5em 0; padding: .8em 1.2em; border-left: 4px solid var(--brand-bright);
    background: var(--brand-wash); border-radius: 0 var(--radius-small) var(--radius-small) 0; color: var(--brand-dark); font-style: italic;
}
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: var(--radius-small); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .55em .8em; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--brand-pale); color: var(--brand-dark); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose code { background: var(--brand-pale); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.prose pre { background: var(--brand-wash); border: 1px solid var(--line); border-radius: var(--radius-small); padding: .8em 1em; overflow-x: auto; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }

.related { padding-top: 2.5rem; }

.preview-banner { background: var(--accent); color: var(--accent-ink); text-align: center; padding: .6rem 1rem; font-size: .95rem; }

.note { background: var(--brand-wash); border: 1px solid var(--line); border-radius: var(--radius-small); padding: .8em 1em; color: var(--ink-soft); font-size: .95rem; }

/* --------------------------------------------------------------------------
   Archive and sitemap
   -------------------------------------------------------------------------- */
.archive { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; }
.archive__filters { position: sticky; top: 90px; background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; }
.archive__filters h2 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-light); margin: 0 0 .5rem; }
.archive__filters ul { list-style: none; margin: 0 0 1.3rem; padding: 0; }
.archive__filters ul ul { margin: .2rem 0 .5rem .8rem; }
.archive__filters a { display: block; padding: .25rem .5rem; border-radius: var(--radius-small); text-decoration: none; color: var(--ink); font-size: .93rem; }
.archive__filters a:hover { background: var(--brand-pale); }
.archive__filters a[aria-current] { background: var(--brand); color: var(--on-brand); }

.archive__month { margin-bottom: 2rem; }
.archive__month h2 { font-size: 1.2rem; padding-bottom: .4rem; border-bottom: 2px solid var(--brand-pale); }
.archive__month ul { list-style: none; margin: 0; padding: 0; }
.archive-row { display: flex; gap: 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.archive-row__media { flex: 0 0 96px; height: 64px; border-radius: var(--radius-small); overflow: hidden; background: var(--brand-pale); }
.archive-row__media img { width: 100%; height: 100%; object-fit: cover; }
.archive-row h3 { margin: .2rem 0 0; font-size: 1.02rem; }
.archive-row h3 a { text-decoration: none; color: var(--brand-dark); }
.archive-row h3 a:hover { color: var(--brand-bright); }

@media (max-width: 800px) {
    .archive { grid-template-columns: 1fr; }
    .archive__filters { position: static; }
    .archive__filters ul ul { display: none; }
    .archive__filters > ul { display: flex; flex-wrap: wrap; gap: .3rem; }
}

.sitemap { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.sitemap section { --tint: var(--brand-bright); background: var(--bg); border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow); border-top: 4px solid var(--tint); }
.sitemap ul { margin: 0; padding-left: 1.1em; }
.sitemap li { margin: .3em 0; }
.sitemap small { color: var(--ink-light); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 2rem 0 0; }
.pagination a, .pagination span {
    min-width: 2.5em; padding: .45em .8em; border-radius: 999px; text-align: center; text-decoration: none;
    background: var(--bg); box-shadow: var(--shadow); font-weight: 600;
}
.pagination a:hover { background: var(--brand-pale); }
.pagination [aria-current] { background: var(--brand); color: var(--on-brand); }

/* --------------------------------------------------------------------------
   Message pages (newsletter, 404)
   -------------------------------------------------------------------------- */
.message-page, .error-page { padding-top: 4rem; padding-bottom: 2rem; }
.error-page { text-align: center; }
.error-page__code {
    font-size: clamp(5rem, 18vw, 9rem); font-weight: 900; line-height: 1; margin: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-light)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page .button { margin: .3rem; }
.errors { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--radius-small); padding: .8em 1em .8em 2em; }
.empty { color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Footer and newsletter
   -------------------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 2rem; }
.site-footer a { color: var(--on-brand); }
.site-footer h2 { color: var(--on-brand); font-size: 1.15rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; padding-top: 3rem; padding-bottom: 2.5rem; }
.site-footer__newsletter p { margin-top: 0; }
.site-footer__links h2 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-light); margin-top: 0; }
.site-footer__links ul { list-style: none; padding: 0; margin: 0 0 1.5rem; columns: 2; }
.site-footer__links li { margin-bottom: .35rem; }
.site-footer__links a { text-decoration: none; color: var(--footer-ink); }
.site-footer__links a:hover { color: var(--on-brand); text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid var(--footer-line); padding-top: 1rem; padding-bottom: 1.5rem; font-size: .85rem; color: var(--footer-ink-light); }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.newsletter-form { display: grid; gap: .8rem; }
.newsletter-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.newsletter-form__email { grid-column: 1 / -1; }
.newsletter-form label > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.newsletter-form input[type="text"], .newsletter-form input[type="email"] {
    width: 100%; padding: .7em .9em; border: 1px solid var(--line); border-radius: var(--radius-small);
    font: inherit; color: var(--ink); background: var(--bg);
}
.newsletter-form input:focus { outline: 3px solid var(--brand-light); outline-offset: 0; border-color: var(--brand-bright); }
.newsletter-form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; line-height: 1.45; }
.newsletter-form__consent input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--brand-bright); flex: none; }
.newsletter-form .button { justify-self: start; }
.site-footer .newsletter-form .button { background: var(--accent); color: var(--accent-ink); }
.site-footer .newsletter-form .button:hover { background: var(--accent-hover); }
.message-page .newsletter-form label > span { color: var(--ink); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) { .newsletter-form__fields { grid-template-columns: 1fr; } }

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