/*
 * Cioffi Family Law: the landing page (2026-11 redesign, from the user's
 * sketch and reference): "Meet your counsel." over the four attorneys together,
 * then client experience beside a consultation form, then the practice areas,
 * the approach, resources and a closing line. It loads only fonts.css,
 * chrome.css (the shared header, footer, buttons and the variables) and this.
 * The inner pages (npm run law-pages) load this too, for its type, section
 * heads, lists, dark band, guides, form and closing line, then pages.css.
 * Every colour is one of the appearance script's variables, so both modes and
 * every accent hold.
 */
@property --sx {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

@property --sy {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 40%;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--cf-bar) + 24px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--cf-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* A warm light behind the opening. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 760px;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(var(--theme-glow), 0.13), transparent 70%),
    linear-gradient(var(--paper), var(--paper));
  z-index: -1;
  pointer-events: none;
}

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

h1,
h2,
h3,
p,
ol,
ul,
figure,
blockquote,
fieldset {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

em {
  font-style: italic;
  color: var(--accent-text);
}

main :focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection {
  background: rgba(var(--theme-glow), 0.28);
}

.wrap {
  width: var(--cf-wide);
  margin-inline: auto;
}

.title {
  font: 500 clamp(34px, 3.5vw, 48px) / 1.04 var(--cf-serif);
  letter-spacing: -0.012em;
  color: var(--heading);
  text-wrap: balance;
}

.title-lg {
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--accent-text);
  font: 700 11px/1 var(--cf-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--ink);
  font: 600 14.5px/1 var(--cf-sans);
  text-decoration: none;
  background: linear-gradient(var(--copper), var(--copper)) 0 100% / 100% 1px no-repeat;
  transition: color 0.25s;
}

.text-link b,
.guide-go b,
.roster-book b,
.who-tag b {
  display: inline-block;
  font-weight: 500;
  transition: transform 0.35s var(--cf-ease);
}

.text-link:hover {
  color: var(--accent-text);
}

.text-link:hover b {
  transform: translateX(5px);
}

/* What comes into view rises a little (only when scripts run: appearance.js marks <html>). */
.cf-js [data-reveal],
.cf-js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--cf-ease) var(--d, 0s),
    transform 0.9s var(--cf-ease) var(--d, 0s);
}

.cf-js [data-reveal].is-in,
.cf-js [data-reveal-group].is-in > * {
  opacity: 1;
  transform: none;
}

.cf-js [data-reveal-group].is-in > :nth-child(2) {
  transition-delay: 0.07s;
}

.cf-js [data-reveal-group].is-in > :nth-child(3) {
  transition-delay: 0.14s;
}

.cf-js [data-reveal-group].is-in > :nth-child(4) {
  transition-delay: 0.21s;
}

.cf-js [data-reveal-group].is-in > :nth-child(5) {
  transition-delay: 0.28s;
}

.cf-js [data-reveal-group].is-in > :nth-child(6) {
  transition-delay: 0.35s;
}

/* -------------------------------------------------------------------- hero */
.hero {
  padding: clamp(22px, 2.4vw, 36px) 0 clamp(48px, 6vw, 88px);
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font: 700 11px/1 var(--cf-sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  animation: hero-fade 0.9s var(--cf-ease) 0.05s both;
}

.hero-kicker i {
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--copper);
}

/* Where the firm works (user direction, 2026-11-14): Hackensack, Hoboken and Morristown, after a hairline. */
.hero-kicker-places {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--ink) 26%, transparent);
}

