/* ===========================================================
   40weeks.com — base.css
   The foundation: reset, typography, layout primitives, cards,
   buttons, forms, nav, utilities. Palette + type live in theme.css.
   =========================================================== */

:root {
    --fw-primary:         #3A5A40;
    --fw-primary-hover:   #2D4732;
    --fw-accent:          #E8A6B5;
    --fw-accent-light:    #F6D8DF;
    --fw-butter:          #F3CB6D;
    --fw-oat:             #D9C7A8;
    --fw-oat-light:       #EDE3D1;
    --fw-bg:              #F7EFE3;
    --fw-bg-card:         #FFFBF4;
    --fw-text:            #2A2622;
    --fw-text-muted:      #6A645E;
    --fw-text-heading:    var(--fw-primary);
    --fw-border:          rgba(191, 168, 130, 0.30);
    --fw-border-soft:     rgba(191, 168, 130, 0.15);

    --fw-font-heading:    'Fraunces', Georgia, 'Times New Roman', serif;
    --fw-font-body:       'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --fw-font-accent:     'Caveat', cursive;

    --fw-content-width:   72rem;
    --fw-content-narrow:  44rem;
    --fw-body-size:       1.0625rem;
    --fw-body-leading:    1.7;

    --fw-radius-sm:       12px;
    --fw-radius:          20px;
    --fw-radius-lg:       28px;
    --fw-radius-pill:     999px;

    --fw-shadow-sm:       0 2px 0 rgba(58,90,64,.04), 0 4px 12px rgba(58,90,64,.06);
    --fw-shadow:          0 2px 0 rgba(58,90,64,.05), 0 12px 28px rgba(58,90,64,.10), inset 0 0 0 1px rgba(191,168,130,.12);
    --fw-shadow-lg:       0 4px 0 rgba(58,90,64,.06), 0 24px 52px rgba(58,90,64,.14);

    --fw-space-1:  .25rem;
    --fw-space-2:  .5rem;
    --fw-space-3:  .75rem;
    --fw-space-4:  1rem;
    --fw-space-5:  1.5rem;
    --fw-space-6:  2rem;
    --fw-space-7:  3rem;
    --fw-space-8:  4.5rem;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
    font-family: var(--fw-font-body);
    font-size: var(--fw-body-size);
    line-height: var(--fw-body-leading);
    color: var(--fw-text);
    background: var(--fw-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }

a {
    color: var(--fw-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .15s;
}
a:hover { color: var(--fw-primary-hover); }

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--fw-font-heading);
    font-weight: 500;
    color: var(--fw-text-heading);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); font-weight: 400; }
h2 { font-size: clamp(1.75rem, 2.5vw + .75rem, 2.5rem); }
h3 { font-size: clamp(1.375rem, 1.25vw + .75rem, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.0625rem; font-weight: 600; }
h6 { font-size: .9375rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fw-text-muted); }

p { margin-block-end: 1.125em; }
p:last-child { margin-block-end: 0; }

.lead { font-size: 1.125rem; color: var(--fw-text-muted); }
.caveat { font-family: var(--fw-font-accent); font-size: 1.25em; }

::selection { background: var(--fw-accent-light); color: var(--fw-text); }

