/* ==========================================================================
   Merrick & Thorne Solicitors — design system
   "Legal document" aesthetic: ink-navy-near-black text on warm parchment,
   deep burgundy used sparingly as an official-stamp accent. Newsreader
   (display serif) + Public Sans (body) — both unused elsewhere on this
   platform. Deliberately structured differently from every other Try My
   Site template: no hero photo, document-clause section dividers, a
   numbered practice-area index instead of icon cards, a formal team
   directory list instead of a photo-card grid, and pull-quote testimonials
   instead of a carousel. See the site's CLAUDE.md for the full brief.
   ========================================================================== */

:root {
    --ink:        #14182A;
    --ink-soft:   #3A3F52;
    --ink-mute:   #6B7086;

    --burgundy:       #6B1E2E;
    --burgundy-deep:  #4E141F;
    --burgundy-light: #8B3244;
    --burgundy-mist:  #F3E7E7;

    --parchment:      #F4EFE3;
    --parchment-deep: #EAE0C9;
    --paper:          #FFFCF4;
    --white:          #FFFFFF;

    --line:        rgba(20, 24, 42, 0.16);
    --line-soft:   rgba(20, 24, 42, 0.09);
    --line-on-dark: rgba(244, 239, 227, 0.18);

    --font-display: 'Newsreader', ui-serif, Georgia, serif;
    --font-body: 'Public Sans', ui-sans-serif, system-ui, sans-serif;

    --radius-sm: 3px;
    --radius: 4px;
    --radius-lg: 6px;

    --shadow-sm: 0 1px 3px rgba(20, 24, 42, 0.08);
    --shadow: 0 8px 24px rgba(20, 24, 42, 0.10);
    --shadow-lg: 0 18px 44px rgba(20, 24, 42, 0.16);

    --ease: cubic-bezier(.25, .8, .35, 1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--parchment);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.14;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
    color: var(--ink);
}
em, .italic { font-style: italic; color: var(--burgundy); }

p { margin: 0 0 1em; }
.lede { font-size: 1.13rem; color: var(--ink-soft); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--burgundy); color: var(--white);
    padding: 12px 20px; z-index: 200; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Icons ---------- */
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex-shrink: 0; }
.icon--lg { width: 28px; height: 28px; }
.icon--sm { width: 15px; height: 15px; }
.stars { display: inline-flex; gap: 2px; color: var(--burgundy); }
.stars .icon { width: 15px; height: 15px; }

/* ---------- Buttons — squared-off, stamp-like, not pill-shaped ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 700; font-size: .88rem;
    letter-spacing: .01em;
    border: 1px solid transparent; cursor: pointer; position: relative;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
    white-space: nowrap; font-family: var(--font-body);
}
.btn--primary { background: var(--ink); color: var(--parchment); }
.btn--primary:hover { background: var(--burgundy-deep); }
.btn--burgundy { background: var(--burgundy); color: var(--white); }
.btn--burgundy:hover { background: var(--burgundy-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--burgundy); color: var(--burgundy); }
.btn--ghost.btn--on-dark { color: var(--parchment); border-color: var(--line-on-dark); }
.btn--ghost.btn--on-dark:hover { background: rgba(244,239,227,.06); border-color: var(--burgundy-light); }
.btn--sm { padding: 9px 18px; font-size: .8rem; }
.btn--block { width: 100%; }
.hide-sm { display: inline-flex; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100; background: rgba(244,239,227,.94);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 24px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark { width: 32px; height: 32px; color: var(--ink); }
.brand__name-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; color: var(--ink); }
.brand__name em { color: var(--burgundy); font-style: normal; }
.brand__tag { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }

.main-nav { display: flex; gap: 28px; }
.main-nav a { font-weight: 600; font-size: .88rem; color: var(--ink-soft); position: relative; padding: 6px 0; }
.main-nav a:hover, .main-nav a.is-active { color: var(--ink); }
.main-nav a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--burgundy); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: var(--ink); cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: var(--parchment-deep); }
.nav-toggle { display: none; }

.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 10px 24px 22px; border-top: 1px solid var(--line); background: var(--parchment); }
.mobile-nav a { padding: 12px 4px; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.mobile-nav.is-open { display: flex; }
.scrim { display: none; }

@media (max-width: 880px) {
    .main-nav { display: none; }
    .hide-sm { display: none; }
    .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   Hero — deliberately photo-free. Eyebrow case-file label, large serif
   headline, short lede, two CTAs. A faint oversized watermark seal motif
   provides texture instead of a lifestyle photo.
   ========================================================================== */
