/* Westbrook Heritage Insurance
   Clean paper, deep navy, and gold, after the agency's own banner. Soft, rounded surfaces:
   warm-white cards and buttons with light navy-tinted shadows, and rules that stop at the content width. */

:root {
  --paper: #fbfaf7;
  --paper-2: #f1eee6;
  --paper-3: #e2dccb;
  --surface: #fffdf9;
  --ink: #101a36;
  --ink-2: #3b4360;
  --muted: #646b82;
  --line: #ddd8ca;
  --line-soft: #e8e3d6;
  --navy: #14234f;
  --navy-deep: #0b1533;
  --navy-soft: #e4e8f2;
  --gold: #cf9e36;
  --gold-light: #e6c373;
  --gold-deep: #8a6212;
  --gold-tint: #f6ecd6;
  --brass: #8f6b1a;
  --error: #a3261d;
  --focus: #b8851f;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(3rem, 8vw, 6rem);

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  /* Navy-tinted, two-layer shadows: a tight contact shadow plus a soft ambient one. */
  --shadow-xs: 0 1px 2px rgba(16, 26, 54, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 26, 54, 0.05), 0 4px 14px -6px rgba(16, 26, 54, 0.12);
  --shadow-md: 0 1px 3px rgba(16, 26, 54, 0.06), 0 12px 28px -10px rgba(16, 26, 54, 0.20);
  --shadow-lg: 0 2px 6px rgba(16, 26, 54, 0.07), 0 22px 44px -14px rgba(16, 26, 54, 0.28);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 180ms;

  /* Height of the sticky header, so anchors and the pinned bio column clear it. */
  --header-h: 88px;
}
@media (max-width: 900px) { :root { --header-h: 76px; } }
@media (max-width: 520px) { :root { --header-h: 66px; } }

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

/* Anchors (#team, #what-we-handle, the booking calendar) land below the sticky header. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 0.75rem); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #f1dfb4; color: var(--ink); }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--gold-deep); }
/* Long email addresses wrap rather than push the page sideways; phone numbers stay on one line. */
a[href^="mailto:"] { overflow-wrap: anywhere; }
a[href^="tel:"] { white-space: nowrap; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}
h1, h2, h3 { text-wrap: balance; }
/* Keeps a two-sentence heading breaking between sentences, not inside one. */
.sentence { display: inline-block; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-variation-settings: "opsz" 48; }
h4 { font-size: 1.15rem; font-variation-settings: "opsz" 24; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
p, li, dd { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.9rem;
}

.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--ink-2); max-width: var(--measure); }
.measure { max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.nowrap { white-space: nowrap; }

.container { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header ----------------------------------------------------------------- */
.topbar { border-bottom: 1px solid var(--line-soft); font-size: 0.85rem; color: var(--ink-2); }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.45rem; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--gold-deep); text-decoration: underline; }
/* Bigger tap area for the topbar links without making the bar taller. */
@media (max-width: 900px) {
  .topbar a { display: inline-block; padding-block: 0.6rem; margin-block: -0.6rem; }
  /* The padded box overhangs the bar, so a focus ring would be clipped: underline the text instead. */
  .topbar a:focus-visible { outline: none; color: var(--ink); text-decoration: underline 2px var(--focus); text-underline-offset: 0.3em; }
}
/* Phones: service area (smaller, may wrap to two lines) beside the links; email lives in the footer. */
@media (max-width: 639px) {
  .topbar .container { flex-wrap: nowrap; align-items: center; gap: 0.75rem; }
  .topbar-area { flex: 1 1 auto; min-width: 0; font-size: 0.8rem; line-height: 1.35; text-wrap: balance; }
  .topbar .container > span:last-child { flex: none; }
  .topbar-email { display: none; }
}

/* Sticky and translucent; the hairline plus a faint drop make it float once content slides under it.
   Sticky also anchors the phone menu. */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 250, 247, 0.84);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: 0 1px 0 rgba(16, 26, 54, 0.08), 0 8px 24px -18px rgba(16, 26, 54, 0.35);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .masthead { background: var(--paper); }
}
.masthead .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
@media (max-width: 900px) { .masthead .container { padding-block: 0.8rem; } }

