/* =========================================================================
   Bethany Miller Tutoring — light theme, mobile-first
   Design notes:
   - Warm off-white background, deep forest green primary, gold accent
   - Generous whitespace, large readable type, high WCAG AA contrast
   - Mobile-first: base styles target small screens, larger via min-width
   - Touch targets >= 44px, focus visible, reduced-motion respected
   ========================================================================= */

:root {
    /* Color tokens — light theme only */
    --bg:           #faf7f2;
    --bg-alt:       #ffffff;
    --bg-soft:      #f1ebe0;
    --surface:      #ffffff;
    --border:       #e6dfd0;
    --border-soft:  #efe9dc;

    --primary:        #1f4e36;     /* forest green */
    --primary-hover:  #173b29;
    --primary-soft:   #e6efe8;
    --primary-tint:   #d8e6dc;

    --accent:         #b07a1f;     /* deeper gold for AA contrast on white */
    --accent-hover:   #8e6017;
    --accent-soft:    #f9efd9;

    --text:           #1c2622;     /* near-black with warm tint */
    --text-soft:      #4a544f;
    --text-muted:     #6c756f;
    --text-on-dark:   #faf7f2;

    --success:        #2f7d4e;
    --error:          #b3261e;

    /* Typography */
    --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing & layout */
    --container:    1180px;
    --gutter:       1.25rem;
    --radius-sm:    8px;
    --radius:       14px;
    --radius-lg:    22px;

    /* Shadows — soft, warm */
    --shadow-sm:    0 1px 2px rgba(28, 38, 34, 0.06);
    --shadow:       0 4px 14px rgba(28, 38, 34, 0.08);
    --shadow-lg:    0 18px 40px -12px rgba(28, 38, 34, 0.18);

    /* Motion */
    --ease:         cubic-bezier(.2, .7, .2, 1);
}

/* Force light scheme — explicit per request */
:root { color-scheme: light; }

/* ----- Reset & base ----- */
*,
*::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: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s var(--ease);
}
a:hover { color: var(--primary-hover); }

button { font: inherit; cursor: pointer; }

/* Focus ring — visible, accessible */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip jump for sticky header */
section[id] { scroll-margin-top: 90px; }

/* ----- Layout helpers ----- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

@media (min-width: 720px) {
    .container { padding: 0 2rem; }
}

.section {
    padding: 4rem 0;
}

@media (min-width: 720px) {
    .section { padding: 6rem 0; }
}

@media (min-width: 1024px) {
    .section { padding: 7rem 0; }
}

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

@media (min-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: start;
    }
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 .75rem;
}

h1 {
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

h1 em {
    font-style: italic;
    color: var(--primary);
    font-weight: 500;
}

h2 {
    font-size: clamp(1.6rem, 3.6vw, 2.4rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0;
}

@media (min-width: 720px) {
    h3 { font-size: 1.3rem; }
}

p { margin: 0 0 1rem; color: var(--text-soft); }
p.lead {
    font-size: 1.125rem;
    color: var(--text);
    line-height: 1.55;
    max-width: 38ch;
}
@media (min-width: 720px) {
    p.lead { font-size: 1.25rem; max-width: 44ch; }
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-soft);
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-on-dark);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--text-on-dark);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block { width: 100%; }

/* ----- Header / Nav ----- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: saturate(150%) blur(10px);
    -webkit-backdrop-filter: saturate(150%) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.site-header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text);
}
.brand:hover { color: var(--primary); }

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--text-on-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
}
.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .brand-tagline { display: none; }
}

/* Mobile nav toggle */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    gap: 5px;
    border-radius: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .25s var(--ease), opacity .15s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-nav a {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.97rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.site-nav a:hover { color: var(--primary); background: var(--primary-soft); }

.site-nav .nav-cta {
    background: var(--primary);
    color: var(--text-on-dark);
    margin-left: 0.5rem;
    padding: 0.6rem 1.2rem;
}
.site-nav .nav-cta:hover {
    background: var(--primary-hover);
    color: var(--text-on-dark);
}

/* Mobile nav */
@media (max-width: 819px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg);
        padding: 1.5rem var(--gutter) 2rem;
        gap: 0.25rem;
        transform: translateX(100%);
        transition: transform .3s var(--ease);
        border-top: 1px solid var(--border);
        overflow-y: auto;
        z-index: 49;
    }
    .site-nav.is-open { transform: translateX(0); }
    .site-nav a {
        width: 100%;
        padding: 1rem 0.75rem;
        font-size: 1.1rem;
        border-radius: 10px;
        flex: 0 0 auto;
    }
    .site-nav .nav-cta {
        margin: 0.5rem 0 0;
        justify-content: center;
    }
}

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