.hero {
    position: relative; overflow: hidden;
    padding: 96px 0 84px;
    background: var(--parchment);
    border-bottom: 1px solid var(--line);
}
.hero-watermark {
    position: absolute; top: 50%; right: -6%; transform: translateY(-50%);
    width: 620px; height: 620px; color: var(--ink); opacity: .045; pointer-events: none;
}
.hero-watermark .icon { width: 100%; height: 100%; stroke-width: .6; }
.hero-inner { position: relative; max-width: 760px; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 10px; font-size: .76rem; font-weight: 700;
    letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 22px;
}
.hero-eyebrow::before { content: ''; width: 30px; height: 1px; background: var(--burgundy); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin-bottom: .4em; }
.hero .lede { max-width: 54ch; margin-bottom: 34px; font-size: 1.18rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.hero-meta {
    display: flex; gap: 40px; flex-wrap: wrap; padding-top: 30px; border-top: 1px solid var(--line);
}
.hero-meta div strong { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); font-weight: 600; }
.hero-meta div span { font-size: .78rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; }

/* ==========================================================================
   Clause head — document-style section divider: numeral, rule line, small
   caps label, used before every major section heading site-wide instead of
   icon-card intro blocks.
   ========================================================================== */
.clause {
    display: flex; align-items: center; gap: 16px; margin-bottom: 18px;
}
.clause-num { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--burgundy); font-size: 1.2rem; flex-shrink: 0; }
.clause-rule { flex: 1; height: 1px; background: var(--line); }
.clause-label { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); flex-shrink: 0; white-space: nowrap; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
.section-head p { color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section--tight { padding: 40px 0; }
.section--soft { background: var(--parchment-deep); }
.section--dark { background: var(--ink); color: var(--parchment); }
.section--dark h2, .section--dark h3 { color: var(--paper); }
.section--dark .clause-label, .section--dark .clause-num { color: var(--burgundy-light); }
.section--dark .clause-rule { background: var(--line-on-dark); }
.section--dark .section-head p { color: rgba(244,239,227,.72); }

/* ==========================================================================
   Practice-area index — a numbered table-of-contents list with
   expand-on-click detail, replacing the icon-card-grid pattern used on
   every other template.
   ========================================================================== */
.index-list { border-top: 1px solid var(--line); }
.index-row { border-bottom: 1px solid var(--line); }
.index-row > summary {
    display: flex; align-items: baseline; gap: 22px; padding: 26px 4px; cursor: pointer;
    list-style: none; -webkit-tap-highlight-color: transparent;
}
.index-row > summary::-webkit-details-marker { display: none; }
.index-row__num { font-family: var(--font-display); font-style: italic; color: var(--burgundy); font-size: 1.1rem; flex-shrink: 0; width: 30px; }
.index-row__body { flex: 1; min-width: 0; }
.index-row__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin-bottom: 4px; }
.index-row__summary { color: var(--ink-soft); font-size: .94rem; margin: 0; }
.index-row__chevron { flex-shrink: 0; color: var(--ink-mute); transition: transform .3s var(--ease); margin-top: 6px; }
.index-row[open] .index-row__chevron { transform: rotate(180deg); }
.index-row:hover .index-row__title { color: var(--burgundy); }
.index-row__detail { padding: 0 4px 30px 52px; max-width: 68ch; color: var(--ink-soft); }
.index-row__detail p:last-child { margin-bottom: 0; }
.index-row__detail .btn { margin-top: 6px; }

/* ==========================================================================
   Team directory — a formal list/row layout (photo, name, title,
   credential, practice-area tag), not a symmetric photo-card grid.
   ========================================================================== */