.wordmark { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--ink); border-radius: var(--radius-xs); }
.wordmark svg { width: 44px; height: 44px; flex: none; }
.wordmark-logo { height: 52px; width: auto; flex: none; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; font-variation-settings: "opsz" 48; }
.wordmark-sub { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); margin-top: 0.25rem; white-space: nowrap; }
@media (max-width: 480px) { .hide-sm { display: none; } .wordmark svg { width: 38px; height: 38px; } .wordmark-name { font-size: 1.2rem; } }
/* Phones: the logo alone in the header, so it and the Menu button fit on one line. */
@media (max-width: 520px) {
  .masthead .container { padding-block: 0.6rem; }
  .masthead .wordmark-text { display: none; }
  .masthead .wordmark-logo { height: 44px; }
}

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { margin-left: 0.75rem; padding: 0.65rem 1.1rem; font-size: 0.92rem; }
/* Keep .nav a from greying the gold button's text. */
.nav .btn-primary, .nav .btn-primary:hover { color: var(--navy-deep); font-weight: 600; }

/* Desktop: a soft pill on hover and a short rounded gold bar under the current page. */
@media (min-width: 901px) {
  .nav a { white-space: nowrap; }
  .nav a:not(.btn) {
    position: relative; padding: 0.5rem 0.85rem; border-radius: 999px;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  }
  .nav a:not(.btn):hover { background: var(--paper-2); }
  .nav a:not(.btn)[aria-current="page"]::after {
    content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.2rem;
    height: 2px; border-radius: 2px; background: var(--gold);
  }
}
/* Narrow desktops: a smaller logo and tighter links keep every nav item on one line. */
@media (min-width: 901px) and (max-width: 1080px) {
  .masthead .container { gap: 1rem; }
  .masthead .wordmark-logo { height: 40px; }
  .masthead .hide-sm { display: none; }
  .nav { gap: 0.1rem; }
  .nav a:not(.btn) { padding-inline: 0.55rem; }
  .nav a:not(.btn)[aria-current="page"]::after { left: 0.55rem; right: 0.55rem; }
  .nav .btn { margin-left: 0.5rem; padding-inline: 0.95rem; }
}

.nav-toggle {
  display: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-weight: 500; padding: 0.55rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { border-color: var(--paper-3); background: var(--paper-2); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  /* A rounded sheet that drops just below the header, so the Menu button stays visible and closes it. */
  .nav {
    display: none; position: absolute; top: calc(100% + 8px);
    left: max(8px, calc(var(--gutter) - 8px)); right: max(8px, calc(var(--gutter) - 8px));
    flex-direction: column; align-items: stretch; gap: 0; z-index: 20;
    background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 0.5rem 0.5rem 0.75rem;
    /* Short landscape screens: the sheet scrolls inside itself so its button stays reachable. */
    max-height: calc(100vh - var(--header-h) - 16px); max-height: calc(100dvh - var(--header-h) - 16px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { position: relative; padding: 0.8rem 0.85rem; border-radius: var(--radius-sm); }
  /* Inset hairlines between rows; hidden next to a highlighted row. */
  .nav a:not(.btn) + a:not(.btn)::before {
    content: ""; position: absolute; top: 0; left: 0.85rem; right: 0.85rem; height: 1px; background: var(--line-soft);
  }
  .nav a:not(.btn):hover { background: var(--paper-2); }
  .nav a:not(.btn):hover::before, .nav a:not(.btn):hover + a::before,
  .nav a[aria-current="page"]::before, .nav a[aria-current="page"] + a::before { display: none; }
  .nav a[aria-current="page"] { background: var(--gold-tint); color: var(--gold-deep); }
  .nav .btn { margin: 0.6rem 0 0; padding-block: 0.9rem; text-align: center; }
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 0.98rem; line-height: 1.2;
  padding: 0.85rem 1.35rem; border-radius: var(--radius-sm); border: 1.5px solid var(--navy);
  background: var(--navy); color: var(--paper); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--paper); box-shadow: var(--shadow-md); }
.btn:active { box-shadow: var(--shadow-xs); }
.btn-primary {
  background: var(--gold); border-color: var(--gold); color: var(--navy-deep);
  box-shadow: 0 1px 2px rgba(138, 98, 18, 0.25), 0 4px 12px -6px rgba(138, 98, 18, 0.45);
}
.btn-primary:hover {
  background: var(--gold-light); border-color: var(--gold-light); color: var(--navy-deep);
  box-shadow: 0 2px 4px rgba(138, 98, 18, 0.22), 0 10px 22px -10px rgba(138, 98, 18, 0.6);
}
.btn-outline { background: rgba(255, 255, 255, 0.55); color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--navy-deep); border-color: var(--paper); }
.btn-paper:hover { background: var(--paper-2); border-color: var(--paper-2); color: var(--navy-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 1.75rem; }
.btn-row .aside { font-size: 0.9rem; color: var(--muted); flex-basis: 100%; margin-top: 0.15rem; }
/* Phones: buttons in a row share its width, and go full width once they wrap. */
@media (max-width: 599px) { .btn-row > .btn { flex: 1 1 auto; text-align: center; } }

/* Sections --------------------------------------------------------------- */
/* The rule between sections is a 1px background line that stops at the content width. */
.section {
  padding-block: var(--section);
  background-image: linear-gradient(var(--line-soft), var(--line-soft));
  background-repeat: no-repeat;
  background-position: top center;
  background-size: calc(min(100%, 76rem) - 2 * var(--gutter)) 1px;
}
.section:first-of-type, .hero, .section-flush { background-image: none; }
/* Straight on from the page intro, with no rule (the embedded quote and login pages). */
.section-flush { padding-top: 0; }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; gap: 3rem; }
  .section-head > p { margin-bottom: 0.4rem; }
}
.section-head h2 { margin-bottom: 0; }

