/* ==========================================================================
   Bistro Sixty — Waupaca County Senior Nutrition Program
   Design system: "warm civic hospitality"
   Palette drawn from the two program logos (Bistro amber/gold + nutrition
   green). Tuned for an older audience: large type, high contrast, big tap
   targets, always-visible focus. Green anchors structure; amber signals
   action; red is reserved for required markers and errors.
   ========================================================================== */

:root {
    --green-900: #1c4a35;
    --green-700: #2f6b4a;
    --green-600: #3a7c58;
    --amber: #a85a17;          /* darkened from #b5651d so #fff text meets WCAG 4.5:1 */
    --amber-strong: #97501a;
    --amber-tint: #f6ead4;
    --amber-tint-2: #fbf4e6;
    --ink: #2b2622;
    --ink-soft: #5c534b;
    --page: #ece6da;
    --surface: #ffffff;
    --line: #e3dac9;           /* decorative hairlines/dividers only (contrast not required) */
    --control-border: #8f8064; /* form-control borders: >=3:1 vs white and page (WCAG 1.4.11) */
    --red: #b23a2e;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(43, 38, 34, .06), 0 6px 20px rgba(43, 38, 34, .07);
    --maxw: 880px;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", "Iowan Old Style", serif;
}

* { box-sizing: border-box; }

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

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

a { color: var(--amber-strong); }
a:hover { color: var(--amber); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }

/* --- Skip link ----------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Header -------------------------------------------------------------- */
.site-header {
    background: var(--green-900);
    color: #fdfaf3;
    border-bottom: 4px solid var(--amber);
}
.site-header__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    color: inherit;
}
.brand__logo-chip {
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    display: inline-flex;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.brand__logo-chip img { display: block; height: 54px; width: auto; border-radius: 6px; }
.brand__logo-chip--badge img { height: 60px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.brand__tagline { font-size: .82rem; color: #d9e6db; letter-spacing: .01em; }

/* --- Main + footer ------------------------------------------------------- */
.site-main__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}
.site-footer {
    background: var(--green-900);
    color: #e7efe8;
    margin-top: auto;
}
.site-footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    text-align: center;
}
.site-footer p { margin: .25rem 0; font-size: .95rem; }
.site-footer a { color: #f4d9b0; }
.site-footer__meta { color: #b9cdbd; font-size: .85rem; }

/* --- Step indicator ------------------------------------------------------ */
.steps { margin: 0 0 1.75rem; }
.steps__list {
    list-style: none;
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
    counter-reset: none;
}
.steps__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    position: relative;
    text-align: center;
    padding-top: .25rem;
}
.steps__item::before,
.steps__item::after {
    content: "";
    position: absolute;
    top: calc(.25rem + 21px);
    height: 3px;
    background: var(--line);
    width: 50%;
    z-index: 0;
}
.steps__item::before { left: 0; }
.steps__item::after { right: 0; }
.steps__item:first-child::before,
.steps__item:last-child::after { display: none; }
.steps__item--done::before,
.steps__item--done::after,
.steps__item--current::before { background: var(--green-600); }
.steps__marker {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--surface);
    border: 3px solid var(--control-border);
    color: var(--ink-soft);
}
.steps__item--done .steps__marker { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.steps__item--current .steps__marker { background: var(--amber); border-color: var(--amber); color: #fff; }
.steps__label { font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.steps__item--current .steps__label { color: var(--amber-strong); }
.steps__item--done .steps__label { color: var(--green-700); }

/* --- Hero ---------------------------------------------------------------- */
.hero { text-align: center; margin: 0 0 1.75rem; }
.hero--compact { margin-bottom: 1.25rem; }
.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 700;
    color: var(--amber-strong);
    margin: 0 0 .5rem;
}
.hero__title { font-size: 2.4rem; margin: 0 0 .5rem; }
.hero__year { font-weight: 700; color: var(--amber-strong); margin: 0 0 .5rem; font-size: 1.1rem; }
.hero__lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 44rem; margin: 0 auto; }

/* --- Cards --------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin: 0 0 1.5rem;
}
.card--accent { background: var(--amber-tint-2); border-color: var(--amber-tint); }
.card__title {
    font-size: 1.5rem;
    margin: 0 0 1.1rem;
    padding-left: .85rem;
    border-left: 5px solid var(--green-600);
}
.card p { margin: 0 0 1rem; }
.card p:last-child { margin-bottom: 0; }

/* --- Lists --------------------------------------------------------------- */
.bullets { margin: 0; padding-left: 1.4rem; }
.bullets li { margin: .5rem 0; }
.bullets--numbered { list-style: decimal; }

.steplist { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.steplist li { display: flex; gap: .9rem; align-items: flex-start; margin: .9rem 0; }
.steplist__num {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--amber-tint);
    color: var(--amber-strong);
    font-weight: 700;
    display: grid;
    place-items: center;
}

.policy-list { margin: 0; }
.policy-list__item { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.policy-list__item:last-child { border-bottom: none; }
.policy-list dt { font-weight: 700; color: var(--green-700); margin-bottom: .25rem; }
.policy-list dd { margin: 0; color: var(--ink); }

.guideline-list { margin: .75rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); }
.guideline-list li { margin: .3rem 0; }

.address-card {
    background: var(--amber-tint-2);
    border: 1px solid var(--amber-tint);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin: 0 0 1.5rem;
}
.address-card__label {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--amber-strong);
    margin: 0 0 .35rem;
}
.address-card address { font-style: normal; font-size: 1.1rem; }

.contrib-headline { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--green-700); }