.hero-kicker-places svg {
  flex: none;
  width: 11px;
  height: 13px;
  margin-right: -4px;
  fill: none;
  stroke: var(--copper);
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.hero-kicker-places b {
  color: var(--ink);
  font-weight: 700;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero-kicker::before,
.hero-kicker::after {
  content: "";
  width: clamp(24px, 5vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 60%, color-mix(in srgb, var(--copper) 70%, transparent));
}

.hero-kicker::after {
  transform: scaleX(-1);
}

.hero-title {
  margin-top: clamp(8px, 0.9vw, 12px);
  font: 500 clamp(54px, 7.7vw, 122px) / 0.98 var(--cf-serif);
  letter-spacing: -0.028em;
  color: var(--heading);
}

/* Each word rises out of its own line. */
.hero-title .word {
  display: inline-block;
  overflow: hidden;
  padding: 0.04em 0.05em 0.16em;
  margin: -0.04em -0.05em -0.16em;
  vertical-align: bottom;
}

.hero-title .word > * {
  display: inline-block;
  animation: hero-rise 1.05s var(--cf-ease) both;
}

.hero-title .word:nth-child(1) > * {
  animation-delay: 0.08s;
}

.hero-title .word:nth-child(2) > * {
  animation-delay: 0.17s;
}

.hero-title .word:nth-child(3) > * {
  animation-delay: 0.26s;
}

.hero-deck {
  max-width: 86ch;
  margin: clamp(8px, 0.9vw, 12px) auto 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  text-wrap: balance;
  animation: hero-fade 1s var(--cf-ease) 0.45s both;
}

/*
 * The opening's text, with the firm's ground beside it (user direction, 2026-11-15: "a small graphic
 * that will show an image of NJ and mark 3 stars where hackensack, hoboken, morristown would be"):
 * New Jersey's outline, drawn from its border's coordinates, with a star on each town. The side tracks
 * are equal, so the text keeps the page's middle; --map-room is the map's width and its gap.
 */
.hero-head {
  --map-h: 164px;
  --map-room: calc(var(--map-h) * 0.5656 + 28px);
  display: grid;
  grid-template-columns: minmax(var(--map-room), 1fr) minmax(0, auto) minmax(var(--map-room), 1fr);
  align-items: center;
}

.hero-text {
  grid-column: 2;
  min-width: 0;
}

.hero-map {
  grid-column: 3;
  justify-self: end;
  height: var(--map-h);
  aspect-ratio: 62.22 / 110;
}

.nj {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The border draws itself round, then the ground tints. */
.nj-state {
  fill: rgba(var(--theme-glow), 0.1);
  stroke: var(--copper);
  stroke-width: 0.85;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  animation:
    nj-draw 1.7s var(--cf-ease) 0.35s backwards,
    nj-tint 1s ease 1.2s backwards;
}

@keyframes nj-draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes nj-tint {
  from {
    fill-opacity: 0;
  }
}

.nj-name {
  fill: var(--accent-text);
  font: italic 500 9.5px/1 var(--cf-serif);
  letter-spacing: 0.08em;
  text-anchor: middle;
  opacity: 0.8;
  animation: hero-fade-in 0.9s ease 1.5s backwards;
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
  }
}

/* A star on each town, set down one after another, then still (no breath of light round them: user direction, 2026-11-20). */
.nj-star path {
  fill: var(--copper);
  stroke: var(--paper);
  stroke-width: 0.7;
  paint-order: stroke;
  transform-box: fill-box;
  transform-origin: center;
  transition: scale 0.4s var(--cf-ease);
  animation: nj-set 0.7s var(--cf-ease) backwards;
}

.nj-star[data-town="morristown"] path {
  animation-delay: 1.45s;
}

.nj-star[data-town="hackensack"] path {
  animation-delay: 1.62s;
}

.nj-star[data-town="hoboken"] path {
  animation-delay: 1.79s;
}

@keyframes nj-set {
  from {
    scale: 0;
    rotate: -70deg;
  }
}

/* A town in the line above and its star answer each other. */
.hero-kicker-places b {
  transition: color 0.25s;
}

.hero-kicker-places b:hover,
.hero-head:has(.nj-star[data-town="hackensack"]:hover) b[data-town="hackensack"],
.hero-head:has(.nj-star[data-town="hoboken"]:hover) b[data-town="hoboken"],
.hero-head:has(.nj-star[data-town="morristown"]:hover) b[data-town="morristown"] {
  color: var(--accent-text);
}

.nj-star:hover path,
.hero-head:has(b[data-town="hackensack"]:hover) .nj-star[data-town="hackensack"] path,
.hero-head:has(b[data-town="hoboken"]:hover) .nj-star[data-town="hoboken"] path,
.hero-head:has(b[data-town="morristown"]:hover) .nj-star[data-town="morristown"] path {
  scale: 1.75;
}

@keyframes hero-rise {
  from {
    transform: translateY(108%) rotate(4deg);
  }
}

@keyframes hero-fade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* The portfolio's panels still cover the page: everything waits at its first frame. */
.cf-hold .hero *,
.cf-hold .hero *::before,
.cf-hold .hero *::after {
  animation-play-state: paused !important;
}

/* The attorneys, together: the photograph and, under it, who is who. */
.stage {
  position: relative;
  margin-top: clamp(22px, 2.4vw, 32px);
  border-radius: 22px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 50px 90px -50px rgba(19, 32, 45, 0.45),
    0 18px 36px -24px rgba(19, 32, 45, 0.25);
  text-align: left;
  animation: stage-in 1.3s var(--cf-ease) 0.3s both;
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(46px) scale(0.975);
  }
}

.stage-photo {
  position: relative;
  aspect-ratio: 1340 / 554;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  background: #cfc6b8;
  isolation: isolate;
}

.stage-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 50%;
  animation: photo-settle 2.4s var(--cf-ease) 0.3s both;
}