/* The navy band is a rounded panel inside the page margins. */
.band {
  background: var(--navy); color: var(--paper);
  width: calc(100% - 2 * clamp(8px, 2vw, 24px)); max-width: calc(76rem + 4rem);
  margin-inline: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
main:has(> .band:last-child) .band:last-child { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
/* The booking page is one band: give it breathing room under the header. */
main > .band:first-child { margin-top: clamp(1rem, 3vw, 2rem); }
.band h1, .band h2, .band h3, .band .eyebrow { color: var(--paper); }
/* The booking page's title is its h1 but keeps the band's h2 size. */
.band h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.band .eyebrow { color: var(--gold-light); }
.band a:not(.btn) { color: var(--paper); }
.band .muted { color: #c3c9dc; }
.band .section-head:last-child { margin-bottom: 0; }
.band .btn { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.band .btn:hover { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.55); }
.band .btn-outline { background: transparent; }
.band .btn-outline:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--paper); }

/* Hero ------------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) var(--section); }
.hero-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; }
}
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.5rem; }
.hero-figure { margin: 0; position: relative; }
/* Single column: keep the portrait from filling a whole tablet screen. */
@media (max-width: 899px) { .hero-figure { max-width: 26rem; } }
.hero-figure figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.85rem; }
/* Gold frame around the hero portrait: a solid gold border with a thin paper mat
   between it and the photo, rounded at the corners. */
.hero-figure .portrait, .hero-figure .portrait-empty {
  display: block; box-sizing: border-box;
  padding: 6px; background: var(--paper);
  border: 3px solid var(--gold); border-radius: var(--radius-lg);
  outline: 1px solid var(--gold-deep); outline-offset: 0;
  box-shadow: var(--shadow-lg);
}
.hero-figure .portrait-empty { background-clip: content-box; }

/* Portraits -------------------------------------------------------------- */
.portrait { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: 50% 18%; border-radius: var(--radius); background: var(--paper-2); box-shadow: inset 0 0 0 1px rgba(31, 28, 23, 0.08), var(--shadow-md); }
.portrait-empty {
  aspect-ratio: 4 / 5; width: 100%; border-radius: var(--radius); background: var(--paper-2);
  display: grid; place-items: center; color: var(--paper-3);
  font-family: var(--font-display); font-size: clamp(4rem, 10vw, 7rem); font-weight: 600;
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,0.025) 14px 15px);
}
.portrait-sm { max-width: 320px; }
.bio-grid .portrait { box-shadow: var(--shadow-md); }

/* Cards ------------------------------------------------------------------ */
/* Warm-white surfaces with a soft edge. Padding is set per component below. */
.card,
.columns-2 > .list-rules,
.steps li,
.note-card,
.quotes blockquote,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