/* ----- Hero ----- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 4rem;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

@media (min-width: 720px) {
    .hero { padding: 5rem 0 6rem; }
}

@media (min-width: 1024px) {
    .hero { padding: 6rem 0 7rem; }
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero-bg svg { width: 100%; height: 100%; }

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 960px) {
    .hero-inner {
        grid-template-columns: 1.15fr 1fr;
        gap: 4rem;
    }
}

.hero-content { max-width: 640px; }

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.75rem 0 2.5rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}
.hero-stats li {
    display: flex;
    flex-direction: column;
}
.hero-stats strong {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 600;
    line-height: 1;
}
.hero-stats span {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Hero card (right side) */
.hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}
.card-stripe {
    height: 8px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}
.card-body { padding: 1.75rem; }

@media (min-width: 720px) {
    .card-body { padding: 2.25rem; }
}

.card-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.check-list li {
    position: relative;
    padding-left: 1.75rem;
    color: var(--text);
    font-size: 0.95rem;
}
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ----- Trust strip ----- */
.trust-strip {
    background: var(--bg-alt);
    padding: 2rem 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.trust-label {
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.trust-strip ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 2rem;
}
.trust-strip li {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ----- About ----- */
.section-about { background: var(--bg); }

.section-text p { color: var(--text-soft); font-size: 1.02rem; }

.credential-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

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

.credential {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
}
.credential-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.credential-value {
    font-weight: 600;
    color: var(--text);
    font-size: 0.97rem;
    line-height: 1.4;
}
.credential-value small {
    display: block;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.quote-card {
    position: relative;
    background: var(--primary);
    color: var(--text-on-dark);
    padding: 2.25rem 1.75rem 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 1rem;
}

@media (min-width: 720px) {
    .quote-card { padding: 2.75rem 2.25rem 2rem; }
}

@media (min-width: 900px) {
    .quote-card { margin-top: 3rem; position: sticky; top: 100px; }
}

.quote-mark {
    width: 36px;
    height: 36px;
    color: var(--accent-soft);
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.quote-card p {
    color: var(--text-on-dark);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.45;
    margin-bottom: 1rem;
}

.quote-card footer {
    color: var(--accent-soft);
    font-size: 0.92rem;
    font-weight: 500;
    opacity: 0.85;
}

/* ----- Services ----- */
.section-services { background: var(--bg-alt); }

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

@media (min-width: 600px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-tint);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.service-icon svg { width: 24px; height: 24px; }

.service-grade {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.service-card p:last-child { margin: 0; font-size: 0.97rem; }

.services-note {
    margin-top: 2.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.97rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ----- Approach (steps) ----- */
.section-approach {
    background: var(--bg);
    background-image:
        radial-gradient(circle at 80% 0%, var(--primary-soft) 0%, transparent 35%),
        radial-gradient(circle at 0% 100%, var(--accent-soft) 0%, transparent 30%);
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    counter-reset: step;
}

@media (min-width: 700px) {
    .steps { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (min-width: 1000px) {
    .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.step-num {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
}

.steps h3 { margin-bottom: 0.5rem; }
.steps p { font-size: 0.95rem; margin: 0; }

/* ----- Contact ----- */
.section-contact {
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-soft) 100%);
}

.contact-grid {
    align-items: start;
}

.contact-points {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.contact-points li {
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-size: 0.95rem;
}
.contact-points strong { color: var(--text); }

/* Form */
.contact-form {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-soft);
}

@media (min-width: 720px) {
    .contact-form { padding: 2.5rem; }
}

.form-row {
    margin-bottom: 1.25rem;
    border: 0;
    padding: 0;
    min-width: 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 540px) {
    .form-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Field labels — scoped to direct children so .checkbox/.radio labels keep their flex layout */
.form-row > label,
.form-row > legend,
.form-grid-2 > div > label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    margin-bottom: 0.45rem;
}
.form-row > legend { margin-bottom: 0.7rem; padding: 0; }

.form-row > label small,
.form-row > legend small,
.form-grid-2 > div > label small {
    font-weight: 400;
    color: var(--text-muted);
}

.req { color: var(--accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--text);
    transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.5;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231c2622' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-tint);
}

/* Only show error styling after JS-driven validation marks it.
   Avoids the :invalid trap of empty-required-fields-on-load. */
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: var(--error);
    background: #fdf6f5;
}

/* checkboxes / radios — custom-styled for consistent cross-browser look */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}
@media (min-width: 480px) {
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
}

.checkbox,
.radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    min-height: 52px;
    line-height: 1.3;
    user-select: none;
    -webkit-user-select: none;
}
.checkbox:hover,
.radio:hover {
    border-color: var(--primary-tint);
    background: var(--surface);
}

/* Custom-styled native input — replaces browser default */
.checkbox input[type="checkbox"],
.radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: background .15s var(--ease), border-color .15s var(--ease);
    position: relative;
    top: 0;
}

.checkbox input[type="checkbox"] { border-radius: 5px; }
.radio input[type="radio"]       { border-radius: 50%; }

/* Checked state — checkbox: filled with white check */
.checkbox input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

/* Checked state — radio: filled green dot inside ring */
.radio input[type="radio"]:checked {
    border-color: var(--primary);
    background: radial-gradient(circle, var(--primary) 0 5px, var(--surface) 6px 100%);
}

/* Label tile when its input is checked */
.checkbox:has(input:checked),
.radio:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.checkbox:has(input:checked) span,
.radio:has(input:checked) span {
    color: var(--primary);
    font-weight: 600;
}

/* Focus ring for the custom inputs */
.checkbox input[type="checkbox"]:focus-visible,
.radio input[type="radio"]:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.radio-row .radio {
    flex: 1 1 0;
    min-width: 110px;
    justify-content: center;
}

/* Cloudflare Turnstile widget container */
.turnstile-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.turnstile-row .cf-turnstile {
    min-height: 65px;
}

/* honeypot — visually hidden but interactable for bots */
.honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Submit button + state */
#submitBtn {
    margin-top: 0.5rem;
    position: relative;
}
#submitBtn[disabled] {
    opacity: 0.7;
    cursor: wait;
}
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
#submitBtn.is-loading .btn-label { opacity: 0.6; }
#submitBtn.is-loading .btn-spinner { display: inline-block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-disclaimer {
    font-size: 0.83rem;
    color: var(--text-muted);
    text-align: center;
    margin: 1rem 0 0;
}

