/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:      #ededed;
  --ink:     #1A1F2B;
  --muted:   #5C6370;
  --gold:    #b9975b;
  --navy:    #00263a;
  --white:   #FFFFFF;
  --surface: #FFFFFF;
  --border:  #DDD9D0;
  --accent:  #b9975b;
  --radius:  4px;
  --gap:     2rem;
  --max:     1280px;
}

.no-transition * { transition: none !important; }
[id] { scroll-margin-top: 100px; }

/* ── FOCUS ──────────────────────────────────────────────── */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--radius); }

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ───────────────────────────────────────────────── */
body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: 'Questrial', sans-serif; line-height: 1.1; font-weight: 300; text-wrap: pretty;}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 40px; }
h2 { font-size: clamp(1.7rem, 3vw, 2rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.3rem; margin-bottom: .6rem; }

p { color: var(--muted); margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.container     { width: 90%; max-width: var(--max); margin-inline: auto; }
.container--sm { width: 90%; max-width: 640px; margin-inline: auto; }
.container--xs { width: 90%; max-width: 580px; margin-inline: auto; }

/* ── GRID ───────────────────────────────────────────────── */
.grid       { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid--2    { display: grid; gap: var(--gap); grid-template-columns: repeat(2, 1fr); }
.grid--3    { display: grid; gap: var(--gap); grid-template-columns: repeat(3, 1fr); }
.grid--4    { display: grid; gap: var(--gap); grid-template-columns: repeat(4, 1fr); }
.grid--2-1  { display: grid; gap: var(--gap); grid-template-columns: 2fr 1fr; align-items: start; }
.grid--form { display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; align-items: start; }

/* ── UTILITIES ──────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1        { margin-top: 1rem; }
.mb-gap      { margin-bottom: var(--gap); }
.mb-sm       { margin-bottom: .4rem; }
.mb-md       { margin-bottom: .5rem; }
.intro       { margin-bottom: 2.5rem; }
.bio         { margin-bottom: var(--gap); }

/* ── MAIN ───────────────────────────────────────────────── */
main { flex: 1; }




/* ── PHOTO BANNERS ─────────────────────────────────────────────── */
.photo-banner{background-size:cover; background-position:center; padding-block: clamp(60px, 8.5vw, 100px); margin-bottom: 50px; position:relative;}
.photo-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(146deg, rgba(0,0,0,.8) 1%, rgba(0,0,0,0.1) 100%);
  mix-blend-mode: multiply;
  z-index: 1;
}
.photo-banner .container{z-index:900; position:relative;}

.photo-banner h1, .photo-banner p { text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
.photo-banner h1{ color:white; margin-bottom:0;}

.photo-banner.about{ background-image:url(../images/about-banner.webp); }
.photo-banner.contact{ background-image:url(../images/contact-banner.webp); }
.photo-banner.services{ background-image:url(../images/services-banner.webp); }


/* ── COMPONENTS ─────────────────────────────────────────── */
.card {
  background: #fff;
  border: none;
  border-top: 3px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

.card h2 { margin-bottom: 10px; border-bottom: 1px solid var(--gold); padding-bottom: 10px; }
.card h3 { font-weight: 500; color: var(--gold); }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  font-family: 'Roboto', sans-serif;
  font-size: .9rem;
  font-weight: 500;
  padding: 15px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  letter-spacing: .03em;
  transition: opacity .15s;
  text-decoration: none;
  line-height: 1em;
}
.btn:hover { opacity: .85; text-decoration: none; }

.btn-outline { display: inline-block; background: transparent; color: #fff; font-family: 'Roboto', sans-serif; font-size: .9rem; font-weight: 500; padding: .8rem 2rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.5); cursor: pointer; letter-spacing: .03em; transition: background .15s; text-decoration: none; }
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; }

.label { display: inline-block; font-size: 1rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0; text-wrap: pretty;}

.matter-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.matter-item:last-child { border-bottom: none; padding-bottom: 0; }
.matter-item i { font-size: 1rem; color: var(--gold); flex-shrink: 0; }
.matter-item span { font-size: .9rem; color: var(--muted); line-height: 1rem; text-wrap: pretty; }

.error-list { font-size: .875rem; margin-bottom: .5rem; }
.error-list p { color: #a32d2d; margin-bottom: .25rem; }
.optional { font-weight: 400; color: var(--muted); }
.required-note { font-size: .8rem; color: var(--muted); margin-top: -.25rem; }
li.mb-sm { margin-bottom: .4rem; }
li.mb-md { margin-bottom: .5rem; }

/* ── FADE IN ─────────────────────────────────────────────── */
/* Applied to inner divs, not sections, to avoid z-index stacking context issues */
.fade-in {
  opacity: 0;
  transition: opacity .6s ease;
}
.fade-in.visible { opacity: 1; }

/* ── SKIP LINK ───────────────────────────────────────────── */
.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: var(--radius); font-size: .875rem; z-index: 200; }
.skip-link:focus { top: 1rem; }

/* ── HEADER ─────────────────────────────────────────────── */
header {
  background: rgba(0, 38, 58, 0.92);

  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
   isolation: isolate;
  z-index: 1000;
}
header .container { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; }
.site-logo { width: 230px; display: block; }
.site-logo img { height: 48px; width: auto; display: block; }

nav ul { display: flex; gap: 2rem; align-items: center; }
nav a {
  color: var(--white);
  font-size: .88rem;
  font-weight: 500;
  display: inline-block;
  transition: color .15s, transform .15s ease;
}

nav a:hover,
nav a.active {
  color: var(--gold);
  text-decoration: none;
}

nav a:hover {
  transform: scale(1.15);
}

/* ── NAV DROPDOWN ───────────────────────────────────────── */
.nav-dropdown { position: relative; padding-top: 2px; }

.nav-dropdown__toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white);
  font-family: 'Roboto', sans-serif;
  font-size: .88rem;
  font-weight: 500;
  padding: 0;
  line-height: inherit;
  vertical-align: middle;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: color .15s, transform .15s ease;
}
.nav-dropdown__toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: var(--radius); }
.nav-dropdown__toggle:hover,
.nav-dropdown.active .nav-dropdown__toggle { color: var(--gold);
  transform: scale(1.15); }