.directory { border-top: 1px solid var(--line); }
.directory-row {
    display: grid; grid-template-columns: 64px 1.6fr 1.6fr auto; gap: 22px; align-items: center;
    padding: 22px 4px; border-bottom: 1px solid var(--line);
}
.directory-row__photo { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--parchment-deep); flex-shrink: 0; border: 1px solid var(--line); }
.directory-row__photo img { width: 100%; height: 100%; object-fit: cover; }
.directory-row__photo--empty { display: flex; align-items: center; justify-content: center; color: var(--ink-mute); font-family: var(--font-display); font-weight: 600; }
.directory-row__name { font-family: var(--font-display); font-size: 1.16rem; font-weight: 600; margin-bottom: 2px; }
.directory-row__role { font-size: .84rem; color: var(--burgundy); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.directory-row__credential { font-size: .86rem; color: var(--ink-soft); }
.directory-row__tag {
    display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--ink-soft); white-space: nowrap; justify-self: end;
}
@media (max-width: 780px) {
    .directory-row { grid-template-columns: 52px 1fr; grid-template-areas: "photo name" "cred cred" "tag tag"; row-gap: 8px; }
    .directory-row__photo { width: 52px; height: 52px; grid-area: photo; }
    .directory-row__name-wrap { grid-area: name; }
    .directory-row__credential { grid-area: cred; }
    .directory-row__tag { grid-area: tag; justify-self: start; }
}

/* Full team-directory page: expandable bio per row */
.directory-full .directory-row { display: block; padding: 0; border-bottom: none; border-top: 1px solid var(--line); }
.directory-full .directory-row:last-child { border-bottom: 1px solid var(--line); }
.directory-full summary {
    display: grid; grid-template-columns: 64px 1.6fr 1.6fr auto; gap: 22px; align-items: center;
    padding: 24px 4px; cursor: pointer; list-style: none;
}
.directory-full summary::-webkit-details-marker { display: none; }
.directory-full .directory-row__detail { padding: 0 4px 30px 86px; max-width: 66ch; color: var(--ink-soft); }
.directory-full .directory-row__detail .quals { font-size: .84rem; color: var(--ink-mute); margin-top: 10px; }
@media (max-width: 780px) {
    .directory-full summary { grid-template-columns: 52px 1fr; grid-template-areas: "photo name" "cred cred" "tag tag"; row-gap: 8px; }
    .directory-full .directory-row__detail { padding-left: 4px; }
}

/* ==========================================================================
   Pull-quote testimonials — citation-style, not a card grid/carousel.
   ========================================================================== */
.pull-quotes { border-top: 1px solid var(--line); }
.pull-quote { padding: 40px 4px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 60px 1fr; gap: 6px; }
.pull-quote__mark { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: var(--burgundy); font-style: italic; }
.pull-quote blockquote { margin: 0 0 14px; font-family: var(--font-display); font-style: italic; font-size: 1.28rem; line-height: 1.5; color: var(--ink); }
.pull-quote figcaption { font-size: .86rem; color: var(--ink-mute); font-style: normal; }
.pull-quote figcaption strong { color: var(--ink-soft); font-weight: 700; }
@media (max-width: 640px) { .pull-quote { grid-template-columns: 1fr; } .pull-quote__mark { display: none; } }