/* Service lists ---------------------------------------------------------- */
.columns-3 { display: grid; gap: 2.5rem 3rem; }
@media (min-width: 720px) { .columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Insurance groups on the home page, one card each. */
.service-groups { display: grid; gap: 1.25rem; }
.service-groups > .card { padding: 1.35rem 1.25rem 0.9rem; }
.service-groups > .card:hover { box-shadow: var(--shadow-md); border-color: var(--paper-3); }
.service-groups .group-title { margin-bottom: 0.6rem; }
@media (min-width: 640px) { .service-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Four across: a smaller list size keeps every line on one row, and each group title
   gets two lines so the first rows line up. */
@media (min-width: 1000px) {
  .service-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
  .service-groups > .card { padding-inline: 1.2rem; }
  .service-groups .group-title h3 { min-height: 2.16em; }
  .service-groups .list-rules a { font-size: 0.97rem; gap: 0.6rem; }
}
.footnote { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); font-size: 0.82rem; color: var(--muted); max-width: var(--measure); }
.footnote p { margin-bottom: 0.6em; }
.columns-2 { display: grid; gap: 2.5rem 3rem; }
@media (min-width: 800px) { .columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Rows inside lists: separators stay, hover gets a soft rounded highlight. */
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-rules > li { border-top: 1px solid var(--line-soft); }
.list-rules > li:last-child { border-bottom: 1px solid var(--line-soft); }
.list-rules a {
  padding: 0.7rem 0.6rem; margin-inline: -0.6rem; border-radius: var(--radius-xs);
  text-decoration: none; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.list-rules a:hover { color: var(--gold-deep); background: var(--paper-2); }
.list-rules a::after { content: "→"; color: var(--brass); font-size: 0.9em; transition: transform var(--dur) var(--ease); }
.list-rules .note { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.15rem; }
/* On a card, the card edge does the job of the outer rules. */
.service-groups .list-rules > li:first-child,
.columns-2 > .list-rules > li:first-child { border-top: 0; }
.service-groups .list-rules > li:last-child,
.columns-2 > .list-rules > li:last-child { border-bottom: 0; }

/* Insurance index: the list of lines sits on a card beside its intro. */
.columns-2 > .list-rules { padding: 0.5rem 1.35rem; align-self: start; }
.columns-2 > .list-rules:hover { box-shadow: var(--shadow-md); }
.columns-2 > .list-rules a { padding-block: 0.85rem; }

.group-title { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem; }
.group-title h3 { margin: 0; }
.group-title p { margin: 0.5rem 0 1rem; color: var(--ink-2); }

/* Steps ------------------------------------------------------------------ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
.steps li { counter-increment: step; padding: 1.5rem 1.5rem 1.6rem; }
/* The step number sits in a gold-tint circle. */
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: inline-grid; place-items: center; min-width: 3.1rem; height: 3.1rem; padding: 0 0.5rem;
  font-family: var(--font-display); font-size: 1.45rem; line-height: 1; font-variation-settings: "opsz" 48;
  background: var(--gold-tint); color: var(--gold-deep); border-radius: 999px; margin-bottom: 1rem;
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--ink-2); }

/* Owner / bio ------------------------------------------------------------ */
.bio-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 720px) { .bio-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.5rem; align-items: start; } }
@media (min-width: 900px) { .bio-grid { gap: 4rem; } }
/* Pin the portrait column only beside the text, below the sticky header, and only on
   screens tall enough to show the whole column under it. */