.form-status {
    margin-top: 1rem;
    padding: 0;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: 1.5;
}
.form-status:empty { display: none; }
.form-status.is-success {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 1rem 1.25rem;
    font-weight: 500;
    border: 1px solid var(--primary-tint);
}
.form-status.is-error {
    background: #fdeceb;
    color: var(--error);
    padding: 1rem 1.25rem;
    border: 1px solid #f5c6c2;
}

/* ----- Footer ----- */
.site-footer {
    background: var(--text);
    color: var(--text-on-dark);
    padding: 3rem 0 2rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    align-items: center;
}

@media (min-width: 720px) {
    .footer-inner {
        grid-template-columns: 1fr auto 1fr;
        text-align: left;
    }
    .footer-inner > :last-child { text-align: right; }
    .footer-inner > nav { text-align: center; }
}

.footer-inner .brand-mark {
    margin: 0 auto 0.75rem;
    background: var(--bg);
    color: var(--primary);
}
@media (min-width: 720px) {
    .footer-inner .brand-mark { margin: 0 0 0.75rem; }
}

.footer-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-on-dark);
}
.footer-meta {
    color: rgba(250, 247, 242, 0.6);
    font-size: 0.88rem;
    margin: 0.25rem 0 0;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.footer-inner nav a {
    color: rgba(250, 247, 242, 0.8);
    font-size: 0.95rem;
    padding: 0.5rem;
}
.footer-inner nav a:hover { color: var(--text-on-dark); }

.footer-copy {
    color: rgba(250, 247, 242, 0.55);
    font-size: 0.85rem;
    margin: 0;
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
