/* ════════════════════════════════════════════════════
   BALANOFF LAW — Global Styles
   Palette extracted from the firm logo (door hanger PDF)
   ════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Lato:wght@300;400;700&family=Inter:wght@400;600;700&family=Ubuntu:wght@400;500;700&display=swap');

:root {
  /* Brand colors */
  --navy: #3a51a3;          /* logo wordmark & shield stripes */
  --navy-deep: #243367;     /* darker variation */
  --navy-ink: #18234a;      /* darkest — headings */
  --red: #c42018;           /* six-pointed stars, divider rule */
  --red-dark: #a31a13;
  --lavender: #e8eaf4;      /* light background tint (from PDF back) */
  --periwinkle: #8694c6;    /* mid accent */
  --sky: #c6cfe9;           /* light variation */
  --white: #ffffff;
  --off-white: #f7f8fc;
  --text: #2a3142;
  --text-muted: #5a6275;

  --font-heading: 'EB Garamond', Georgia, serif;
  --font-body: 'Lato', 'Segoe UI', sans-serif;
  --font-nav: 'Inter', 'Segoe UI', sans-serif;       /* Ankin Law header body font */
  --font-block: 'Ubuntu', 'Segoe UI', sans-serif;    /* Ankin Law heading font */

  --container: 1200px;
  --shadow-tile: 0 10px 30px rgba(36, 51, 103, 0.18);
  --shadow-soft: 0 4px 16px rgba(36, 51, 103, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy-ink); line-height: 1.2; }

a { color: var(--navy); }

::selection { background: var(--red); color: var(--white); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
}

.rule { width: 64px; height: 3px; background: var(--red); margin: 20px 0; }
.rule.center { margin-left: auto; margin-right: auto; }

/* ════════ Top utility bar ════════ */
.topbar {
  background: var(--navy-deep);
  color: var(--white);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  gap: 16px;
}
.topbar a { color: var(--white); text-decoration: none; font-weight: 700; }
.topbar a:hover { text-decoration: underline; }
.topbar .tagline { opacity: 0.85; }

/* ════════ Header / nav ════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--lavender);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 250ms ease;
}
.site-header.scrolled { box-shadow: var(--shadow-soft); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  gap: 24px;
  position: relative;
}
.brand { display: flex; align-items: center; }
.brand img { height: 58px; width: auto; }

.main-nav ul { display: flex; gap: 22px; list-style: none; align-items: center; }
.main-nav a {
  display: inline-block;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--navy-ink);
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border-radius: 4px;
  transition: background 200ms ease, color 200ms ease;
  cursor: pointer;
}
.main-nav a:hover, .main-nav a:focus-visible { background: var(--lavender); color: var(--navy); }
.main-nav a.active { color: var(--red); }

.has-dropdown { position: relative; }
.has-dropdown > a::after { content: ' ▾'; font-size: 0.7em; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 330px;
  border: 1px solid var(--lavender);
  border-top: 3px solid var(--red);
  box-shadow: var(--shadow-soft);
  list-style: none;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a { display: block; padding: 10px 18px; border-radius: 0; }

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 14px 22px !important;
  border-radius: 4px;
  font-family: var(--font-block) !important;
  font-weight: 700 !important;
  font-size: 1.02rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em !important;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--red-dark) !important; color: var(--white) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.nav-toggle span {
  display: block; width: 26px; height: 3px;
  background: var(--navy-ink); margin: 5px 0; border-radius: 2px;
  transition: transform 250ms ease, opacity 250ms ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ════════ Hero collage ════════ */
.hero {
  background: var(--white);
  overflow: hidden;
  position: relative;
  padding: 28px 16px 8px;
}

.collage {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  aspect-ratio: 1240 / 780;
  z-index: 1;
}

/* CTA 'L' map watermark behind the collage */
.hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-map svg { width: 100%; height: 100%; }
.hero-map .l-line {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.18;
}
.hero-map .l-loop {
  fill: none;
  stroke-width: 8;
  opacity: 0.2;
}
.hero-map .train-dot { opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .hero-map .train-dot { display: none; }
}

