/* SME Relief Foundation - one stylesheet, phone first. */
:root {
    --blue: #1a2580;
    --blue-2: #2b3bd0;
    --blue-3: #e8ebff;
    --ink: #151936;
    --text: #2e3350;
    --muted: #636a8c;
    --gold: #f5a81c;
    --gold-2: #ffd27a;
    --paper: #f7f5ef;
    --card: #ffffff;
    --line: #e2dfd4;
    --ok: #12703f;
    --bad: #a3271f;
    --r: 14px;
    --wrap: 1120px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; background: var(--paper); color: var(--text);
    font: 17px/1.65 var(--sans);
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-2); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
    font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform .12s ease, background .12s ease, color .12s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-2); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); color: var(--ink); }
.btn-line { border-color: currentColor; color: var(--blue); background: transparent; }
.btn-line:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.25em; }

/* Header */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: block; flex: 0 0 auto; margin-right: auto; }
.brand img { width: 190px; }
.nav { display: none; }
.top-donate { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.burger { position: static; }
.burger summary {
    list-style: none; width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px;
}
.burger summary::-webkit-details-marker { display: none; }
.burger summary span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .15s ease, opacity .15s ease; }
.burger[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[open] summary span:nth-child(2) { opacity: 0; }
.burger[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer {
    position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; max-height: calc(100vh - 64px - 64px); overflow-y: auto;
    box-shadow: 0 18px 30px rgba(21, 25, 54, .12);
}
.drawer-group { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.drawer a { text-decoration: none; color: var(--text); padding: 6px 0; }
.drawer .drawer-head { flex: 1 0 100%; font: 700 1.1rem var(--serif); color: var(--ink); }
.drawer a[aria-current] { color: var(--blue-2); font-weight: 600; }
.drawer .btn { margin-top: 16px; width: 100%; color: var(--ink); }

/* Bottom tab bar (phones) */
.tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
    background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 60px; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; text-align: center;
}
.tabs svg { width: 22px; height: 22px; fill: currentColor; }
.tabs a[aria-current] { color: var(--blue-2); }

/* Hero (home) */
.hero { background: var(--blue); color: #dfe3ff; overflow: hidden; position: relative; }
.hero::before {
    content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%;
    border: 90px solid rgba(255, 255, 255, .055); right: -420px; top: -520px; pointer-events: none;
}
.hero-in { position: relative; padding: 40px 16px 44px; display: grid; gap: 32px; }
.eyebrow {
    display: block; font: 600 .78rem/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase;
    color: var(--gold-2); margin-bottom: 14px;
}
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero h1 em { font-style: italic; color: var(--gold-2); }
.hero p.lead { font-size: 1.15rem; max-width: 34em; }
.hero .btn-line { color: #fff; }
.hero .btn-line:hover { background: #fff; color: var(--blue); border-color: #fff; }
.hero-photos { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.hero-photos .tall { grid-row: span 2; aspect-ratio: 3 / 4; }
.hero-photos .wide { aspect-ratio: 3 / 2; }

/* Page head (inner pages) */
.page-head { background: var(--blue); color: #dfe3ff; position: relative; overflow: hidden; }
.page-head::before {
    content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .055); right: -220px; top: -330px;
}
.page-head .wrap { position: relative; padding-top: 30px; padding-bottom: 34px; }
.page-head h1 { color: #fff; margin: 0 0 .25em; font-size: clamp(1.9rem, 5.5vw, 2.8rem); }
.page-head p { margin: 0; max-width: 40em; font-size: 1.08rem; }
.crumbs { font-size: .85rem; margin-bottom: 12px; }
.crumbs a { color: var(--gold-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Sections */
.sec { padding: 44px 0; }
.sec-alt { background: #fff; border-block: 1px solid var(--line); }
.sec-head { max-width: 42em; margin-bottom: 24px; }
.sec-head p { color: var(--muted); }
.prose { max-width: 44em; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child, .eyebrow + h2 { margin-top: 0; }
.lead { font-size: 1.15rem; }
.quote {
    font: italic 1.3rem/1.5 var(--serif); color: var(--ink); border-left: 4px solid var(--gold);
    padding: 4px 0 4px 18px; margin: 1.4em 0;
}
.layout { display: grid; gap: 32px; }
.layout > * { min-width: 0; }
.split { display: grid; gap: 32px; }
.split > * { min-width: 0; }

/* Cards */
.grid { display: grid; gap: 16px; }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px;
    display: flex; flex-direction: column; gap: 6px;
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text); }
.card .more { margin-top: auto; padding-top: 10px; font-weight: 600; text-decoration: none; }
.card .more::after { content: " \2192"; }
a.card { text-decoration: none; color: inherit; transition: border-color .12s ease, transform .12s ease; }
a.card:hover { border-color: var(--blue-2); transform: translateY(-2px); }
.card-num { font: 700 .8rem var(--sans); letter-spacing: .08em; color: var(--blue-2); text-transform: uppercase; }
.card-photo { padding: 0; overflow: hidden; }
.card-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-photo .card-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts div { background: #fff; padding: 18px; }
.facts b { display: block; font: 700 1.5rem/1.1 var(--serif); color: var(--blue); }
.facts span { font-size: .9rem; color: var(--muted); }

/* Side menu on inner pages */
.side { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; align-self: start; }
.side h2 { font: 700 .78rem var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 10px 12px 6px; }
.side a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--text); font-weight: 500; }
.side a:hover { background: var(--blue-3); }
.side a[aria-current] { background: var(--blue); color: #fff; }

/* Lists */
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: .6em; }
.ticks li::before {
    content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
    background: var(--blue-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.300l2.600 2.600L13 6.500' fill='none' stroke='%232b3bd0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.defs { display: grid; gap: 12px; padding: 0; margin: 0 0 1em; list-style: none; counter-reset: d; }
.defs li { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 16px 58px; position: relative; margin: 0; counter-increment: d; }
.defs li::before {
    content: counter(d, decimal-leading-zero); position: absolute; left: 16px; top: 16px;
    font: 700 1rem var(--serif); color: var(--blue-2);
}
.defs b { display: block; color: var(--ink); }
.reasons { list-style: none; padding: 0; display: grid; gap: 10px; }
.reasons li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin: 0; font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; margin-bottom: 1.2em; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font: 700 .78rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: #fbfaf6; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
th.num { text-align: right; }
.stars { color: var(--gold); letter-spacing: 2px; }

/* Band */
.band { background: var(--ink); color: #d5d8ee; }
.band .wrap { padding-top: 44px; padding-bottom: 44px; display: grid; gap: 20px; }
.band h2 { color: #fff; margin: 0 0 .3em; }
.band p { margin: 0; max-width: 38em; }
.band .btn-line { color: #fff; }
.band .btn-line:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery figcaption { padding: 10px 12px; font-size: .88rem; color: var(--muted); }
video { width: 100%; max-width: 560px; aspect-ratio: 3 / 2; border-radius: var(--r); background: #000; display: block; }

/* Downloads */
.files { list-style: none; padding: 0; display: grid; gap: 10px; }
.files li { margin: 0; }
.files a {
    display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 600;
}
.files a:hover { border-color: var(--blue-2); }
.files .ext { flex: 0 0 auto; font: 700 .7rem var(--sans); letter-spacing: .06em; background: var(--blue-3); color: var(--blue); border-radius: 6px; padding: 6px 8px; }
.files small { display: block; font-weight: 400; color: var(--muted); }

/* Form */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; scroll-margin-top: 84px; }
.form-card h2 { font-size: 1.4rem; }
.form-intro { color: var(--muted); }
.fields { display: grid; gap: 14px; margin-bottom: 18px; }
.f { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.f .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
    font: 400 1rem/1.4 var(--sans); color: var(--ink); background: #fff; width: 100%;
    border: 1.5px solid #c9c5b6; border-radius: 10px; padding: 12px 14px; min-height: 48px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue-2); box-shadow: 0 0 0 3px var(--blue-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.note-ok { background: #e4f5ea; color: var(--ok); }
.note-bad { background: #fbe9e7; color: var(--bad); }
.form-foot { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.form-card .btn { width: 100%; }

/* Contact */
.contact-list { display: grid; gap: 12px; }
.contact-list .card h3 { font: 700 .78rem var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.contact-list .card p, .contact-list .card a { font-size: 1.05rem; color: var(--ink); }
.contact-list .card a { color: var(--blue-2); font-weight: 600; }

/* Footer */
.foot { background: #fff; border-top: 1px solid var(--line); font-size: .95rem; }
.foot-grid { display: grid; gap: 26px; padding-top: 36px; padding-bottom: 28px; grid-template-columns: repeat(2, 1fr); }
.foot-about, .foot-contact { grid-column: 1 / -1; }
.foot h2 { font: 700 .78rem var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.foot nav a { display: block; padding: 4px 0; text-decoration: none; color: var(--text); }
.foot nav a:hover, .foot-contact a:hover { color: var(--blue-2); text-decoration: underline; }
.foot-name { font: 700 1.25rem var(--serif); color: var(--ink); margin-bottom: .3em; }
.foot-reg { color: var(--muted); font-size: .88rem; }
.foot-contact a { color: var(--text); }
.foot-base { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 20px; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; }
.foot-base p { margin: 0; }

/* 404 */
.lost { text-align: center; padding: 70px 0; }

/* Tablets and up */
@media (min-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .facts { grid-template-columns: repeat(4, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .fields { grid-template-columns: repeat(2, 1fr); }
    .f-w { grid-column: 1 / -1; }
    .f-s { grid-column: 1 / 2; max-width: 160px; }
    .f-s + .f { grid-column: 1 / 2; }
    .form-card { padding: 30px; }
    .form-card .btn { width: auto; }
    .foot-grid { grid-template-columns: repeat(3, 1fr); }
    .reasons { grid-template-columns: repeat(2, 1fr); }
    .band .wrap { grid-template-columns: 1fr auto; align-items: center; }
    .contact-list { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 980px) {
    body { padding-bottom: 0; font-size: 18px; }
    .tabs, .burger { display: none; }
    .top-in { min-height: 76px; gap: 20px; }
    .brand img { width: 230px; }
    .nav { display: block; }
    .nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
    .nav li { margin: 0; position: relative; }
    .nav a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; white-space: nowrap; }
    .nav a:hover { background: var(--blue-3); color: var(--blue); }
    .nav > ul > li > a[aria-current] { color: var(--blue-2); box-shadow: inset 0 -2px 0 var(--blue-2); border-radius: 9px 9px 0 0; }
    .nav .sub {
        list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 230px;
        background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 34px rgba(21, 25, 54, .14);
        opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease, visibility .12s;
    }
    .nav li:hover > .sub, .nav li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
    .nav .sub a { font-weight: 500; }
    .nav .sub a[aria-current] { background: var(--blue-3); color: var(--blue); }
    .top-donate { min-height: 44px; padding: 0 22px; }
    .hero-in { grid-template-columns: 1.05fr .95fr; align-items: center; padding-top: 72px; padding-bottom: 76px; gap: 56px; }
    .sec { padding: 72px 0; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .layout { grid-template-columns: 250px 1fr; gap: 56px; }
    .layout .side { position: sticky; top: 100px; }
    .layout-form { grid-template-columns: 1fr 440px; }
    .layout-form .form-card { position: sticky; top: 100px; align-self: start; }
    .split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
    .split-top { align-items: start; }
    .gallery { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.3fr; }
    .foot-about, .foot-contact { grid-column: auto; }
    .page-head .wrap { padding-top: 48px; padding-bottom: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
