/* ═══════════════════════════════════════════════════════════════════════════
   Time to Bloom — brand stylesheet
   Palette, type, and elements from docs/BrandColors.png.

   Colour use is deliberate: Evergreen carries text, Plum carries primary
   action, Sage and Heather carry secondary action, and Soft Gold is reserved
   for rules, borders, and flourishes — it does not have the contrast to be
   text on ivory.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Brand palette */
    --evergreen:        #4B5E48;
    --sage:             #B9C8AF;
    --heather:          #B8A4C8;
    --lilac-mist:       #D8C8E3;
    --warm-ivory:       #F8F5EF;
    --soft-gold:        #D7BE8A;

    /* Accents */
    --dusty-plum:       #705A7D;
    --moss-green:       #8D9D80;
    --blush-petal:      #F3D9E7;
    --wildflower-white: #FFFFFF;

    /* Derived, for contrast where the brand tones are too light for text */
    --ink:              #3B4A39;
    --ink-soft:         #5E6B5A;
    --plum-deep:        #5C4867;
    --rule:             rgba(215, 190, 138, 0.55);
    --rule-soft:        rgba(185, 200, 175, 0.45);

    /* Washes and states. Derived rather than literal so a theme reaches them:
       a dark ground needs different alphas, and #7A3B55 reads as an error only
       against Blush Petal. */
    --gold-wash:        rgba(215, 190, 138, 0.10);
    --gold-ring:        rgba(215, 190, 138, 0.25);
    --sage-wash:        rgba(185, 200, 175, 0.20);
    --error-ink:        #7A3B55;

    /* var() cannot reach inside a data: URI, so the whole URL is the token and
       a theme swaps it wholesale. Keep the fill in sync with --ink-soft. */
    --select-arrow:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%235E6B5A' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");

    --radius:           14px;
    --radius-pill:      999px;
    --shadow:           0 2px 20px rgba(75, 94, 72, 0.07);
    --shadow-lift:      0 6px 28px rgba(75, 94, 72, 0.12);

    --font-display:     "Lora", Georgia, "Times New Roman", serif;
    --font-body:        "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--warm-ivory);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--evergreen);
    line-height: 1.25;
    margin: 0 0 0.4em;
}