@media (min-width: 720px) and (min-height: 860px) { .bio-grid .sticky { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.bio-meta { margin-top: 1rem; font-size: 0.92rem; color: var(--ink-2); }
.bio-meta dt { font-weight: 600; color: var(--ink); margin-top: 0.7rem; }
.bio-meta dd { margin: 0; }
.prose { max-width: var(--measure); }
.prose p { margin-bottom: 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose-large { font-size: 1.1rem; }
/* A name that links to the person's page: reads as a heading, underlines on hover. */
.heading-link { color: inherit; text-decoration: none; }
.heading-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }

/* Home page: every agent gets the same card, side by side. */
.agents { display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .agents { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2rem; } }
.agent { padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1.25rem; }
.agent-head { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 1.25rem; align-items: center; }
@media (min-width: 560px) { .agent-head { grid-template-columns: 170px minmax(0, 1fr); gap: 1.5rem; } }
.agent-head .portrait { box-shadow: var(--shadow-md); }
.agent-head .portrait-empty { font-size: 3rem; }
.agent-head h3 { margin: 0 0 0.3rem; }
.agent-head h3 a { display: inline-block; padding-block: 0.4rem; margin-block: -0.4rem; }
.agent-head .muted { margin: 0; }
/* Buttons sit on the same line in every card, however long each bio is. */
.agent .btn-row { margin-top: auto; padding-top: 0.5rem; }
@media (min-width: 720px) and (max-width: 899px) {
  .bio-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.pullquote {
  font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3;
  background: var(--gold-tint); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--gold);
  padding: 1.25rem 1.5rem; margin: 2rem 0; color: var(--ink);
  font-variation-settings: "opsz" 72;
}

/* Community -------------------------------------------------------------- */
.notes { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.note-card { padding: 1.35rem 1.35rem 1.5rem; }
.note-card img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.note-card:has(img) { padding: 0.6rem 0.6rem 1.35rem; }
.note-card:has(img) > :not(img) { margin-inline: 0.75rem; }
.note-card h3 { margin-bottom: 0.2rem; }
.note-card time { display: inline-block; margin-bottom: 0.35rem; font-size: 0.85rem; color: var(--muted); }

/* Booking ---------------------------------------------------------------- */
.book-grid { display: grid; gap: 2rem; }
@media (min-width: 960px) { .book-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 3rem; align-items: start; } }
.event-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.event-list li { border-top: 1px solid rgba(255,255,255,0.18); }
.event-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.18); }
.event-list a {
  display: block; padding: 0.8rem 0.6rem; text-decoration: none; color: var(--paper);
  border-radius: var(--radius-xs); transition: background-color var(--dur) var(--ease);
}
.event-list a:hover { background: rgba(255,255,255,0.06); }
.event-list a[aria-current="true"] { background: rgba(255,255,255,0.1); box-shadow: inset 3px 0 0 var(--gold-light); padding-left: 0.9rem; }
.event-list .who { display: block; font-size: 0.85rem; color: #c3c9dc; }
.cal-frame { background: var(--paper); border-radius: var(--radius); overflow: hidden; min-height: 640px; padding: 0.25rem; }
.cal-frame iframe { border-radius: var(--radius-sm); }
.cal-fallback { background: rgba(255,255,255,0.06); border: 1px dashed rgba(255,255,255,0.3); padding: 1.5rem; border-radius: var(--radius); }
.cal-fallback h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-variation-settings: "opsz" 48; }