/* ─── Layout primitives ─────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--fw-content-width);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
}
.container--narrow { max-width: var(--fw-content-narrow); }

.section { padding-block: var(--fw-space-8); }
.section--tight { padding-block: var(--fw-space-7); }

main { flex: 1; }

/* ─── Skip link ─────────────────────────────────────────── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--fw-primary);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 0 0 var(--fw-radius-sm) 0;
    z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ─── Site header / nav ─────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247, 239, 227, .82);
    backdrop-filter: saturate(150%) blur(10px);
    -webkit-backdrop-filter: saturate(150%) blur(10px);
    border-bottom: 1px solid var(--fw-border-soft);
}
.navbar-container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    width: 100%; max-width: var(--fw-content-width);
    margin-inline: auto; padding: .875rem clamp(1rem, 3vw, 2rem);
}
.navbar-brand {
    display: inline-flex; align-items: center; gap: .625rem;
    text-decoration: none; color: var(--fw-text);
    font-weight: 700; font-size: 1.125rem;
}
.navbar-brand:hover { color: var(--fw-text); }
.brand-wool {
    display: inline-block; width: 28px; height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 34%, #fff 0 2px, transparent 2.5px),
        radial-gradient(circle at 68% 34%, #fff 0 2px, transparent 2.5px),
        radial-gradient(120% 120% at 30% 30%, #F6D8DF 0%, #E8A6B5 55%, #D98FA1 100%);
    box-shadow: 0 2px 0 rgba(58,90,64,.08), 0 6px 14px rgba(232,166,181,.45);
}
.brand-name { font-family: var(--fw-font-heading); font-weight: 500; }
.brand-tld { color: var(--fw-primary); font-weight: 400; }

.nav-list {
    list-style: none; padding: 0;
    display: flex; align-items: center; gap: 1.25rem;
}
.nav-list a {
    color: var(--fw-text); text-decoration: none;
    font-weight: 600; font-size: .9375rem;
    padding: .375rem .25rem; position: relative;
}
.nav-list a:hover { color: var(--fw-primary); }
.nav-list a.active::after {
    content: ''; position: absolute; left: .25rem; right: .25rem; bottom: -.125rem;
    height: 3px; border-radius: 2px; background: var(--fw-accent);
}

.navbar-toggler {
    display: none;
    background: transparent; border: 0; padding: .5rem;
    cursor: pointer;
}
.toggler-bar {
    display: block; width: 24px; height: 2px; background: var(--fw-text);
    border-radius: 2px; margin: 5px 0;
}

@media (max-width: 768px) {
    .navbar-toggler { display: inline-block; }
    .nav-list {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--fw-bg); border-bottom: 1px solid var(--fw-border-soft);
        padding: .5rem 1rem 1rem;
    }
    .nav-list.is-open { display: flex; }
    .nav-list a { padding: .75rem .5rem; border-bottom: 1px solid var(--fw-border-soft); }
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn-wool {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--fw-accent); color: var(--fw-text);
    border: 0; border-radius: var(--fw-radius-pill);
    padding: .75rem 1.75rem;
    font-weight: 700; font-size: 1rem; text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(232,166,181,.45), inset 0 -3px 0 rgba(0,0,0,.04);
    transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
}
.btn-wool:hover { background: #DB92A3; color: var(--fw-text); }
.btn-wool:active {
    transform: translateY(2px) scale(.99);
    box-shadow: 0 1px 4px rgba(232,166,181,.45), inset 0 -1px 0 rgba(0,0,0,.06);
}
.btn-wool--sm { padding: .5rem 1.125rem; font-size: .9375rem; }
.btn-wool--lg { padding: 1rem 2.25rem; font-size: 1.125rem; }
.btn-wool--forest { background: var(--fw-primary); color: #fff; box-shadow: 0 4px 12px rgba(58,90,64,.35), inset 0 -3px 0 rgba(0,0,0,.08); }
.btn-wool--forest:hover { background: var(--fw-primary-hover); color: #fff; }
.btn-wool--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--fw-primary); color: var(--fw-primary); }
.btn-wool--ghost:hover { background: var(--fw-primary); color: #fff; }

/* ─── Cards ─────────────────────────────────────────────── */
.wool-card {
    background: var(--fw-bg-card);
    border-radius: var(--fw-radius-lg);
    box-shadow: var(--fw-shadow);
    padding: 1.75rem;
    transition: transform .25s cubic-bezier(.34,1.3,.64,1), box-shadow .25s;
}
.wool-card:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: var(--fw-shadow-lg); }
.wool-card--soft { box-shadow: var(--fw-shadow-sm); background: var(--fw-bg); }
.wool-card--hero { padding: clamp(1.5rem, 4vw, 3rem); }

/* ─── Forms ─────────────────────────────────────────────── */
.form-group { margin-block-end: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-block-end: .375rem; font-size: .9375rem; }
.form-hint  { font-size: .875rem; color: var(--fw-text-muted); margin-block-start: .375rem; }
.form-error { font-size: .875rem; color: #B94A5A; margin-block-start: .375rem; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: #fff;
    border: 2px solid var(--fw-border);
    border-radius: var(--fw-radius);
    padding: .75rem 1rem;
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: 0;
    border-color: var(--fw-primary);
    box-shadow: 0 0 0 4px rgba(58,90,64,.12);
}

