/* ─────────────────────────────────────────────────────────────
   Don't Cage Me In — Site Styles (clean rewrite)
   Buttons: default light background + dark blue text (footer style)
   ───────────────────────────────────────────────────────────── */

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

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: #0f1115;
    color: #e9eef7;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

img,
picture,
video,
canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Links (don’t touch .btn) */
a:not(.btn) {
    color: #69d2ff;
    text-decoration: none;
}

a:not(.btn):hover {
    text-decoration: underline;
}

/* ---------- Theme Vars ---------- */
:root {
    --panel: #151923;
    --panel-2: #1b2030;
    --text: #e9eef7;
    --muted: #9fb0c2;
    --brand: #69d2ff;
    --brand-2: #7ef7b4;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius: 14px;

    /* Button palette (footer style) */
    --btn-bg: #e8f3ff;
    /* light */
    --btn-bg-hover: #dff0ff;
    /* light hover */
    --btn-text: #0b3d91;
    /* dark blue text */
    --btn-border: #bcd9ff;
    /* soft blue border */
}

.wrap {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 4vw;
}

.small {
    font-size: .9rem;
}

.muted {
    color: var(--muted);
}

.sub {
    color: var(--muted);
    margin-top: .25rem;
}

.note {
    color: var(--brand-2);
}

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: #000;
    color: #fff;
    padding: .5rem .75rem;
    border-radius: 8px;
    z-index: 9999;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(160%) blur(10px);
    background: linear-gradient(180deg, rgba(15, 17, 21, .9), rgba(15, 17, 21, .6));
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-block: .6rem;
}

.brand {
    font-weight: 800;
    letter-spacing: .2px;
    color: #fff;
}

.brand span {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--muted);
    margin-top: -4px;
}

.nav-toggle {
    margin-left: auto;
    font-size: 1.4rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, .15);
    color: var(--text);
    border-radius: 10px;
    padding: .35rem .6rem;
    cursor: pointer;
}

.nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: .25rem;
    padding: .6rem 4vw .8rem;
    background: #0e121a;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav.open {
    display: flex;
}

.nav a {
    padding: .6rem .7rem;
    border-radius: 8px;
    color: var(--text);
}

.nav a:hover {
    background: rgba(255, 255, 255, .06);
    text-decoration: none;
}

@media (min-width:900px) {
    .nav-toggle {
        display: none;
    }

    .nav {
        position: static;
        display: flex;
        flex-direction: row;
        gap: .5rem;
        background: transparent;
        border: none;
        padding: 0;
        margin-left: auto;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 60vh;
    display: grid;
}

.hero img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    filter: brightness(.65) saturate(120%);
}

.hero-text {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 1rem;
}

.hero h1 {
    font-size: clamp(1.6rem, 5vw, 3rem);
    margin: 0 0 .2rem;
}

.hero p {
    max-width: 60ch;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

.hero-paragraph {
    display: block;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-top: 1rem;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .8);
}

/* ---------- Buttons (Unified, clean) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .6rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--btn-border);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: var(--btn-bg);
    color: var(--btn-text);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    transition: background .15s, box-shadow .15s, transform .05s, color .15s, border-color .15s;
}

.btn:hover,
.btn:focus {
    background: var(--btn-bg-hover);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

/* Ghost/outline option */
.btn.ghost {
    background: #e8f3ff;
    /* same light bg */
    border: 1px solid #bcd9ff;
    color: #0b3d91;
}

.btn.ghost:hover,
.btn.ghost:focus {
    background: #dff0ff;
    color: #0b3d91;
}