.tile {
  position: absolute;
  overflow: hidden;
  box-shadow: var(--shadow-tile);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }

/* flat translucent squares — the stepped checkerboard from the style ref */
.tile.flat { box-shadow: none; }
.t-lav  { background: var(--lavender); }
.t-sky  { background: var(--sky); opacity: 0.6; }
.t-peri { background: var(--periwinkle); opacity: 0.4; }
.t-navy-soft { background: var(--navy); opacity: 0.12; }

/* placeholder tiles awaiting photos */
.tile.placeholder {
  background: var(--lavender);
  border: 2px dashed var(--periwinkle);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px;
  box-shadow: none;
}

/* --- tile positions (desktop) — % of 1240x780 canvas, aspect = native photo --- */
.tile-headshot    { left: 28.5%; top: 24%; width: 43%;   aspect-ratio: 4088 / 2725; z-index: 5; }
.tile-tugboat     { left: 6%;    top: 8%;  width: 19%;   aspect-ratio: 802 / 665;   z-index: 4; }
.tile-brownstones { left: 3%;    top: 52%; width: 23.5%; aspect-ratio: 1000 / 564;  z-index: 4; }
.tile-willis      { left: 74%;   top: 10%; width: 13.5%; aspect-ratio: 452 / 678;   z-index: 4; }
.tile-skyline     { left: 73.5%; top: 56%; width: 22%;   aspect-ratio: 4 / 3;       z-index: 4; }
.tile-daley       { left: 28.5%; top: 3%;  width: 16%;   aspect-ratio: 16 / 9;      z-index: 4; }
.tile-house       { left: 38%;   top: 74%; width: 15%;   aspect-ratio: 500 / 462;   z-index: 4; }

/* navy headline tile — echoes the title block in the style ref */
.tile-title {
  left: 47%; top: 5%; width: 24.5%; height: 16%;
  background: var(--navy);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.6% 2%;
}
.tile-title .tile-line {
  font-family: var(--font-heading);
  color: var(--white);
  font-size: clamp(1rem, 1.8vw, 1.7rem);
  line-height: 1.3;
}
.tile-title .tile-rule {
  width: 56px;
  height: 3px;
  background: var(--red);
  margin-top: 10px;
}

/* stepped flat squares */
.f1  { left: 17%;   top: 0%;    width: 9%;   aspect-ratio: 1; }
.f2  { left: 8%;    top: 41.5%; width: 9%;   aspect-ratio: 1; }
.f3  { left: 0%;    top: 30%;   width: 8%;   aspect-ratio: 1; }
.f4  { left: 26.5%; top: 66%;   width: 10%;  aspect-ratio: 1; z-index: 6; }
.f5  { left: 36.5%; top: 81%;   width: 10%;  aspect-ratio: 1; }
.f6  { left: 56%;   top: 87%;   width: 9%;   aspect-ratio: 1; }
.f7  { left: 88%;   top: 50%;   width: 9%;   aspect-ratio: 1; }
.f8  { left: 93%;   top: 38%;   width: 7%;   aspect-ratio: 1; }
.f9  { left: 64%;   top: 1.5%;  width: 7%;   aspect-ratio: 1; z-index: 2; }
.f10 { left: 88.5%; top: 76%;   width: 7.5%; aspect-ratio: 1; }
.f11 { left: 21%;   top: 14%;   width: 7.5%; aspect-ratio: 1; z-index: 2; }
.f12 { left: 29%;   top: 85%;   width: 7%;   aspect-ratio: 1; z-index: 6; }

/* ════════ Logo overlay + gleam ════════ */
.hero-logo {
  position: absolute;
  left: 29.8%;
  top: 39%;
  width: 21.5%;
  z-index: 7;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9))
          drop-shadow(0 0 18px rgba(255, 255, 255, 0.75))
          drop-shadow(0 4px 14px rgba(24, 35, 74, 0.3));
}
.hero-logo img { width: 100%; height: auto; }