.form-checkbox, .form-radio { margin-inline-end: .5rem; }

/* ─── Utilities ─────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--fw-text-muted); }
.mb-0 { margin-block-end: 0 !important; }
.mb-1 { margin-block-end: var(--fw-space-1); }
.mb-2 { margin-block-end: var(--fw-space-2); }
.mb-3 { margin-block-end: var(--fw-space-3); }
.mb-4 { margin-block-end: var(--fw-space-4); }
.mb-5 { margin-block-end: var(--fw-space-5); }
.mt-4 { margin-block-start: var(--fw-space-4); }
.mt-5 { margin-block-start: var(--fw-space-5); }
.mt-6 { margin-block-start: var(--fw-space-6); }

.grid { display: grid; gap: var(--fw-space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

hr.wavy {
    border: 0; height: 10px;
    background-image: radial-gradient(circle at 6px 5px, var(--fw-oat) 2px, transparent 2.5px);
    background-size: 18px 10px; background-repeat: repeat-x;
    margin: var(--fw-space-6) 0;
}

/* ─── Flash messages ────────────────────────────────────── */
.flash {
    border-radius: var(--fw-radius);
    padding: 1rem 1.25rem;
    margin-block-end: 1.5rem;
    background: var(--fw-accent-light);
    border-left: 4px solid var(--fw-accent);
}
.flash--info    { background: #E6EEE8; border-left-color: var(--fw-primary); }
.flash--error   { background: #FBDFD6; border-left-color: #B94A5A; }
.flash--success { background: #DCEAD8; border-left-color: #558B5E; }

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
    margin-block-start: var(--fw-space-8);
    padding-block: var(--fw-space-7) var(--fw-space-5);
    background: var(--fw-oat-light);
    border-top: 1px solid var(--fw-border-soft);
}
.footer-row {
    display: grid;
    grid-template-columns: minmax(16rem, 2fr) 3fr;
    gap: var(--fw-space-6);
    margin-block-end: var(--fw-space-6);
}
.footer-brand { display: flex; align-items: center; gap: .625rem; font-weight: 700; font-size: 1.125rem; margin-block-end: .5rem; }
.footer-tagline { color: var(--fw-text-muted); max-width: 28rem; }
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--fw-space-5);
}
.footer-heading { font-family: var(--fw-font-body); font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--fw-primary); margin-block-end: .75rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-block-end: .375rem; }
.footer-col a { color: var(--fw-text); text-decoration: none; }
.footer-col a:hover { color: var(--fw-primary); text-decoration: underline; }

.footer-disclaimer {
    padding: 1.25rem; background: rgba(255,255,255,.5);
    border: 1px dashed var(--fw-border);
    border-radius: var(--fw-radius);
    font-size: .9375rem; color: var(--fw-text-muted);
}
.footer-bottom { margin-block-start: var(--fw-space-5); font-size: .875rem; color: var(--fw-text-muted); }

@media (max-width: 768px) {
    .footer-row { grid-template-columns: 1fr; }
    .footer-nav { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Cookie consent ────────────────────────────────────── */
.cookie-consent {
    position: fixed; bottom: 1rem; left: 1rem; right: 1rem;
    z-index: 90;
    background: var(--fw-bg-card);
    border-radius: var(--fw-radius);
    box-shadow: var(--fw-shadow-lg);
    padding: 1rem 1.25rem;
}
.cookie-consent-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    flex-wrap: wrap;
}
.cookie-consent p { margin: 0; font-size: .9375rem; }

/* ─── Breadcrumbs ───────────────────────────────────────── */
.breadcrumb-wrapper { padding-block: .75rem; background: transparent; }
.breadcrumb { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .375rem; font-size: .875rem; color: var(--fw-text-muted); }
.breadcrumb-item + .breadcrumb-item::before { content: '·'; margin-inline-end: .375rem; color: var(--fw-text-muted); }
.breadcrumb-item a { color: var(--fw-text-muted); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--fw-primary); }
.breadcrumb-item.active { color: var(--fw-text); }