/* Header donate CTA uses gradient but keeps readable text */
.donate-cta {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1px solid var(--btn-border);
    font-weight: 700;
    border-radius: 8px;
    padding: .55rem .9rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.donate-cta:hover,
.donate-cta:focus {
    background: var(--btn-bg-hover);
    color: var(--btn-text);
}

/* Branded payment variants */
.btn--cashapp {
    background: #00d632;
    color: #fff;
    border: none;
}

.btn--cashapp:hover {
    background: #06c635;
}

.btn--paypal {
    background: linear-gradient(90deg, #003087 0%, #009cde 100%);
    color: #fff;
    border: none;
}

.btn--paypal:hover {
    filter: brightness(1.05);
}

.btn--chewy {
    background: #1c49c2;
    color: #fff;
    border: none;
}

.btn--chewy:hover {
    background: #1a43b2;
}

/* Brand button fixes: keep brand colors on hover */
.btn--paypal,
.btn--paypal:hover,
.btn--paypal:focus {
    background: linear-gradient(90deg, #003087 0%, #009cde 100%) !important;
    color: #fff !important;
    border: none !important;
}

.btn--cashapp,
.btn--cashapp:hover,
.btn--cashapp:focus {
    background: #00d632 !important;
    color: #fff !important;
    border: none !important;
}

.btn--chewy,
.btn--chewy:hover,
.btn--chewy:focus {
    background: #1c49c2 !important;
    color: #fff !important;
    border: none !important;
}

/* Floating donate pill */
.float-donate {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    border: none;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #001018;
    font-weight: 800;
    padding: .8rem 1rem;
    border-radius: 999px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

/* ---------- Sections ---------- */
.section {
    padding: clamp(2rem, 4vw, 4rem) 0;
}

.section.alt {
    background: var(--panel);
}

.section.highlight {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.grid2 {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width:860px) {
    .grid2 {
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
    }
}

/* ---------- Cards / Lists ---------- */
.card {
    background: #0e121a;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card.photo img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.ticks {
    list-style: none;
    padding: 0;
    margin: .8rem 0 0;
}

.ticks li {
    padding-left: 1.4rem;
    background: linear-gradient(90deg, var(--brand), var(--brand-2)) left .55rem/1rem .35rem no-repeat;
    margin: .4rem 0;
}

.steps {
    padding-left: 1.1rem;
}

.steps li {
    margin: .6rem 0;
}

/* ---------- Gallery ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* ---------- Donate grid ---------- */
.donation-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width:860px) {
    .donation-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.needs-list {
    margin: 0;
    padding-left: 1.1rem;
}

.needs-list li {
    margin: .4rem 0;
}

/* ---------- Footer ---------- */
footer.site-footer .wrap {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    text-align: center;
}

footer.site-footer {
    padding: 2rem 1rem;
}

footer.site-footer .wrap p {
    margin: 0;
}

footer.site-footer .small {
    font-size: .95rem;
}

footer.site-footer .muted {
    opacity: .75;
}

/* ---------- Misc ---------- */
.hero-actions .btn,
.donate-cta,
.float-donate {
    will-change: transform;
}

.wrap,
p,
li,
figcaption {
    overflow-wrap: anywhere;
}

/* ── Articles hub ───────────────────────────────────────────── */
#articles .sub {
    opacity: .9;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width:700px) {
    .article-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width:1000px) {
    .article-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.article.card {
    overflow: hidden;
    border-radius: .8rem;
}

.article .thumb {
    aspect-ratio: 1200 / 630;
    /* lock to OG ratio */
    background-size: contain;
    /* show full image */
    background-repeat: no-repeat;
    background-position: center;
    border-top-left-radius: .8rem;
    border-top-right-radius: .8rem;
    background-color: #000;
    /* filler behind image */
}

.article .content {
    padding: 1rem;
}

.article h3 {
    margin: .2rem 0 .4rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.article .meta {
    margin: .2rem 0 .6rem;
    opacity: .85;
}

.pill {
    display: inline-block;
    font-size: .72rem;
    line-height: 1;
    padding: .25rem .45rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    margin-right: .35rem;
}

.article .excerpt {
    opacity: .9;
    min-height: 2.25em;
}

.article .actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
}

/* Safety: hide any <img> inside Articles (cards use background images) */
#articles img,
#articles .card img {
    display: none !important;
}

/* “Load more” slot */
.articles-more {
    text-align: center;
    margin-top: 1.1rem;
}

/* Modal (future quick view hooks) */
.article-modal[hidden] {
    display: none;
}

.article-modal .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.article-modal .modal-dialog {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    top: 10vh;
    max-width: 860px;
    margin: 0 auto;
    background: #121933;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .8rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}

@media (min-width:900px) {
    .article-modal .modal-dialog {
        left: 0;
        right: 0;
    }
}

.article-modal .modal-content {
    padding: 1rem 1.1rem 1.25rem;
}

.article-modal .modal-close {
    position: absolute;
    top: .4rem;
    right: .5rem;
    background: transparent;
    color: inherit;
    border: 0;
    font-size: 1.6rem;
    cursor: pointer;
}

.modal-body p {
    opacity: .9;
}

/* “5‑Star” badge readability */
.badge {
    background: #ffcc00;
    color: #000;
    border: 0;
    border-radius: 999px;
    padding: .25rem .6rem;
    font-size: .85rem;
    font-weight: 700;
}

/* Brand rows in articles */
.brand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    /* title, badge, button */
    align-items: center;
    gap: .75rem;
}

@media (max-width:560px) {
    .brand-row {
        grid-template-columns: 1fr;
    }

    .brand-row .btn {
        width: 100%;
    }
}

/* Ensure Amazon/yellow accent buttons stay high contrast */
.btn-accent {
    background: #ffcc00;
    color: #000 !important;
    border: 0;
}

/* High-contrast body links, but never affect buttons */
main a:not(.btn):link,
main a:not(.btn):visited {
    color: #ffffff;
    text-decoration: underline;
}

main a:not(.btn):hover,
main a:not(.btn):focus {
    color: #ffcc00;
    text-decoration: none;
}