h1 { font-size: 2.1rem; letter-spacing: 0.01em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

a { color: var(--dusty-plum); text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { color: var(--plum-deep); }

/* ── Section label — the letterspaced small caps from the brand board ────── */
.label {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 0.6em;
}

.muted { color: var(--ink-soft); }
.tagline {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 1.02rem;
}

/* ── Botanical divider ──────────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.4rem 0;
    color: var(--soft-gold);
}
.divider::before, .divider::after {
    content: "";
    height: 1px;
    flex: 1;
    max-width: 130px;
    background: linear-gradient(to right, transparent, var(--rule), transparent);
}
.divider svg { width: 26px; height: 26px; display: block; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--wildflower-white);
    border-bottom: 1px solid var(--rule-soft);
    padding: 0.9rem 1.5rem;
}
.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.wordmark {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.16em;
    color: var(--evergreen);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.wordmark:hover { color: var(--evergreen); }
.wordmark svg { width: 26px; height: 26px; color: var(--soft-gold); }

.site-nav { display: flex; align-items: center; gap: 1.3rem; font-size: 0.93rem; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--ink-soft); }
.site-nav a:not(.btn):hover { color: var(--evergreen); }

main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 2.4rem 1.5rem 3rem; }
.narrow { max-width: 560px; margin-inline: auto; }

.site-footer {
    border-top: 1px solid var(--rule-soft);
    padding: 1.4rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--wildflower-white);
    border: 1px solid var(--rule-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 2.1rem;
}
.card + .card { margin-top: 1.4rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ── Buttons — the pill shapes from the brand board ─────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.6rem 1.7rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--dusty-plum); outline-offset: 3px; }

.btn-bloom   { background: var(--dusty-plum); color: var(--wildflower-white); }
.btn-bloom:hover { background: var(--plum-deep); color: var(--wildflower-white); }
.btn-grow    { background: var(--sage); color: var(--evergreen); }
.btn-grow:hover { color: var(--evergreen); }
.btn-connect { background: var(--lilac-mist); color: var(--plum-deep); }
.btn-connect:hover { background: var(--heather); color: var(--plum-deep); }
.btn-quiet {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--rule);
}
.btn-quiet:hover { color: var(--evergreen); background: var(--gold-wash); }

.btn-sm {
    min-height: 36px;
    padding: 0.35rem 1.2rem;
    font-size: 0.82rem;
}

.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-top: 1.6rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.25rem; }
.field label {
    display: block;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}
.field-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--warm-ivory);
    border: 1px solid var(--rule-soft);
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-input:focus {
    outline: none;
    border-color: var(--soft-gold);
    box-shadow: 0 0 0 3px var(--gold-ring);
    background: var(--wildflower-white);
}
textarea.field-input { resize: vertical; line-height: 1.6; }
select.field-input { appearance: none;
    background-image: var(--select-arrow);
    background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 11px;
    padding-right: 2.4rem;
}
.helptext { display: block; font-size: 0.83rem; color: var(--ink-soft); margin-top: 0.35rem; }

/* Radio group — used for directory visibility */
.field ul { list-style: none; margin: 0; padding: 0; }
.field ul li { margin-bottom: 0.45rem; }
.field ul label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.98rem;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
}
.field input[type="radio"] { margin-top: 0.35rem; accent-color: var(--dusty-plum); }

.errorlist {
    list-style: none;
    margin: 0 0 0.6rem;
    padding: 0.6rem 0.9rem;
    background: var(--blush-petal);
    border-radius: 10px;
    color: var(--error-ink);
    font-size: 0.88rem;
}

/* ── Messages ───────────────────────────────────────────────────────────── */
.messages { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.messages li {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border-left: 3px solid var(--sage);
    background: var(--sage-wash);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}
.messages li.error { border-left-color: var(--heather); background: var(--blush-petal); }

/* ── Avatar — brand-styled initials until R2 storage lands ──────────────── */
.avatar {
    width: 82px;
    height: 82px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--evergreen);
    color: var(--warm-ivory);
    font-family: var(--font-display);
    font-size: 1.9rem;
    letter-spacing: 0.04em;
    box-shadow: 0 0 0 4px var(--warm-ivory), 0 0 0 5px var(--rule);
}

/* ── Profile ────────────────────────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.profile-head h1 { margin-bottom: 0.15rem; }

.pill {
    display: inline-block;
    padding: 0.22rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
}
.pill-member { background: var(--sage); color: var(--evergreen); }
.pill-practitioner { background: var(--lilac-mist); color: var(--plum-deep); }

.detail-list { margin: 0; }
.detail-list dt {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
    margin-top: 1.3rem;
}
.detail-list dd { margin: 0.3rem 0 0; }
.detail-list dd.empty { color: var(--ink-soft); font-style: italic; }

/* ── Home ───────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 1.5rem 0 0.5rem; }
.hero h1 { font-size: 2.7rem; letter-spacing: 0.08em; }
.hero p { max-width: 30rem; margin-inline: auto; }

.aspect-row {
    display: flex;
    justify-content: center;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin: 2rem 0 0.5rem;
}
.aspect {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--rule);
    background: var(--wildflower-white);
    color: var(--evergreen);
}
.aspect svg { width: 34px; height: 34px; }
.aspect-label {
    display: block;
    text-align: center;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: 0.5rem;
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    main { padding: 1.8rem 1.1rem 2.5rem; }
    .card { padding: 1.5rem 1.3rem; }
    .hero h1 { font-size: 2.1rem; }
    .header-inner { justify-content: center; }
    /* Buttons in a form's action row share the width; a card or header
       action keeps its natural size rather than reading as a primary bar. */
    .btn-row .btn { flex: 1 1 auto; }
}