/* soft glow pulsing behind the shield */
.hero-logo::before {
  content: '';
  position: absolute;
  left: -7%;
  top: -16%;
  width: 40%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(198,207,233,0.55) 45%, transparent 70%);
  z-index: -1;
  animation: shield-glow 7s ease-in-out infinite;
}

/* gleam sweep masked to the logo's own pixels */
.hero-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0) 58%,
    transparent 70%);
  background-size: 280% 100%;
  background-position: 120% 0;
  -webkit-mask-image: url('../assets/logo-full.png');
  -webkit-mask-size: 100% 100%;
  mask-image: url('../assets/logo-full.png');
  mask-size: 100% 100%;
  animation: gleam 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gleam {
  0%, 55%   { background-position: 120% 0; }
  85%, 100% { background-position: -60% 0; }
}
@keyframes shield-glow {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.12); }
}

/* ════════ Hero strip below collage ════════ */
.hero-strip {
  background: var(--navy-deep);
  color: var(--white);
  text-align: center;
  padding: 48px 24px 56px;
  margin-top: 28px;
}
.hero-strip h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 600;
}
.hero-strip .rule { margin: 18px auto; }
.hero-strip p {
  max-width: 660px;
  margin: 0 auto 28px;
  color: var(--sky);
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-size: 0.92rem;
  text-transform: uppercase;
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border: 2px solid var(--sky); color: var(--white); margin-left: 12px; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ════════ Practice areas ════════ */
.section { padding: 88px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head p.lede { color: var(--text-muted); }
.section-head h2 { font-size: clamp(2rem, 3.2vw, 2.7rem); font-weight: 600; }

.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.practice-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--lavender);
  border-top: 3px solid transparent;
  padding: 36px 30px;
  text-decoration: none;
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.practice-card:hover, .practice-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-tile);
  border-top-color: var(--red);
}
.practice-card svg { width: 40px; height: 40px; color: var(--red); margin-bottom: 18px; }
.practice-card h3 { font-size: 1.35rem; margin-bottom: 10px; font-weight: 600; }
.practice-card p { font-size: 1rem; color: var(--text-muted); margin-bottom: 16px; }
.practice-card .more {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid var(--periwinkle);
  padding-bottom: 2px;
}
.practice-card:hover .more { color: var(--red); border-bottom-color: var(--red); }

/* ════════ Roots / community ════════ */
.roots { background: var(--navy-deep); color: var(--white); }
.roots-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.roots .kicker { color: var(--sky); }
.roots h2 { color: var(--white); font-size: clamp(1.5rem, 2.3vw, 2.1rem); font-weight: 600; white-space: nowrap; }
.roots p { color: rgba(255,255,255,0.95); margin-bottom: 20px; text-align: justify; }
.roots .btn-ghost { margin-left: 0; margin-top: 8px; }

/* full-frame photos: Ping Tom stacked on the museum, equal width */
.roots-collage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
}
.rc {
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  transition: transform 400ms ease;
}
.rc:hover { transform: scale(1.03); z-index: 10; }
.rc img { width: 100%; height: auto; display: block; }

/* Metra photo beside the Our Family Story button */
.roots-cta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.rc-metra { max-width: 300px; flex: 1 1 220px; }

/* ════════ Quote band ════════ */
.quote-band { background: var(--lavender); text-align: center; }
.section.quote-band { padding: 40px 0; }
.quote-band blockquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--navy-ink);
  max-width: 820px;
  margin: 0 auto 24px;
  line-height: 1.5;
}
.quote-attr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
}
.quote-attr::before, .quote-attr::after {
  content: '';
  width: 48px; height: 1px; background: var(--periwinkle);
}