@keyframes photo-settle {
  from {
    transform: scale(1.09);
  }
}

/* A spotlight that finds whoever is pointed at (--sx, --sy: registered, so it glides between people).
   Every place on the photograph is a share of the whole picture; where the frame crops it (phones), --off and --vis say
   how: the share of its width cut off at the left, and the share of its width that shows. */
.stage-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse calc(16% / var(--vis, 1)) 60% at calc((var(--sx) - var(--off, 0%)) / var(--vis, 1)) var(--sy), rgba(9, 14, 20, 0) 0, rgba(9, 14, 20, 0) 44%, rgba(9, 14, 20, 0.56) 100%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    --sx 0.7s var(--cf-ease),
    --sy 0.7s var(--cf-ease);
}

.stage[data-active] .stage-photo::after {
  opacity: 1;
}

/* Each attorney is a link over their place in the photograph. */
.who {
  position: absolute;
  left: calc((var(--l) - var(--off, 0%)) / var(--vis, 1));
  top: var(--t);
  width: calc(var(--w) / var(--vis, 1));
  height: var(--h);
  z-index: 2;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.who-pin {
  position: absolute;
  left: var(--px);
  top: var(--py);
  width: 16px;
  height: 16px;
  margin: -8px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: var(--copper);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.24),
    0 3px 12px rgba(0, 0, 0, 0.5);
  transition:
    transform 0.4s var(--cf-ease),
    opacity 0.3s;
  animation: pin-in 0.7s var(--cf-ease) both;
}

.who:nth-of-type(1) .who-pin {
  animation-delay: 1.5s;
}

.who:nth-of-type(2) .who-pin {
  animation-delay: 1.8s;
}

.who:nth-of-type(3) .who-pin {
  animation-delay: 1.35s;
}

.who:nth-of-type(4) .who-pin {
  animation-delay: 1.65s;
}

@keyframes pin-in {
  from {
    opacity: 0;
    transform: scale(0);
  }
}

.who-pin::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: pin-ring 3.2s ease-out infinite;
}

@keyframes pin-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }

  70%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.who-tag {
  position: absolute;
  left: var(--px);
  top: calc(var(--py) + 20px);
  display: grid;
  gap: 3px;
  min-width: 168px;
  padding: 13px 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(14, 21, 30, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  opacity: 0;
  /* --nudge keeps it inside the photograph; [data-flip] puts it above the pin where there is no room below (home.js). */
  transform: translate(calc(-50% + var(--nudge, 0px)), var(--tag-y, 10px)) scale(0.96);
  transform-origin: 50% 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.45s var(--cf-ease);
}

.who-tag small {
  color: rgba(255, 255, 255, 0.72);
  font: 700 9.5px/1 var(--cf-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.who-tag strong {
  font: 500 25px/1.1 var(--cf-serif);
}

.who-tag > span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.86);
  font: 600 12px/1 var(--cf-sans);
}

.who.is-on .who-tag,
.who:focus-visible .who-tag {
  opacity: 1;
  transform: translate(calc(-50% + var(--nudge, 0px)), 0);
}

.who[data-flip] {
  --tag-y: -10px;
}

.who[data-flip] .who-tag {
  top: auto;
  bottom: calc(100% - var(--py) + 20px);
  transform-origin: 50% 100%;
}

.who.is-on .who-pin {
  transform: scale(1.3);
}

.who.is-on .who-tag b {
  transform: translateX(4px);
}

.stage[data-active] .who:not(.is-on) .who-pin {
  opacity: 0.35;
}

/* The roster: the same four, in the order they stand. */
.roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.roster-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(18px, 1.9vw, 28px) clamp(16px, 1.9vw, 30px) clamp(18px, 1.8vw, 26px);
  border-left: 1px solid var(--line);
  transition: background-color 0.4s;
}

.roster-item:first-child {
  border-left: 0;
  border-radius: 0 0 0 22px;
}

