:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #000;
  --teal: #103b3e;
  --panel-teal: #016b79;
  --filled-background: var(--teal);
  --filled-foreground: #fff;
  --muted: #404040;
  --line: #dedede;
  --header-height: 3.75rem;
  --content-gutter: clamp(1rem, 2.4vw, 2.5rem);
  --shell-inset: 3.5rem;
  --page-inset: max(var(--shell-inset), (100vw - 75rem) / 2);
  --hero-copy-width: calc(43vw - var(--page-inset) - 1.5rem);
  --section-heading-size: min(clamp(3.5rem, 6.8vw, 7rem), calc(var(--hero-copy-width) / 8));
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font: 400 1rem/.99 var(--serif); }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
[id] { scroll-margin-top: 1.25rem; }
.shell { width: min(calc(100% - 2 * var(--shell-inset)), 75rem); margin-inline: auto; }
.home-page > main > section:not(.hero-carousel) { margin-inline: var(--content-gutter); }
.skip-link { position: fixed; top: .6rem; left: .6rem; z-index: 10; padding: .5rem 1rem; background: var(--paper); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:where(.site-header, #listings, .services, .neighborhoods, #team, .contact) {
  background: var(--paper);
  color: var(--ink);
}

:where(.site-header, #team) {
  color-scheme: dark;
  --paper: var(--panel-teal);
  --ink: #fff;
  --filled-background: #fff;
  --filled-foreground: var(--paper);
  --muted: #e0eff0;
  --line: #a1c0c2;
}

.services {
  --paper: #10344a;
  --ink: #fff;
  --muted: #e0ecf2;
  --line: #8ca9b9;
  padding-block: 4.5rem 5.25rem;
  background-image: url("listings-background.png");
  background-position: center;
  background-size: cover;
}

.site-header { position: sticky; top: 0; z-index: 2; }
.home-page > .site-header { position: fixed; inset: 0 0 auto; background: transparent; pointer-events: none; }
.home-page > .site-header :is(.brand, .menu-toggle, #site-nav a) { pointer-events: auto; }
.home-page > .site-header:is(.is-scrolled, :has(.menu-toggle[aria-expanded="true"])) { background: var(--panel-teal); pointer-events: auto; }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; flex: none; align-items: center; gap: .6rem; text-decoration: none; }
.site-header .brand { color: #a8ece3; }
.brand-mark { width: 2.25rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #31567e; color: #ffe5a0; font-size: 1.4rem; line-height: 1; }
.wordmark { display: grid; gap: .18rem; font: 400 1.65rem/.9 var(--serif); }
.wordmark span { font: 700 .76rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.site-header .wordmark { display: flex; align-items: center; gap: .45rem; font-size: 1.5rem; white-space: nowrap; }
#site-nav { display: flex; align-items: center; gap: clamp(.85rem, 2.5vw, 2.4rem); font-size: .925rem; font-weight: 600; }
#site-nav > a { text-decoration: none; }
#site-nav > a:hover { text-decoration: underline; text-underline-offset: .3rem; }
.menu-toggle { display: flex; min-height: 2.75rem; align-items: center; gap: .55rem; border: 1px solid var(--ink); border-radius: .2rem; padding: .35rem .75rem; background: transparent; color: var(--ink); cursor: pointer; }
.menu-toggle span { width: .9rem; height: .55rem; border-block: 1px solid currentColor; }

.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: .65rem 1.3rem; border: 1px solid transparent; border-radius: .2rem; font-size: .95rem; line-height: 1.25; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .18s, color .18s; }
.button-outline { border-color: var(--ink); }
.button-outline:hover { background: #f2f2f2; }
.button-primary { background: var(--filled-background); color: var(--filled-foreground); }
.button-primary:hover { background: #1a5458; }

.hero-carousel { --hero-inset: max(var(--shell-inset), (100% - 75rem) / 2); position: relative; background: #102d3c; color: #fff; }
.hero-stage { display: grid; }
.hero { --ink: #fff; --muted: #e7edf0; position: relative; isolation: isolate; grid-area: 1 / 1; min-height: clamp(29.25rem, 67.5svh, 39rem); display: grid; align-items: end; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #071b2ad9, #071b2a38 27%, #071b2a17 42%, #071b2aab 68%, #071b2af2); }
.hero[inert] { visibility: hidden; }
.hero-inner { width: min(calc(100% - 2 * var(--hero-inset)), 55rem); justify-self: end; margin-inline-end: var(--hero-inset); padding-block: 6.5rem 5.4rem; text-align: right; }
.hero-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.eyebrow { color: var(--ink); font-size: .875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero :is(h1, h2) { margin-block: 1.2rem 1.5rem; font-size: var(--section-heading-size); line-height: .95; letter-spacing: -.03em; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; margin-top: 1.65rem; }
.hero-listing :is(h1, h2) { margin-bottom: .65rem; overflow-wrap: anywhere; }
.hero-listing :is(h1, h2) a { text-decoration: none; text-underline-offset: .13em; }
.hero-listing :is(h1, h2) a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hero-listing :is(h1, h2) a:hover { text-decoration: underline; }
.hero-location, .hero-listing-facts { color: var(--muted); }
.hero-listing-price { margin-top: .9rem; font-size: clamp(1.25rem, 2.5vw, 1.65rem); font-weight: 700; }
.hero-media { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.hero-media figcaption { position: absolute; left: var(--hero-inset); bottom: 4.9rem; max-width: calc(100% - 2 * var(--hero-inset)); padding: .3rem .6rem; background: #102d3ce6; color: #fff; font-size: .8125rem; }
.hero-controls { --ink: #fff; position: absolute; z-index: 1; inset: auto 0 .65rem; display: grid; grid-template: "previous rotation next" auto / 1fr auto 1fr; align-items: center; padding-block: .55rem; pointer-events: none; }
.hero-control { display: grid; place-items: center; width: 2.75rem; min-height: 2.75rem; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; pointer-events: auto; }
.hero-control:hover { color: #c2e8f2; }
.hero-control:hover::before { scale: 1.2; }
.hero-rotation { grid-area: rotation; }
.hero-rotation::before { content: ""; width: .75rem; height: .85rem; border-inline: 3px solid currentColor; }
.hero-rotation[data-paused]::before { border: 0; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.hero-arrow::before { content: ""; width: .67rem; aspect-ratio: 1; border: solid currentColor; border-width: 2px 2px 0 0; }
.hero-previous { grid-area: previous; justify-self: start; }
.hero-previous::before { transform: translateX(.12rem) rotate(-135deg); }
.hero-next { grid-area: next; justify-self: end; }
.hero-next::before { transform: translateX(-.12rem) rotate(45deg); }

.directory-section { padding-block: clamp(3rem, 5vw, 4.75rem); border-bottom: 1px solid var(--line); }
.directory-section h2 { margin-top: 0; }
.directory-group { margin-top: 1.6rem; }
.directory-group h3 { margin-bottom: .65rem; font: 700 1rem/1.4 var(--sans); }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.directory-card { display: grid; height: 100%; min-width: 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: .25rem; color: var(--muted); font-size: .875rem; text-decoration: none; transition: background-color .18s, border-color .18s; }
.directory-card:hover { border-color: var(--ink); background: #f7f7f7; }
#team .directory-card:hover { background: var(--teal); }
.directory-card:hover .directory-card-title { text-decoration: underline; text-underline-offset: .18rem; }
.directory-card-title { display: block; margin-block: .2rem; color: var(--ink); font: 400 clamp(1.65rem, 2.5vw, 2.05rem)/1.03 var(--serif); overflow-wrap: anywhere; }
.listing-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem .6rem; }
.listing-card-top strong { color: var(--ink); font-size: 1rem; }
.listing-card-facts { margin-top: .45rem; color: var(--ink); }
.directory-note { margin-top: .9rem; color: var(--muted); font-size: .875rem; }
#listings { padding-block: clamp(2rem, 3.5vw, 2.75rem); }
#listings .directory-group { margin-top: 1rem; }
#listings .directory-group h3 { margin-bottom: .4rem; }
#listings .directory-grid { gap: .6rem; }
#listings .listing-card { padding: .58rem .95rem; line-height: 1.35; }
#listings .directory-card-title { margin-block: .1rem; font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
#listings .listing-card-facts { margin-top: .25rem; }
#listings .directory-note { margin-top: .65rem; }
.team-grid { margin-top: 1.6rem; }
.agent-card { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .85rem; }
.agent-monogram { display: grid; place-items: center; width: 2.75rem; aspect-ratio: 1; border-radius: 50%; background: #f1f1f1; color: var(--ink); font: 400 1.2rem/1 var(--serif); }
#team .agent-monogram { color: var(--teal); }

.detail-page { width: min(calc(100% - 2 * (var(--shell-inset) + var(--content-gutter))), 75rem); min-height: 68vh; padding-block: clamp(2.25rem, 6vw, 5rem); }
.detail-return { display: inline-block; margin-bottom: 2rem; font-weight: 700; text-underline-offset: .3rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.detail-content h1 { margin-block: .6rem .8rem; font-size: clamp(3rem, 6vw, 5.5rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.detail-content h2, .detail-contact h2, .agent-listings h2 { margin-block: 0 .65rem; font-size: clamp(2rem, 4vw, 3rem); }
.detail-content > p:not(.eyebrow) { max-width: 36rem; }
.detail-content .text-link { display: inline-block; margin-top: .75rem; }
.detail-location { color: var(--muted); }
.detail-price { margin-top: 1rem; font-size: 1.35rem; font-weight: 700; }
.listing-facts { display: flex; flex-wrap: wrap; gap: .85rem 1.75rem; margin: 1.25rem 0 1.8rem; padding-block: .85rem; border-block: 1px solid var(--line); }
.listing-facts dt { color: var(--muted); font-size: .875rem; }
.listing-facts dd { margin: 0; font-weight: 700; }
.detail-contact { display: grid; justify-items: start; gap: .65rem; padding: clamp(1.1rem, 3.5vw, 2rem); border: 1px solid var(--line); border-radius: .25rem; }
.detail-contact h2 { margin-bottom: 0; }
.detail-contact .button { margin-top: .4rem; }
.detail-contact .directory-note { margin: 0; }
.detail-phone, .detail-people a { text-underline-offset: .25rem; }
.detail-people { margin: 0; padding: 0; list-style: none; }
.profile-monogram { width: 5rem; margin-bottom: 1.1rem; font-size: 2rem; }
.profile-portrait { width: 10rem; height: auto; margin-bottom: 1.1rem; border-radius: .25rem; }
.profile-bio { font-size: 1.1rem; }
.agent-listings { margin-top: 3rem; }

.section-intro { margin-bottom: 2rem; text-align: center; }
h2 { margin-top: .55rem; font-size: var(--section-heading-size); letter-spacing: -.025em; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: .85rem; padding: clamp(1.2rem, 3vw, 2.05rem); border: 1px solid var(--line); border-radius: .25rem; }
.service-card:target { border-color: var(--ink); outline: 1px solid var(--ink); }
.service-card h3 { font-size: clamp(2.1rem, 3vw, 2.65rem); }
.service-card p, .neighborhoods-content > p:last-of-type { color: var(--muted); }
.text-link { margin-top: auto; padding-block: .35rem; color: var(--ink); font-weight: 700; text-underline-offset: .3rem; text-decoration-color: #777; }
.service-card .text-link { text-decoration-color: var(--line); }
.text-link:hover { text-decoration-color: currentColor; }
.service-icon { display: block; position: relative; width: 2.45rem; height: 2.45rem; border-radius: 50%; background: var(--ink); color: var(--paper); }
.service-icon::before, .service-icon::after { content: ""; position: absolute; }
.icon-home::before { width: .85rem; height: .69rem; left: .8rem; top: 1.03rem; border: 1.5px solid currentColor; border-top: 0; }
.icon-home::after { width: .76rem; height: .76rem; top: .69rem; left: .84rem; border: solid currentColor; border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); }
.icon-sale::before { height: 1.15rem; left: .78rem; top: .65rem; border-left: 1.5px solid currentColor; box-shadow: -.24rem 1.05rem 0 -.05rem currentColor; }
.icon-sale::after { width: .78rem; height: .59rem; top: .8rem; left: .93rem; border: 1.5px solid currentColor; }
.icon-key::before { width: .56rem; height: .56rem; left: .67rem; top: .69rem; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-key::after { width: .76rem; height: .25rem; left: 1.03rem; top: 1.2rem; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }

.neighborhoods { padding-block: clamp(3rem, 7vw, 6rem); border-block: 1px solid var(--line); }
.neighborhoods-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 7vw, 6.5rem); align-items: center; }
.neighborhoods img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: center 52%; border-radius: .25rem; }
.neighborhoods-content > p:last-of-type { margin-top: 1.1rem; max-width: 32rem; }
.area-list { margin-top: 1.55rem; border-top: 1px solid var(--line); }
.area-list details { border-bottom: 1px solid var(--line); }
.area-list summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3.5rem; padding: .65rem 0; color: var(--ink); cursor: pointer; font-weight: 700; list-style: none; }
.area-list summary::-webkit-details-marker { display: none; }
.area-list summary::after { content: ""; flex: 0 0 .47rem; height: .47rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; margin-right: .4rem; transform: rotate(45deg); }
.area-list details[open] summary::after { transform: rotate(225deg); }
.area-list p { max-width: 31rem; padding: 0 1.3rem .85rem 0; color: var(--muted); }

.contact { padding-block: clamp(1.5rem, calc(6.5vw - 1.8rem), 4.6rem); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.1rem, 4vw, 3.5rem); align-items: center; }
.contact h2 { line-height: .91; }
.contact-copy > p:last-of-type { margin-top: .85rem; max-width: 24rem; color: var(--muted); }
.contact address { display: grid; justify-items: start; gap: .15rem; margin-top: .85rem; font-style: normal; }
.contact address > a { text-underline-offset: .25rem; }
.inquiry-form { display: grid; gap: .55rem; min-width: 0; padding: clamp(.85rem, 2.2vw, 1.5rem); border: 1px solid var(--line); border-radius: .25rem; background: var(--paper); }
.inquiry-form h3 { font-size: 2rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.inquiry-form label { display: grid; gap: .25rem; min-width: 0; color: var(--ink); font-size: .9rem; font-weight: 700; line-height: 1.35; }
.inquiry-form :is(input, select, textarea) { width: 100%; padding: .5rem .6rem; border: 1px solid #858585; border-radius: .16rem; background: var(--paper); color: var(--ink); font-size: 1rem; font-weight: 400; line-height: 1.35; }
.inquiry-form :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
.inquiry-form :is(input, select) { min-height: 2.6rem; }
.inquiry-form select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: right 14px center, right 9px center; background-size: 5px 5px; background-repeat: no-repeat; }
.inquiry-form textarea { resize: vertical; min-height: 4rem; }
.inquiry-form button { justify-self: start; min-height: 2.75rem; }
.contact .button-primary:focus-visible { outline-color: var(--ink); }
.form-note, .form-status { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.form-note a { text-underline-offset: .15rem; }
.form-status:empty { display: none; }

.site-footer {
  --paper: #10283a;
  --ink: #fff;
  --muted: #d5e1eb;
  --line: #60798b;
  padding-block: 2.5rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.footer-inner { display: grid; grid-template-columns: minmax(9rem, 1.15fr) minmax(0, 3fr) auto; gap: 1.75rem clamp(1rem, 3vw, 2.75rem); align-items: start; }
.footer-inner > .brand { justify-self: start; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem 1rem; }
.footer-heading { margin-bottom: .4rem; font-size: .95rem; font-weight: 700; }
.footer-nav ul, .footer-social-links { margin: 0; padding: 0; list-style: none; }
.footer-nav ul { display: grid; gap: .35rem; }
.footer-nav a { color: var(--muted); font-size: .875rem; text-decoration: none; text-underline-offset: .2rem; }
.footer-nav a:hover, .footer-nav a:focus-visible { text-decoration: underline; }
.footer-social-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.footer-social-icon { display: grid; place-items: center; width: 2.3rem; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; }
.footer-social-icon img { filter: invert(1); }
.footer-copyright { grid-column: 1 / -1; width: 100%; padding-top: .9rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

.info-content { max-width: 43rem; }
.info-content h2 { margin-block: 1.5rem .55rem; }
.info-content p + p { margin-top: .8rem; }
.info-content p a { text-underline-offset: .2rem; overflow-wrap: anywhere; }

@media (max-width: 59rem) {
  :root { --shell-inset: 1.75rem; }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  :root { --header-height: 3.1875rem; --hero-copy-width: calc(100vw - 2 * var(--page-inset)); }
  .header-inner { flex-wrap: wrap; gap: 0 .8rem; padding-block: .2rem; }
  #site-nav { flex: 1 0 100%; align-items: stretch; flex-direction: column; gap: 0; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; padding-top: .5rem; }
  #site-nav > a { padding: .6rem 0; border-top: 1px solid var(--line); }
  .hero-inner { padding-top: 7.25rem; }
  .hero-media figcaption { top: 5rem; right: var(--hero-inset); bottom: auto; left: auto; }
  .services { padding-block: 3.5rem; }
  .service-grid, .neighborhoods-grid, .contact-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .service-grid { gap: .7rem; }
  .neighborhoods img { aspect-ratio: 4 / 3; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (min-width: 36rem) and (max-width: 48rem) {
  .contact-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.25rem; }
  .contact-copy > :is(.eyebrow, h2) { grid-column: 1 / -1; }
  .contact address { align-self: start; }
}

@media (max-width: 30rem) {
  :root { --shell-inset: 1.05rem; }
  .site-header .brand { gap: .4rem; }
  .site-header .brand-mark { width: 2rem; }
  .site-header .wordmark { gap: .32rem; font-size: clamp(1.1rem, 4.6vw, 1.5rem); }
  .site-header .wordmark span { font-size: .625rem; letter-spacing: .11em; }
  .hero-eyebrow { letter-spacing: .07em; }
  .contact { padding-block: 1.9rem; }
  .directory-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