.disclosure { font-size: .85rem; color: var(--ink-soft); margin: 1.5rem .25rem 0; line-height: 1.55; }
.closing { font-weight: 600; margin: 1.5rem .25rem 0; }
.muted { color: var(--ink-soft); }
.mt { margin-top: 1rem; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: .85rem 1.6rem;
    min-height: 52px;
    cursor: pointer;
    transition: background-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: default; }
.btn--lg { font-size: 1.15rem; padding: 1rem 2rem; min-height: 60px; }
.btn--primary { background: var(--amber); color: #fff; }
.btn--primary:hover { background: var(--amber-strong); color: #fff; }
.btn--secondary { background: #fff; color: var(--green-700); border-color: var(--green-600); }
.btn--secondary:hover { background: var(--green-700); color: #fff; }

.actions { margin: 1.75rem 0 0; }
.actions--center { display: flex; justify-content: center; }
.actions--wrap { flex-wrap: wrap; gap: .9rem 1rem; }
.actions-note { text-align: center; max-width: 40rem; margin: .9rem auto 0; font-size: .98rem; }
.actions--stack { display: flex; flex-direction: column; gap: .9rem; align-items: center; }
.actions--stack .btn { width: 100%; max-width: 34rem; }

/* --- Forms --------------------------------------------------------------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.5rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field__label { font-weight: 600; color: var(--ink); }
.required { color: var(--red); font-weight: 700; }

.input {
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--control-border);
    border-radius: var(--radius-sm);
    padding: .7rem .85rem;
    min-height: 50px;
    width: 100%;
}
.input:hover { border-color: #cdbfa6; }
select.input { cursor: pointer; }

.fieldset { border: none; margin: 1.5rem 0 0; padding: 0; }
.fieldset > .field__label,
.fieldset > legend { padding: 0; margin-bottom: .6rem; font-weight: 600; }

.subform {
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--amber-tint-2);
    border: 1px dashed var(--amber-tint);
    border-radius: var(--radius-sm);
}
.subform__title { font-weight: 700; color: var(--amber-strong); margin: 0 0 .9rem; }

/* Choice pills (radios/checkbox rows) */
.choices { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice, .checkbox {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .95rem;
    border: 2px solid var(--control-border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    min-height: 48px;
}
.checkbox { display: flex; width: 100%; margin: .55rem 0 0; align-items: flex-start; }
.checkbox--inline { display: inline-flex; width: auto; margin-top: 1rem; }
.choice input, .checkbox input { width: 22px; height: 22px; accent-color: var(--green-600); flex: none; margin-top: .1rem; }
.choice:hover, .checkbox:hover { border-color: var(--green-600); }
.choice:has(input:checked) { border-color: var(--green-600); background: #eef6f0; }
.checkbox:has(input:checked) { border-color: var(--green-600); background: #eef6f0; }
.choice--stacked { display: flex; width: 100%; margin: .55rem 0 0; }
.choice--chip { justify-content: center; min-width: 56px; padding: .6rem; }

.choice-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }

.field-radiogroup { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Validation */
.validation-message, .validation-errors {
    color: var(--red);
    font-size: .95rem;
    font-weight: 600;
}
.validation-errors { list-style: none; margin: .5rem 0 0; padding: 0; }
.input.invalid, .input.modified.invalid { border-color: var(--red); }

.notice {
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border: 1px solid;
}
.notice--error { background: #fbeceb; border-color: #e6bab4; color: #7c2820; }
.notice--warning { background: var(--amber-tint-2); border-color: var(--amber-tint); }
.notice--info { background: #eef6f0; border-color: var(--green-600); color: var(--ink); }
.notice--info a { color: var(--amber-strong); font-weight: 600; }
.notice h1 { margin-top: 0; }

.required-note { font-size: .95rem; margin: 0 0 1.25rem; }

/* --- Nutrition risk + score meter (signature element) -------------------- */
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .35rem 0;
}
.risk-item .checkbox { flex: 1; margin: 0; }
.risk-item__points {
    flex: none;
    font-weight: 700;
    color: var(--green-700);
    background: #eef6f0;
    border-radius: 999px;
    padding: .3rem .7rem;
    font-size: .9rem;
}

.score {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    background: var(--amber-tint-2);
    border: 1px solid var(--amber-tint);
}
.score__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .6rem; }
.score__label { font-weight: 700; font-size: 1.1rem; }
.score__value { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.score__meter {
    height: 16px;
    border-radius: 999px;
    background: #e7ddca;
    overflow: hidden;
}
.score__fill {
    height: 100%;
    border-radius: 999px;
    transition: width .3s ease, background-color .3s ease;
    background: var(--green-600);
}
.score[data-band="good"] .score__value { color: var(--green-700); }
.score[data-band="good"] .score__fill { background: var(--green-600); }
.score[data-band="moderate"] .score__value { color: var(--amber-strong); }
.score[data-band="moderate"] .score__fill { background: #a86a0e; }
.score[data-band="high"] .score__value { color: var(--red); }
.score[data-band="high"] .score__fill { background: var(--red); }
.score__readout { margin: .75rem 0 0; }

/* --- Confirmation -------------------------------------------------------- */
.confirm { text-align: center; margin: 1rem 0 2rem; }
.confirm__badge {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    display: grid;
    place-items: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 22px rgba(47, 107, 74, .35);
    animation: badge-pop .35s ease;
}
.confirm__badge svg { width: 46px; height: 46px; }
.confirm__title { font-size: 2.3rem; margin: 0 0 .5rem; }
.confirm__lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40rem; margin: 0 auto; }

@keyframes badge-pop {
    0% { transform: scale(.6); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Focus + motion ------------------------------------------------------ */
:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
    border-radius: 4px;
}
.input:focus-visible { outline-offset: 0; border-color: var(--amber); }

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

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 680px) {
    body { font-size: 17px; }
    .site-main__inner { padding: 1.5rem 1rem 2.5rem; }
    .card { padding: 1.25rem; }
    .hero__title { font-size: 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .choice-grid { grid-template-columns: repeat(4, 1fr); }
    .steps__label { font-size: .78rem; }
    .brand__name { font-size: 1.4rem; }
    .actions--center .btn { width: 100%; }
}

@media (max-width: 420px) {
    .choice-grid { grid-template-columns: repeat(3, 1fr); }
}