/* ════════ CTA banner ════════ */
.cta-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(36, 51, 103, 0.78), rgba(24, 35, 74, 0.85));
}
.cta-inner { position: relative; z-index: 1; padding: 64px 24px; }
.cta-inner .kicker {
  color: var(--sky);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);  /* 150% larger than standard kicker */
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}
.cta-inner h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 28px;
}
.cta-inner h2 a { color: var(--white); text-decoration: none; }

/* ════════ Footer ════════ */
.site-footer { background: var(--navy-ink); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo-panel {
  background: var(--white);
  border-radius: 6px;
  padding: 16px 20px;
  display: inline-block;
  margin-bottom: 18px;
}
.footer-logo-panel img { height: 52px; width: auto; }
.site-footer h4 {
  color: var(--sky);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.93rem; transition: color 200ms ease; }
.site-footer a:hover { color: var(--white); }
.footer-phone { font-family: var(--font-heading); font-size: 1.4rem; color: var(--white) !important; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.footer-disclaimer {
  width: 100%;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}
.footer-address { font-style: normal; color: rgba(255,255,255,0.65); font-size: 0.93rem; line-height: 1.5; }

/* mailing list signup (footer) */
.mailing-list { margin-top: 22px; }
.mailing-list label {
  display: block;
  color: var(--sky);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.mailing-list .ml-row { display: flex; gap: 8px; max-width: 340px; }
.mailing-list input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.93rem;
}
.mailing-list input::placeholder { color: rgba(255,255,255,0.45); }
.mailing-list input:focus { outline: 2px solid var(--sky); background: rgba(255,255,255,0.14); }
.mailing-list button {
  padding: 11px 20px;
  border: none;
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease;
}
.mailing-list button:hover { background: var(--red-dark); }


/* ════════ Interior pages ════════ */
.page-hero {
  background: var(--lavender);
  text-align: center;
  padding: 32px 24px;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 600;
}
.page-hero .rule { margin: 18px auto 0; }
.page-hero .lede {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}
.intro-grid .photo {
  overflow: hidden;
  box-shadow: var(--shadow-tile);
}
.intro-grid .photo img { width: 100%; height: auto; display: block; }
.intro-grid h2 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); font-weight: 600; }
.intro-grid.flip .photo { order: 2; }
@media (max-width: 900px) {
  .intro-grid.flip .photo { order: 0; }
}

/* photo height locked to the text column beside it (absolute so the
   photo's intrinsic height can't stretch the row past the text) */
.intro-grid.fit-photo { align-items: stretch; }
.intro-grid.fit-photo .photo { align-self: stretch; position: relative; }
.intro-grid.fit-photo .photo img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}
@media (max-width: 900px) {
  .intro-grid.fit-photo .photo { position: static; }
  .intro-grid.fit-photo .photo img { position: static; height: auto; }
}
.intro-grid p { color: var(--text); margin-bottom: 18px; text-align: justify; }
.intro-grid .btn { margin-top: 8px; }

.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.doc-cards .practice-card { cursor: default; }

/* paired photo cards (e.g. residential vs commercial) */
.duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.duo-card {
  background: var(--white);
  border: 1px solid var(--lavender);
  box-shadow: var(--shadow-soft);
}
.duo-card .duo-photo { overflow: hidden; }
.duo-card .duo-photo img { width: 100%; height: auto; display: block; }
.duo-card .duo-body { padding: 28px 30px 32px; }
.duo-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.duo-card p { color: var(--text-muted); text-align: justify; }
@media (max-width: 720px) {
  .duo-grid { grid-template-columns: 1fr; }
}

.doc-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 32px;
}
.doc-item {
  background: var(--off-white);
  border-left: 3px solid var(--periwinkle);
  padding: 18px 20px;
}
.doc-item h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--navy-ink);
  margin-bottom: 6px;
}
.doc-item p { font-size: 0.95rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; gap: 32px; }
  .doc-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .doc-cards { grid-template-columns: 1fr; }
  .doc-list { grid-template-columns: 1fr; }
}

/* ════════ Family history page ════════ */
.member { scroll-margin-top: 100px; }

