/* ═══════════════════════════════════════════════════════════════
   Morehead's Better Brains — Version 4 "Wood & Leather"
   Loads AFTER /assets/site.css and /v2/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; }
.version-switch { background: #2a2016; color: #e6d2a9; box-shadow: 0 6px 18px rgba(42, 32, 22, 0.45); }
.draft-ribbon { background: #e7d5b0; color: #4a3410; }
::selection { background: #eddfc4; color: #2f2519; }
