/* ═══════════════════════════════════════════════════════════════
   Morehead's Better Brains — Version 4 "Wood & Leather"
   Loads AFTER /assets/site.css and /assets/v2.css.

   Built around Dan's second logo (the carved wood medallion, text
   ring intact) and around his own photographs rather than ornament.
   Palette sampled from the logo itself — walnut, burnished bronze,
   warm paper — plus the oxblood leather and green of his office.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --paper: #f4ece0;
    --card: #fdf8f1;
    --ink: #2f2519;
    --ink-soft: #6b5a45;
    --line: #ddcdb6;
    --spruce: #3f4a35;
    --spruce-deep: #2a3323;
    --spruce-text: #4d5c40;
    --spruce-pale: #e8e9dc;
    --oxblood: #5b3126;
    --oxblood-deep: #3f2019;
    --oxblood-text: #7a4331;
    --oxblood-pale: #f3e3d7;
    --brass: #8c6231;
    --bronze-hi: #c39a5d;
    --walnut: #6b4a2a;
}

body {
    /* faint wood-grain warmth instead of v2's laid-paper hatch */
    background-image: repeating-linear-gradient(
            90deg,
            rgba(107, 74, 42, 0.022) 0px,
            rgba(107, 74, 42, 0.022) 1px,
            transparent 1px,
            transparent 7px
        ),
        radial-gradient(ellipse at 20% 0%, rgba(140, 98, 49, 0.06), transparent 60%);
}

/* ─── Masthead: the medallion IS the wordmark ─── */
.masthead-crest {
    padding-top: 2.4rem;
    padding-bottom: 2.2rem;
}
.masthead-crest .crest {
    display: block;
    width: clamp(190px, 24vw, 280px);
    height: auto;
    margin: 0 auto 1.1rem;
    filter: drop-shadow(0 14px 26px rgba(66, 46, 24, 0.22));
}
.masthead-crest .crest-title {
    /* the badge already carries the name; keep it for search and
       screen readers, and as a quiet echo under the mark */
    font-family: 'Besley', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    letter-spacing: 0.02em;
    color: var(--walnut);
    text-align: center;
    margin-bottom: 0.5rem;
}
.masthead-crest .byline { color: var(--ink-soft); }
.masthead-crest .byline .dot { color: var(--bronze-hi); }

/* ─── Header mark ─── */
.medallion-mark {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
}
.site-header { border-bottom-color: var(--line); }

/* ─── Doors: real photographs behind the type ─── */
.door.has-photo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.door-practice.has-photo {
    background-image: linear-gradient(165deg, rgba(42, 51, 35, 0.84) 0%, rgba(24, 31, 20, 0.9) 100%),
        url('/assets/photos/office-room.jpg');
}
.door-writing.has-photo {
    background-image: linear-gradient(200deg, rgba(63, 32, 25, 0.88) 0%, rgba(35, 17, 13, 0.94) 100%),
        url('/assets/photos/speaking-podium.jpg');
}
.door-practice.has-photo:hover, .door-practice.has-photo:focus-visible {
    background-image: linear-gradient(165deg, rgba(42, 51, 35, 0.74) 0%, rgba(24, 31, 20, 0.84) 100%),
        url('/assets/photos/office-room.jpg');
}
.door-writing.has-photo:hover, .door-writing.has-photo:focus-visible {
    background-image: linear-gradient(200deg, rgba(63, 32, 25, 0.8) 0%, rgba(35, 17, 13, 0.9) 100%),
        url('/assets/photos/speaking-podium.jpg');
}
.door::after { content: none; }          /* drop v2's ghost ampersand */
.door .enter { border-bottom-color: rgba(195, 154, 93, 0.75); }

/* medallion on the seam, wood edge */
.seam-medallion {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(132px, 13.5vw);
    height: min(132px, 13.5vw);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(30, 20, 10, 0.5);
    z-index: 5;
    pointer-events: none;
    object-fit: cover;
}
@media (max-width: 760px) { .seam-medallion { display: none; } }

/* ─── Page-hero triquetra etching (v3 markup, restyled for v4) ───
   v4 does NOT load v3.css, so this ornament would otherwise render at
   its intrinsic size and swamp the hero. */