/* ---------- Split (image + text) — used sparingly, About page only ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 5/4.2; object-fit: cover; width: 100%; filter: saturate(.92); }
.split h2 { color: var(--ink); }
.split p { color: var(--ink-soft); }
.split.rev img { order: 2; }
@media (max-width: 860px) {
    .split, .split.rev { grid-template-columns: 1fr; }
    .split.rev img { order: -1; }
}
.badge-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--ink); background: var(--parchment-deep); padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.badge .icon { color: var(--burgundy); width: 15px; height: 15px; }

/* ---------- Values / promise cards (About page) — flat, not shadow cards ---------- */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.value { padding: 30px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value__icon { color: var(--burgundy); margin-bottom: 14px; }
.value h3 { font-size: 1.1rem; }
.value p { color: var(--ink-soft); font-size: .93rem; margin: 0; }
@media (max-width: 900px) { .value-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--ink); color: var(--parchment); border-radius: var(--radius-lg); padding: 34px 40px; flex-wrap: wrap; }
.cta-band h3 { color: var(--paper); font-size: 1.4rem; margin-bottom: 4px; }
.cta-band p { color: rgba(244,239,227,.74); margin: 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: .84rem; font-weight: 700; color: var(--ink); }
.field input, .field textarea, .field select {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 12px 14px; color: var(--ink); width: 100%; font-family: var(--font-body); font-size: .94rem;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px var(--burgundy-mist); }
.field textarea { min-height: 120px; resize: vertical; }
.field--error input, .field--error textarea { border-color: var(--burgundy); }
.field__err { color: var(--burgundy); font-size: .78rem; font-weight: 600; margin-top: 2px; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.form-error { background: var(--burgundy-mist); border: 1px solid var(--burgundy-light); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; font-size: .9rem; color: var(--burgundy-deep); }
.alert { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px; font-size: .92rem; }
.alert--success { background: rgba(20,24,42,.06); color: var(--ink); border: 1px solid var(--line); }
.alert--error { background: var(--burgundy-mist); color: var(--burgundy-deep); border: 1px solid var(--burgundy-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(244,239,227,.8); padding-top: 60px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-on-dark); }
.footer-brand .brand__name { color: var(--paper); }
.footer-brand .brand__mark { color: var(--burgundy-light); }
.footer-brand p { margin: 14px 0 18px; font-size: .89rem; color: rgba(244,239,227,.66); }
.socials { display: flex; gap: 10px; }
.socials a { width: 34px; height: 34px; border-radius: 50%; background: rgba(244,239,227,.07); display: flex; align-items: center; justify-content: center; color: var(--parchment); transition: background .2s, color .2s; }
.socials a:hover { background: var(--burgundy); color: var(--white); }
.footer-col h4 { color: var(--paper); margin-bottom: 15px; font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .76rem; }
.footer-col a { display: block; font-size: .88rem; color: rgba(244,239,227,.68); margin-bottom: 11px; transition: color .2s; }
.footer-col a:hover { color: var(--burgundy-light); }
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; color: rgba(244,239,227,.68); margin-bottom: 13px; }
.footer-contact .icon { color: var(--burgundy-light); margin-top: 2px; flex-shrink: 0; }

.footer-bar { border-top: 1px solid var(--line-on-dark); padding-block: 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; color: rgba(244,239,227,.55); font-size: .84rem; }
.footer-bar .footer-credit { text-align: center; }
.footer-bar .credit-link { color: var(--burgundy-light); font-weight: 600; }
.footer-bar .footer-legal { justify-self: end; display: flex; gap: 16px; }
.footer-bar .footer-legal a { color: rgba(244,239,227,.55); }
.footer-bar .footer-legal a:hover { color: var(--burgundy-light); }
@media (max-width: 760px) { .footer-bar { grid-template-columns: 1fr; text-align: center; } .footer-bar .footer-legal { justify-self: center; } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-fineprint { text-align: center; font-size: .76rem; color: rgba(244,239,227,.38); padding: 16px 0 26px; margin: 0; max-width: 680px; margin-inline: auto; }

/* ---------- Cookie bar ---------- */
.cookie-bar { position: fixed; left: 20px; right: 20px; bottom: 20px; max-width: 620px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow-lg); z-index: 300; }
.cookie-bar p { font-size: .85rem; color: var(--ink-soft); margin-bottom: 14px; }
.cookie-bar p a { color: var(--ink); text-decoration: underline; }
.cookie-bar__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Scroll-reveal — subtle, dialed down deliberately ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
[data-reveal="stagger"] > * { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
[data-reveal="stagger"].in-view > * { opacity: 1; transform: none; }
[data-reveal="stagger"].in-view > *:nth-child(2) { transition-delay: .06s; }
[data-reveal="stagger"].in-view > *:nth-child(3) { transition-delay: .12s; }
[data-reveal="stagger"].in-view > *:nth-child(4) { transition-delay: .18s; }
[data-reveal="stagger"].in-view > *:nth-child(5) { transition-delay: .24s; }
[data-reveal="stagger"].in-view > *:nth-child(6) { transition-delay: .30s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal, [data-reveal="stagger"] > * { opacity: 1; transform: none; }
}

/* ---------- Misc page bits ---------- */
.page-hero { padding: 54px 0 44px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); }
.page-hero p { max-width: 60ch; color: var(--ink-soft); }

.pill-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--radius-sm); font-size: .84rem; font-weight: 600; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--line); }
.pill.is-active, .pill:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }

.hint { color: var(--ink-mute); font-size: .9rem; }

.prose h2 { color: var(--ink); font-size: 1.25rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