.roster-item:last-child {
  border-radius: 0 0 22px 0;
}

.roster-item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--cf-ease);
}

.roster-item.is-on {
  background: color-mix(in srgb, var(--copper) 7%, transparent);
}

.roster-item.is-on::before {
  transform: scaleX(1);
}

.roster-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.roster-face {
  display: none;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.roster-text {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.roster-role {
  color: var(--accent-text);
  font: 700 10px/1 var(--cf-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.roster-name {
  font: 500 clamp(24px, 2.2vw, 33px) / 1.05 var(--cf-serif);
  letter-spacing: -0.01em;
  color: var(--heading);
}

.roster-focus {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.roster-book {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 0;
  color: var(--ink);
  font: 600 13px/1 var(--cf-sans);
  text-decoration: none;
  background: linear-gradient(var(--copper), var(--copper)) 0 100% / 0 1px no-repeat;
  transition:
    background-size 0.4s var(--cf-ease),
    color 0.25s;
}

.roster-book:hover,
.roster-item.is-on .roster-book {
  background-size: 100% 1px;
  color: var(--accent-text);
}

.roster-book:hover b {
  transform: translateX(4px);
}

/* ------------------------------------------- client experience | consultation */
.duo {
  padding: clamp(28px, 4vw, 60px) 0 clamp(72px, 9vw, 130px);
}

.duo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 9vw, 130px);
  position: relative;
}

.duo-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(var(--line), var(--line) 70%, transparent);
}

.duo .title {
  padding-bottom: 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 34%, transparent);
}

.voices-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.stars {
  display: inline-flex;
  gap: 3px;
}

.stars i {
  width: 15px;
  height: 15px;
  background: var(--copper);
  clip-path: polygon(50% 0, 61.8% 35.3%, 98% 35.3%, 68.5% 57.3%, 79.4% 91.2%, 50% 70%, 20.6% 91.2%, 31.5% 57.3%, 2% 35.3%, 38.2% 35.3%);
}

/* The quotes share one cell, so the tallest sets the height and nothing moves as they change. */
.quotes {
  display: grid;
  margin-top: clamp(20px, 2.6vw, 36px);
}

.quote {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease,
    transform 0.7s var(--cf-ease),
    visibility 0s 0.5s;
}

.quote.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.7s ease 0.12s,
    transform 0.8s var(--cf-ease) 0.12s;
}

.quote blockquote {
  font: italic 500 clamp(28px, 3.1vw, 46px) / 1.14 var(--cf-serif);
  letter-spacing: -0.012em;
  color: var(--heading);
  text-wrap: balance;
}

.quote figcaption {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 13.5px;
}

.quote figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.quote figcaption strong::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-left: 12px;
  background: var(--line);
  vertical-align: middle;
}

.quote-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(22px, 2.4vw, 34px);
}

.quote-nav[hidden] {
  display: none;
}

.round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: 500 17px/1 var(--cf-sans);
  cursor: pointer;
  transition:
    background-color 0.25s,
    border-color 0.25s,
    color 0.25s,
    transform 0.35s var(--cf-ease);
}

.round:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.round:active {
  transform: scale(0.94);
}

.quote-dots {
  flex: 1;
  display: flex;
  gap: 8px;
}

.quote-dots button {
  flex: 1;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}

.quote-dots button::before,
.quote-dots button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}

.quote-dots button::after {
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
}

.quote-dots button[aria-current="true"]::after {
  transform: scaleX(1);
}

/* While the reviews turn by themselves, the current one's line fills as its time runs. */
.quote-dots[data-auto] button[aria-current="true"]::after {
  animation: dot-fill var(--quote-time, 7s) linear both;
}

.quote-dots[data-auto][data-paused] button[aria-current="true"]::after {
  animation-play-state: paused;
}

@keyframes dot-fill {
  from {
    transform: scaleX(0);
  }
}

.mentions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(24px, 2.6vw, 36px);
}

.mentions li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 500 12.5px/1 var(--cf-sans);
}

/* The form */
.form {
  position: relative;
  margin-top: 22px;
}