.page-hero { position: relative; overflow: hidden; }
.hero-triquetra {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    opacity: 0.13;
    color: var(--brass);
    pointer-events: none;
}
.page-hero .inner { position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-triquetra { display: none; } }

/* ─── Wide photographic band under a page hero ─── */
.photo-band {
    max-width: 1140px;
    margin: 2.2rem auto 0;
    padding: 0 1.5rem;
}
.photo-band img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(47, 37, 25, 0.16);
}
.photo-band figcaption {
    font-family: 'Archivo', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: 0.7rem;
    text-align: center;
}

/* ─── Ambience grid on the index ─── */
.ambience {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
}
.ambience-title {
    font-family: 'Archivo', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-align: center;
    margin-bottom: 1.6rem;
}
.ambience-title::after {
    content: '';
    display: block;
    width: 46px;
    border-top: 1px solid var(--bronze-hi);
    margin: 0.8rem auto 0;
}
.ambience-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
}
.ambience-grid figure { margin: 0; }
.ambience-grid img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(47, 37, 25, 0.12);
    transition: transform 0.4s ease;
}
.ambience-grid figure:hover img { transform: translateY(-4px); }
.ambience-grid figcaption {
    font-family: 'Archivo', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: 0.6rem;
    text-align: center;
}
@media (max-width: 860px) {
    .ambience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ambience-grid img { height: 200px; }
}
@media (max-width: 460px) {
    .ambience-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ─── Photo frames re-tinted to the wood palette ─── */
.portrait-plain, .portrait-arch {
    border-color: var(--line);
    box-shadow: 0 14px 32px rgba(47, 37, 25, 0.16);
}
.value-card { border-left-color: var(--bronze-hi); }
.dropcap > p:first-of-type::first-letter { color: var(--walnut); }
.side-writing .dropcap > p:first-of-type::first-letter { color: var(--oxblood-text); }
.flourish svg, .hero-neuron { color: var(--brass); }
.pull-quote { color: var(--oxblood-deep); }
.book-cover { background: linear-gradient(155deg, #7d5a2e 0%, #533a19 100%); color: #f7efe2; }
.book-cover .b-rule { border-top-color: rgba(247, 239, 226, 0.5); }

/* ─── Footer: dark walnut ─── */
.site-footer { background: #2a2016; color: #d6c8b2; }
.site-footer h3 { color: #a98f60; }
.site-footer a { color: #ecdfc8; }
.site-footer a:hover { color: #ffffff; }
.site-footer .baseline { border-top-color: #493827; color: #a98f60; }
.powered-by { color: #a98f60; }
.powered-by strong { color: #ecdfc8; }
::selection { background: #eddfc4; color: #2f2519; }

/* ─── New-patient call to action ─── */
.site-nav { align-items: center; }
.site-nav a.nav-cta {
    color: #fffaf2;
    background: var(--spruce);
    border: 1px solid var(--spruce);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    box-shadow: 0 4px 12px rgba(42, 51, 35, 0.16);
}
.site-nav a.nav-cta:hover {
    color: #ffffff;
    background: var(--spruce-deep);
    border-color: var(--spruce-deep);
}
.site-nav a.nav-cta.active-patient {
    color: #ffffff;
    background: var(--spruce-deep);
    border-color: var(--bronze-hi);
}

.masthead-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.1rem;
    margin-top: 1.45rem;
}
.primary-cta,
.submit-inquiry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid var(--spruce);
    border-radius: 4px;
    padding: 0.72rem 1.35rem;
    background: var(--spruce);
    color: #ffffff;
    font-family: 'Archivo', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(42, 51, 35, 0.18);
}
.primary-cta:hover,
.submit-inquiry:hover {
    background: var(--spruce-deep);
    border-color: var(--spruce-deep);
    color: #ffffff;
}
.email-cta {
    font-family: 'Archivo', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ─── Become a patient page ─── */
.patient-intake {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4.2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
    gap: clamp(2rem, 5vw, 4.8rem);
    align-items: start;
}
.patient-page .page-hero,
.patient-page .patient-intake {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
}
.inquiry-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 4px solid var(--spruce);
    border-radius: 5px;
    padding: clamp(1.4rem, 4vw, 2.25rem);
    box-shadow: 0 18px 42px rgba(47, 37, 25, 0.1);
}
.inquiry-card h2,
.inquiry-aside h2 {
    font-family: 'Besley', serif;
    font-size: 1.55rem;
    line-height: 1.2;
    margin-bottom: 0.65rem;
}
.form-intro {
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.05rem 1rem;
}
.form-field { min-width: 0; }
.form-field.full-width { grid-column: 1 / -1; }
.form-field label,
.consent-field {
    font-family: 'Archivo', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    color: var(--ink);
}
.form-field label {
    display: block;
    margin-bottom: 0.38rem;
}
.form-field input,
.form-field select,
.form-field textarea {
    display: block;
    width: 100%;
    border: 1px solid #b9aa94;
    border-radius: 3px;
    background: #fffefa;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    padding: 0.7rem 0.75rem;
}
.form-field textarea {
    min-height: 132px;
    resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: 3px solid rgba(63, 74, 53, 0.2);
    outline-offset: 1px;
    border-color: var(--spruce);
}
.field-note {
    display: block;
    margin-top: 0.35rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.45;
}
.consent-field {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    line-height: 1.5;
}
.consent-field input {
    width: 18px;
    height: 18px;
    margin-top: 0.18rem;
    accent-color: var(--spruce);
    flex: none;
}
.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
    margin-top: 1.35rem;
}
.submit-inquiry:disabled {
    cursor: wait;
    opacity: 0.68;
}
.form-status {
    flex: 1 1 230px;
    min-height: 1.5em;
    font-family: 'Archivo', sans-serif;
    font-size: 0.86rem;
    line-height: 1.45;
}
.form-status[data-state="success"] { color: #315c38; }
.form-status[data-state="error"] { color: #8a2f27; }
.form-status[data-state="working"] { color: var(--ink-soft); }
.form-fine-print {
    border-top: 1px solid var(--line);
    margin-top: 1.45rem;
    padding-top: 1rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}
.insurance-notice {
    background: var(--spruce-pale);
    border: 1px solid #c9ceb9;
    border-left: 4px solid var(--spruce);
    border-radius: 4px;
    margin-top: 1.25rem;
    padding: 1.1rem 1.2rem;
    font-size: 0.96rem;
    line-height: 1.6;
}
.insurance-notice strong {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 0.22rem;
}
.inquiry-aside {
    padding-top: 0.3rem;
}
.inquiry-aside p + p { margin-top: 1rem; }
.inquiry-aside .aside-rule {
    width: 54px;
    border: 0;
    border-top: 2px solid var(--bronze-hi);
    margin: 1.5rem 0;
}
.contact-email {
    overflow-wrap: anywhere;
    font-weight: 600;
}
.contact-list {
    list-style: none;
    margin-top: 1rem;
}
.contact-list li {
    position: relative;
    padding-left: 1.25rem;
}
.contact-list li + li { margin-top: 0.4rem; }
.contact-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brass);
}
.hp-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

@media (max-width: 980px) {
    .site-header .bar { align-items: flex-start; }
    .site-nav { gap: 0.7rem 0.9rem; }
    .patient-intake { grid-template-columns: minmax(0, 1fr); }
    .inquiry-aside { max-width: 46rem; }
}
@media (max-width: 680px) {
    .site-header .bar { display: block; }
    .wordmark-lockup { display: inline-flex; margin-bottom: 0.65rem; }
    .site-nav { width: 100%; }
    .site-nav a { font-size: 0.72rem; }
    .site-nav a.nav-cta { margin-left: auto; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-field.full-width { grid-column: auto; }
}
@media (max-width: 480px) {
    .site-nav a.nav-cta {
        width: 100%;
        margin-top: 0.15rem;
        text-align: center;
    }
    .masthead-actions { align-items: stretch; flex-direction: column; }
    .primary-cta { width: 100%; }
    .patient-intake { padding-top: 2rem; }
    .inquiry-card { padding: 1.25rem 1rem; }
    .submit-inquiry { width: 100%; }
}