/* Caret arrow */
.nav-dropdown__caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .2s ease;
  position: relative;
  top: 1px;
}
.nav-dropdown__toggle[aria-expanded="true"] .nav-dropdown__caret { transform: rotate(180deg); }

/* Desktop flyout */
@media (min-width: 681px) {
  .nav-dropdown__menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--navy);
    border-top: 2px solid var(--gold);
    border-radius: var(--radius);
    min-width: 180px;
    flex-direction: column;
    gap: 0;
    padding: .3rem 0;
    margin-top: 1.25rem;      /* visible gap below header */
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    z-index: 1100;
    overflow:hidden;
  }

  .nav-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 1.25rem; /* matches your margin-top gap */
}

.nav-dropdown:hover .nav-dropdown__caret {
  transform: rotate(180deg);
}

  /* Padding-top bridge: invisible hover area covering the gap above the menu */
  .nav-dropdown__menu::before {
    content: "";
    position: absolute;
    inset: -2.5rem 0 auto 0;
    height: 2.5rem;
  }

  .nav-dropdown:hover .nav-dropdown__menu,
  .nav-dropdown__toggle[aria-expanded="true"] + .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
  }

  .nav-dropdown__menu li { display: block; display: block; width: 100%; text-align: center; }
  .nav-dropdown__menu li:first-child a { border-radius: var(--radius) var(--radius) 0 0; }
  .nav-dropdown__menu li:last-child a  { border-radius: 0 0 var(--radius) var(--radius); }

  .nav-dropdown__menu a {
    display: block;
    padding: .6rem 1.2rem;
    font-size: .85rem;
    color: var(--white);
    white-space: nowrap;
    transition: background .15s, color .15s;
    margin-inline: 0;
  }
  .nav-dropdown__menu a:hover,
  .nav-dropdown__menu a.active {
    background: rgba(185,151,91,.12);
    color: var(--gold);
    text-decoration: none;
    padding-left: 1.2rem;
  }

  .nav-dropdown:hover .nav-dropdown__toggle,
.nav-dropdown__toggle:hover,
.nav-dropdown.active .nav-dropdown__toggle {
  color: var(--gold);
  transform: scale(1.15);
}
}

@media (hover: hover) and (pointer: fine) {
  nav a:hover { transform: scale(1.15); }
  .nav-dropdown__toggle:hover { transform: scale(1.15); }
}

/* ── SECTIONS ───────────────────────────────────────────── */
section { padding-block: 5rem; }
section + section { border-top: 1px solid var(--border); }

section#real-estate, section#about, section#contact, section#business-law{ padding-block-start: 0; }

.bio-text img, img.float{ float: left; padding: 0 20px 10px 0; width: 50%; max-width:300px;}

.about-section::after {
  content: "";
  display: block;
  clear: both;
}

.about-section {
  overflow: auto; /* or overflow: hidden */
}

/* ── CONSULT CTA ─────────────────────────────────────────── */
#consult, .white-fill{ background: #ffffff; }


/* ── HERO ───────────────────────────────────────────────── */
#hero {
  position: relative;
   padding-block: clamp(5rem, 18vw, 10rem);
  background: url(../images/stowe-village.webp) center center / cover no-repeat;
}
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(146deg, rgba(0,0,0,.8) 1%, rgba(0,0,0,0.1) 100%);
  mix-blend-mode: multiply;
  z-index: 1;
}
#hero .container { position: relative; z-index: 2; }
#hero .label { color: var(--gold); }
#hero h1 { color: #fff; max-width: 22ch; margin-bottom: 1.25rem; }
#hero p { color: rgba(255,255,255,.75); max-width: 56ch; font-size: 1.05rem; margin-bottom: 2rem; }
#hero h1, #hero p { text-shadow: 0 1px 8px rgba(0,0,0,0.6); }