/* keep member portraits compact so the whole image is visible without scrolling */
.member .photo {
  overflow: visible;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.member .photo img {
  max-height: 400px;
  width: auto;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow-tile);
}
.member-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.member-head .member-role {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 10px;
}
.member-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 600;
}
.member-head .tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--navy);
  margin-top: 6px;
}

/* responsive video player */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-tile);
}
.video-frame video,
.video-frame img { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.media-caption { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* a row of supporting photos under a member's intro */
.media-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
}
.media-row figure {
  background: var(--white);
  border: 1px solid var(--lavender);
  box-shadow: var(--shadow-soft);
}
.media-row figure img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  background: var(--lavender);
  display: block;
}
.media-row figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: center;
}
/* keep all gallery captions to a single line */
.media-row figcaption,
.media-row .media-caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the 1989 newspaper article scans */
.article-scans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.article-scans figure { box-shadow: var(--shadow-tile); border: 1px solid var(--lavender); }
.article-scans img { width: 100%; height: auto; display: block; }
.article-scans figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--white);
  text-align: center;
}
@media (max-width: 720px) {
  .article-scans { grid-template-columns: 1fr; }
}

/* ════════ Contact / intake form ════════ */
.contact-details { list-style: none; margin-top: 24px; }
.contact-details li { margin-bottom: 12px; font-size: 1.02rem; }
.contact-details a { color: var(--navy); font-weight: 700; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-details .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 2px;
}

.intake-form {
  background: var(--white);
  border: 1px solid var(--lavender);
  border-top: 3px solid var(--red);
  box-shadow: var(--shadow-soft);
  padding: 36px 34px;
}
.intake-form h2 { font-size: 1.6rem; font-weight: 600; margin-bottom: 6px; }
.intake-form .form-note { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy-ink);
  margin-bottom: 6px;
}
.form-field .req { color: var(--red); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--periwinkle);
  border-radius: 4px;
  background: var(--off-white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  background: var(--white);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.intake-form .btn { border: none; width: 100%; font-size: 1rem; }
.intake-form .privacy-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 14px; }

@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .intake-form { padding: 26px 20px; }
}

/* ════════ Scroll reveal ════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }
.reveal:nth-child(5) { transition-delay: 320ms; }
.reveal:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-logo::before, .hero-logo::after { animation: none; }
  .hero-logo::after { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ════════ Responsive ════════ */
@media (max-width: 1000px) {
  .practice-grid { grid-template-columns: repeat(2, 1fr); }
  .roots-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--lavender);
    box-shadow: var(--shadow-soft);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px; }
  .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-left: 3px solid var(--lavender);
    margin-left: 14px;
    min-width: 0;
  }
  .nav-toggle { display: block; }
}

@media (max-width: 720px) {
  .roots h2 { white-space: normal; }

  /* hero: hide the busy train-map graphic and the logo glow/gleam on phones */
  .hero-map { display: none; }
  .hero-logo::before, .hero-logo::after { display: none; }

  /* family page: stack the 3-up media rows and let captions wrap */
  .media-row { grid-template-columns: 1fr !important; }
  .media-row figcaption, .media-row .media-caption { white-space: normal; }
  .member .photo { flex-direction: column; align-items: center; }

  /* simplified collage: title, headshot + logo, then photo grid */
  .collage { aspect-ratio: auto; display: flex; flex-direction: column; gap: 14px; }
  .tile, .hero-logo { position: static; }
  .tile.flat { display: none; }
  .tile-title { width: auto; height: auto; padding: 20px; order: 1; }
  .headshot-wrap { position: relative; order: 2; }
  .tile-headshot { width: 100%; }
  .hero-logo {
    position: absolute;
    left: 4%; top: 30%; width: 56%;
  }
  .mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; order: 3; }
  .mobile-grid .tile { position: static; width: auto; aspect-ratio: 4 / 3; }
  .topbar .tagline { display: none; }
  .practice-grid { grid-template-columns: 1fr; }
  .btn-ghost { margin-left: 0; margin-top: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