/* Embedded EZLynx pages (quote form, client center) ---------------------- */
.embed-frame { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.embed-frame iframe { display: block; width: 100%; border: 0; }
.embed-note { margin-top: 1rem; }
.embed-open { display: none; margin: 0 0 1rem; }
/* Phones: the button above opens the EZLynx page full screen instead of the frame. The frames
   leave dead space (client center) or scroll the page on load (quote form) at these widths. */
@media (max-width: 600px) {
  .embed-open { display: block; }
  .embed-open .btn { display: block; text-align: center; }
  .embed-frame, .embed-frame-note { display: none; }
}

/* Forms ------------------------------------------------------------------ */
.form-grid { display: grid; gap: 1.25rem; max-width: 40rem; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; padding: 0; }
/* Warm grey field border at 3:1 against white, so the field edges stay visible (WCAG 1.4.11). */
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; padding: 0.7rem 0.85rem; border: 1px solid #949086; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); box-shadow: inset 0 1px 2px rgba(16, 26, 54, 0.04);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* Browsers ignore line-height on a select: match the text inputs' height (line, padding, borders). */
.field select { min-height: calc(1.6em + 1.4rem + 2px); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy); outline: 0; box-shadow: 0 0 0 1px var(--navy), 0 0 0 4px rgba(20, 35, 79, 0.16);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 0; }
.field .help { font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; }
.field .errorlist { list-style: none; margin: 0.35rem 0 0; padding: 0; color: var(--error); font-size: 0.9rem; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.radio-row label { font-weight: 400; display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }
.radio-row ul { list-style: none; margin: 0; padding: 0; display: contents; }
.radio-row input { accent-color: var(--navy); }
/* The text-field focus ring disappears into a radio's border: give radios the site's gold ring. */
.radio-row input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: none; }
@media (max-width: 640px) {
  .radio-row label { min-height: 2.75rem; }
  .radio-row input { width: 1.25rem; height: 1.25rem; margin: 0; }
}
/* Phones: the form's submit button goes full width like the other phone buttons. */
@media (max-width: 599px) { .form-grid > div > .btn[type="submit"] { display: block; width: 100%; } }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-errors { border-left: 3px solid var(--error); border-radius: var(--radius-sm); padding: 0.6rem 1rem; background: #fbeceb; margin-bottom: 1.25rem; }
.form-errors ul { margin: 0; padding-left: 1rem; }

/* Contact block ---------------------------------------------------------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; } }
.contact-card { padding: 1.5rem 1.6rem; margin: 0; align-self: start; }
.contact-card dt { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); font-weight: 600; margin-top: 1.1rem; }
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: 0.2rem 0 0; }
.contact-card a { text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
/* Small phones: the agency email's long domain fits on one line after the <wbr> break before the @. */
@media (max-width: 400px) {
  a[href^="mailto:"] { font-size: min(1em, 4.5vw); }
  .contact-card { padding-inline: 1.15rem; }
}

/* Testimonials ----------------------------------------------------------- */
.quotes { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quotes blockquote { margin: 0; padding: 1.5rem 1.5rem 1.35rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.quotes blockquote p { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.4; font-variation-settings: "opsz" 36; margin-bottom: 0; }
.quotes cite { font-style: normal; font-size: 0.9rem; color: var(--muted); }

/* Footer ----------------------------------------------------------------- */
.footer { background: var(--navy-deep); color: #d5d9e7; margin-top: var(--section); font-size: 0.93rem; }
/* One section-sized gap above the footer, and none under a closing navy band. */
main > .section:last-child:not(.band) { padding-bottom: 0; }
main:has(> .band:last-child) + .footer { margin-top: 0; }
.footer .container { padding-block: 3rem 2rem; display: grid; gap: 2rem; }
@media (min-width: 360px) and (max-width: 799px) {
  .footer .container { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .footer .container > div:first-child { grid-column: 1 / -1; }
}
@media (min-width: 800px) { .footer .container { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 { color: var(--paper); font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.7rem; }
.footer a { color: var(--paper); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.35rem; }
@media (max-width: 799px) {
  .footer li { margin-bottom: 0; }
  .footer li a { display: inline-block; padding-block: 0.5rem; }
  .footer a[href^="tel:"], .footer a[href^="mailto:"] { display: inline-block; padding-block: 0.5rem; }
}
.footer .wordmark { color: var(--paper); margin-bottom: 0.8rem; }
.footer .wordmark-sub { color: var(--gold-light); }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.25rem; font-size: 0.82rem; color: #a3abc4; }
.footer-legal p { margin-bottom: 0.5rem; }

/* Page intro ------------------------------------------------------------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 20ch; }
/* Phones: less dead space between the intro and the first section. */
@media (max-width: 640px) { .page-head + .section:not(.band):not(.section-flush) { padding-top: 1rem; } }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: inherit; }

.handy { background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 1.5rem clamp(1.1rem, 4vw, 1.6rem); }
.handy h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-variation-settings: "opsz" 48; margin-bottom: 0.5rem; }
.handy ul { margin: 0; padding-left: 1.1rem; }
.handy li { margin-bottom: 0.3rem; }
/* The gold ring is under 3:1 on this tinted box; the deeper gold passes. */
.handy :focus-visible { outline-color: var(--gold-deep); }

.related { margin-top: 3rem; }
.related h2 { font-size: 1.15rem; font-variation-settings: "opsz" 24; }

/* Messages --------------------------------------------------------------- */
.messages { list-style: none; margin: 0; padding: 0; }
.messages li { background: var(--navy-soft); border-left: 3px solid var(--navy); border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin: 1rem 0; }

/* Motion ----------------------------------------------------------------- */
/* Lifts only for a real pointer (no sticky hover after a tap) and only when motion is welcome. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0); }
  .service-groups > .card:hover { transform: translateY(-2px); }
  .list-rules a:hover::after { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .topbar, .nav, .nav-toggle, .footer, .btn { display: none !important; }
  .masthead { position: static; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .band { box-shadow: none; }
}