/* ── FORMS ──────────────────────────────────────────────── */
form { display: grid; gap: 1.1rem; }
label { font-size: .83rem; font-weight: 500; color: var(--ink); display: block; margin-bottom: .3rem; }
input, textarea, select { width: 100%; font-family: 'Roboto', sans-serif; font-size: .95rem; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); transition: border-color .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; min-height: 130px; }

/* ── FOOTER ─────────────────────────────────────────────── */
footer { background: var(--gold); color: var(--surface); padding-block: 3rem; }
footer .container { display: flex; justify-content: space-between; align-items: start; gap: 2rem; flex-wrap: wrap; }
.footer-logo { font-family: 'Questrial', sans-serif; font-size: 1.2rem; font-weight: 600; color: #fff; margin-bottom: .5rem; }
footer address { font-style: normal; }
footer p { color: rgba(255,255,255,.7); font-size: .875rem; margin-bottom: .3rem; }
footer a { color: rgba(255,255,255,.8); font-size: .875rem; }
footer a:hover { color: #fff; }
footer ul { display: flex; flex-direction: column; gap: .5rem; }
.disclaimer { border-top: 1px solid rgba(255,255,255,.2); margin-top: 2rem; padding-top: 1.5rem; width: 100%; }
footer nav li{text-align:left; width:100%;}


/* ── NAV VISIBILITY ─────────────────────────────────────── */
#main-nav {
  visibility: hidden;
  opacity: 0;
}

@media (min-width: 681px) {
  #main-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

/* ── HAMBURGER TOGGLE ───────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  border-radius: var(--radius);
  z-index: 1001;
}
.nav-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease, width .3s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid--4   { grid-template-columns: repeat(2, 1fr); }
  .grid--3   { grid-template-columns: repeat(2, 1fr); }
  .grid--2-1 { grid-template-columns: 1fr; }
  .grid--2-1 aside { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
}

@media (max-width: 680px) {
  .grid--2           { grid-template-columns: 1fr; }
  .grid--2-1         { grid-template-columns: 1fr; }
  .grid--form        { grid-template-columns: 1fr; }
  .grid--4           { grid-template-columns: 1fr; }
  .grid--3           { grid-template-columns: 1fr; }
  footer .container  { flex-direction: column; }
  .grid--2-1 aside   { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  #main-nav {
    position: fixed;
    inset: 0;
    top: 84px;
    background: linear-gradient(180deg, #003f5e 0%, #00263a 100%);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s cubic-bezier(.4,0,.2,1), visibility 0s linear .25s;
    z-index: 999;
    text-align: left;
    align-items: flex-start;
  }

  #main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .25s ease, transform .25s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  /* Regular top-level items (Home, About, Contact) get the divider on the <li> */
  #main-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  /* The dropdown's own <li> wraps the toggle + submenu — no border here,
     or it'll double up with the toggle's border below */
  #main-nav li.nav-dropdown {
    border-bottom: none;
  }

  #main-nav li:last-child {
    border-bottom: none;
  }

  #main-nav a {
    display: block;
    font-size: 1.3rem;
    padding: .9rem 0;
    color: var(--white);
    transition: padding-left .2s ease, color .15s;
    width: 100%;
    text-align: left;
    transform-origin: left center;
  }

  #main-nav a:hover,
  #main-nav a.active {
    padding-left: .75rem;
    color: var(--gold);
    text-decoration: none;
  }

  /* Mobile dropdown toggle */
  .nav-dropdown__toggle {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 1.3rem;
    padding: .9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    color: var(--white);
    transition: padding-left .2s ease, color .15s;
    justify-content: flex-start;
    transform-origin: left center;
  }

  .nav-dropdown__toggle:hover {
    padding-left: .75rem;
    color: var(--gold);
  }

  .nav-dropdown__menu {
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .3s ease, opacity .25s ease;
    padding-left: 1rem;
  }

  .nav-dropdown__toggle[aria-expanded="true"] + .nav-dropdown__menu {
    max-height: 200px;
    opacity: 1;
  }

  .nav-dropdown__menu a {
    display: block;
    font-size: 1.1rem;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .85);
  }

  .nav-dropdown__menu a:last-child {
    border-bottom: none;
  }

  .nav-dropdown__menu a:hover,
  .nav-dropdown__menu a.active {
    padding-left: .75rem;
    color: var(--gold);
    text-decoration: none;
  }

  /* Disable scale-on-hover inside the mobile nav — full-width blocks
     don't need it, and padding-left + color already gives feedback */
  #main-nav a:hover,
  .nav-dropdown__toggle:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