.form-progress {
  height: 2px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.form-progress i {
  display: block;
  height: 100%;
  width: 50%;
  background: var(--copper);
  transition: width 0.6s var(--cf-ease);
}

.form-step {
  display: none;
  gap: 12px;
}

.form-step.is-active {
  display: grid;
  animation: step-in 0.55s var(--cf-ease);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

.form-step legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin-bottom: 14px;
  font: 500 26px/1.1 var(--cf-serif);
  color: var(--heading);
}

.form-step legend span {
  color: var(--muted);
  font: 700 10.5px/1 var(--cf-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  position: relative;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 60px;
  padding: 24px 16px 8px;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 500 15.5px/1.3 var(--cf-sans);
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.2s,
    box-shadow 0.25s;
}

.field textarea {
  height: auto;
  min-height: 104px;
  padding-top: 28px;
  resize: vertical;
}

.field label {
  position: absolute;
  left: 17px;
  top: 20px;
  color: var(--muted);
  font: 500 15.5px/1.3 var(--cf-sans);
  pointer-events: none;
  transform-origin: 0 0;
  transition:
    transform 0.25s var(--cf-ease),
    color 0.2s;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label,
.field select[data-attorney] + label {
  transform: translateY(-11px) scale(0.74);
  color: var(--accent-text);
  letter-spacing: 0.04em;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--ink) 46%, transparent);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--copper);
  box-shadow: 0 0 0 4px rgba(var(--theme-glow), 0.18);
}

.field.is-wrong input,
.field.is-wrong select {
  border-color: #c2473d;
  box-shadow: 0 0 0 4px rgba(194, 71, 61, 0.12);
}

.field-error {
  display: block;
  margin: 6px 4px 0;
  color: #b83e34;
  font: 600 12px/1.3 var(--cf-sans);
}

html[data-interface="dark"] .field-error {
  color: #ff9d94;
}

.field-select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 25px;
  width: 8px;
  height: 8px;
  border: solid var(--ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

.field select {
  padding-right: 40px;
  cursor: pointer;
  text-overflow: ellipsis;
}

.field select option {
  background: var(--surface);
  color: var(--ink);
}

.chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
}

.chips-label {
  width: 100%;
  color: var(--muted);
  font: 500 12.5px/1 var(--cf-sans);
  margin-bottom: 2px;
}

.chips label {
  position: relative;
  cursor: pointer;
}

.chips input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chips label span {
  display: block;
  padding: 11px 18px;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 999px;
  color: var(--ink);
  font: 600 13px/1 var(--cf-sans);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.chips input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chips input:focus-visible + span {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.form-actions .cf-btn {
  height: 54px;
  padding: 0 30px;
  font-size: 15px;
  flex: none;
}

.form-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.form-note svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.form-done {
  padding: 26px 0 6px;
  animation: step-in 0.6s var(--cf-ease);
}

.form-done[hidden] {
  display: none;
}

.form-done:focus {
  outline: 0;
}

.form-check {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--copper);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-check circle {
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: draw 0.9s var(--cf-ease) 0.1s forwards;
}

.form-check path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw 0.5s var(--cf-ease) 0.65s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.form-done h3 {
  margin-top: 16px;
  font: 500 32px/1.1 var(--cf-serif);
  color: var(--heading);
}

.form-done p {
  max-width: 46ch;
  margin: 10px 0 22px;
  color: var(--muted);
}

/* ------------------------------------------------------------ practice areas */
.practice {
  padding: clamp(72px, 9vw, 130px) 0;
  background: var(--ivory);
  border-block: 1px solid var(--line);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px clamp(32px, 6vw, 96px);
  margin-bottom: clamp(32px, 4.4vw, 60px);
}

.sec-head .title {
  max-width: 21ch;
}

.sec-copy {
  max-width: 44ch;
  color: var(--muted);
  font-size: 16.5px;
  justify-self: end;
}

.areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  border-top: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
}

.areas a {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  padding: clamp(22px, 2.3vw, 32px) 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: padding 0.5s var(--cf-ease);
}

.areas a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--cf-ease);
}

.area-n {
  align-self: start;
  padding-top: 9px;
  color: var(--accent-text);
  font: 600 12px/1 var(--cf-sans);
  letter-spacing: 0.12em;
}

.area-text {
  display: grid;
  gap: 6px;
}

.area-text strong {
  font: 500 clamp(26px, 2.5vw, 36px) / 1.08 var(--cf-serif);
  letter-spacing: -0.01em;
  color: var(--heading);
  transition: color 0.3s;
}

.area-text span {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.area-go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 50%;
  font-size: 16px;
  transition:
    background-color 0.3s,
    border-color 0.3s,
    color 0.3s,
    transform 0.5s var(--cf-ease);
}

.areas a:hover,
.areas a:focus-visible {
  padding-left: 16px;
  padding-right: 0;
}

.areas a:hover::after,
.areas a:focus-visible::after {
  transform: scaleX(1);
}

.areas a:hover .area-text strong {
  color: var(--accent-text);
}

.areas a:hover .area-go,
.areas a:focus-visible .area-go {
  background: var(--copper);
  border-color: var(--copper);
  color: var(--on-accent);
  transform: rotate(-45deg);
}

.sec-more {
  margin-top: clamp(28px, 3vw, 44px);
}

/* ---------------------------------------------------------------- approach */
.approach {
  position: relative;
  padding: clamp(80px, 10vw, 150px) 0;
  background: var(--navy);
  color: #d5dbdf;
  overflow: hidden;
  isolation: isolate;
  /* Always the dark of the palette, whichever mode the page is in. */
  --heading: #f6f1e8;
  --ink: #f6f1e8;
  --muted: #a9b4bb;
  --line: rgba(230, 238, 247, 0.16);
  --accent-text: var(--copper-2, #d8c39b);
}

.approach-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--navy) 8%, color-mix(in srgb, var(--navy) 62%, transparent) 55%, color-mix(in srgb, var(--navy) 86%, transparent)),
    url("assets/architectural-hero-wide.webp") center / cover no-repeat;
  opacity: 0.9;
}

.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 8vw, 130px);
}

.approach-copy p:not(.eyebrow) {
  max-width: 44ch;
  margin: 22px 0 34px;
  color: var(--muted);
  font-size: 17px;
}

.approach .cf-btn--ghost {
  border-color: rgba(255, 255, 255, 0.32);
  color: #f6f1e8;
}

.approach .cf-btn--ghost:hover {
  border-color: #f6f1e8;
}

.steps {
  display: grid;
  border-top: 1px solid var(--line);
}

.steps li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: clamp(22px, 2.4vw, 32px) 0;
  border-bottom: 1px solid var(--line);
}

.step-n {
  font: italic 500 30px/1 var(--cf-serif);
  color: var(--accent-text);
}

.steps h3 {
  font: 500 clamp(24px, 2.2vw, 30px) / 1.1 var(--cf-serif);
  color: var(--heading);
}

.steps p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------- resources */
.guides {
  padding: clamp(72px, 9vw, 130px) 0;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
}

.guide {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(24px, 2.4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.6s var(--cf-ease),
    box-shadow 0.6s var(--cf-ease),
    border-color 0.3s;
}

.guide::before {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--theme-glow), 0.2), transparent);
  opacity: 0;
  transition: opacity 0.6s;
}

.guide-grid .guide:hover,
.guide:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--copper) 50%, transparent);
  box-shadow: var(--cf-shadow);
}

.guide:hover::before {
  opacity: 1;
}

.guide-tag {
  color: var(--accent-text);
  font: 700 10.5px/1 var(--cf-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.guide h3 {
  margin-top: 18px;
  font: 500 clamp(26px, 2.3vw, 33px) / 1.08 var(--cf-serif);
  letter-spacing: -0.01em;
  color: var(--heading);
  text-wrap: balance;
}

.guide p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
}

.guide-go {
  position: relative;
  margin-top: auto;
  padding-top: 28px;
  font: 600 13.5px/1 var(--cf-sans);
}

.guide:hover .guide-go b {
  transform: translateX(5px);
}

/* ----------------------------------------------------------------- closing */
.closing {
  padding: clamp(80px, 10vw, 150px) 0;
  background:
    radial-gradient(50% 80% at 50% 100%, rgba(var(--theme-glow), 0.14), transparent 70%),
    var(--ivory);
  border-top: 1px solid var(--line);
  text-align: center;
}

.closing .eyebrow {
  justify-content: center;
}

.closing .eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.closing-title {
  max-width: 17ch;
  margin-inline: auto;
  font: 500 clamp(40px, 6vw, 92px) / 1 var(--cf-serif);
  letter-spacing: -0.022em;
  color: var(--heading);
  text-wrap: balance;
}

.closing-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3.2vw, 46px);
}

.closing-actions .cf-btn {
  height: 56px;
  padding: 0 32px;
  font-size: 15px;
}

/* ----------------------------------------------------------------- smaller */
@media (max-width: 1000px) {
  .roster {
    grid-template-columns: 1fr 1fr;
  }

  .roster-item:nth-child(3) {
    border-left: 0;
    border-radius: 0 0 0 22px;
  }

  .roster-item:first-child {
    border-radius: 0;
  }

  .roster-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .duo-grid,
  .approach-grid {
    grid-template-columns: 1fr;
  }

  .duo-grid::before {
    display: none;
  }

  .duo-grid {
    gap: 64px;
  }

  .sec-head {
    grid-template-columns: 1fr;
  }

  .sec-copy {
    justify-self: start;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide {
    min-height: 0;
  }
}

/* A hand, not a mouse: the roster shows everyone's face, and the photograph answers a tap (home.js: the first lights
   the person, as a pointer does, the second opens their profile), with smaller pins and tags. */
@media (hover: none), (max-width: 760px) {
  .roster-face {
    display: block;
  }

  .who-pin {
    width: 12px;
    height: 12px;
    margin: -6px;
    border-width: 2px;
    box-shadow:
      0 0 0 4px rgba(255, 255, 255, 0.22),
      0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .who-tag {
    gap: 2px;
    min-width: 0;
    padding: 9px 12px 9px;
    border-radius: 11px;
  }

  .who-tag small {
    font-size: 8.5px;
  }

  .who-tag strong {
    font-size: 19px;
  }

  .who-tag > span {
    margin-top: 3px;
    font-size: 11px;
  }
}

@media (max-width: 1179px) {
  .hero-head {
    --map-h: 128px;
  }
}

/* No room beside the text: the map stands over it, as a crest. */
@media (max-width: 719px) {
  .hero-head {
    --map-h: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-map {
    order: -1;
    margin-bottom: 12px;
  }
}

/* Too narrow for one line: the practice over the places, each whole. */
@media (max-width: 1059px) {
  .hero-kicker {
    flex-direction: column;
    gap: 9px;
  }

  .hero-kicker::before,
  .hero-kicker::after {
    display: none;
  }

  .hero-kicker-lead,
  .hero-kicker-places {
    white-space: nowrap;
  }

  .hero-kicker-places {
    padding-left: 0;
    border-left: 0;
  }
}

/* The narrowest phones: the towns alone ("Serving" stays for screen readers). */
@media (max-width: 384px) {
  .hero-kicker-places svg {
    display: none;
  }

  .hero-kicker-serving {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .stage,
  .stage-photo {
    border-radius: 18px;
  }

  /* The frame is 16:10, the picture about 2.42:1: it shows 0.6615 of the width, from 18.28% in (object-position 54%). */
  .stage-photo {
    --vis: 0.6615;
    --off: 18.28%;
    aspect-ratio: 16 / 10;
    border-radius: 18px 18px 0 0;
  }

  .areas {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: clamp(50px, 15.5vw, 72px);
  }

  .roster {
    grid-template-columns: 1fr;
  }

  .roster-item,
  .roster-item:nth-child(3) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-left: 0;
    border-radius: 0;
    border-top: 1px solid var(--line);
  }

  .roster-item:first-child {
    border-top: 0;
  }

  .roster-item:last-child {
    border-radius: 0 0 18px 18px;
  }

  .roster-main {
    align-items: center;
    min-width: 0;
  }

  .roster-focus {
    font-size: 12.5px;
    line-height: 1.35;
  }

  .roster-text {
    gap: 5px;
  }

  .roster-name {
    font-size: 23px;
  }

  /* "Book", as a small pill; whom with is the row's own name (kept for screen readers). */
  .roster-book {
    align-self: center;
    margin: 0;
    flex: none;
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
    border-radius: 999px;
    background: none;
  }

  .roster-with {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .hero-kicker-places {
    gap: 9px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .form-actions .cf-btn {
    width: 100%;
  }

  .areas a {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .area-go {
    width: 38px;
    height: 38px;
  }

  .steps li {
    grid-template-columns: 48px 1fr;
  }

  .closing-actions .cf-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero *,
  .hero *::before,
  .hero *::after,
  .form-step.is-active,
  .form-done,
  .form-check circle,
  .form-check path,
  .quote-dots button::after {
    animation: none !important;
  }

  .form-check circle,
  .form-check path {
    stroke-dashoffset: 0;
  }

  .cf-js [data-reveal],
  .cf-js [data-reveal-group] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .quote,
  .quote.is-active,
  .stage-photo::after,
  .who-tag,
  .areas a,
  .guide {
    transition-duration: 0.01s;
  }
}
