/* ===========================================================
   FOLDIAK-Lawyers stylesheet
   Monochrome navy system: navy #03203D, mid blue #0B3D71,
   mist #B9C8DA, pale sage #DCE3E1, ice #EFF8FD. No red anywhere.

   Design rules:
   - border-radius: 0 everywhere (sharp, architectural)
   - no box-shadows; separation via flat color blocking + 1px hairlines
   - 0.33s ease-in-out as the standard interactive transition
   - entrance motion gated behind prefers-reduced-motion: no-preference
   =========================================================== */

:root {
  --navy: #03203d;
  --navy-soft: #0b3d71;
  --mist: #b9c8da;
  --sage: #dce3e1;
  --sage-line: #e1e6e4;
  --ice: #eff8fd;
  --accent: var(--navy-soft);
  --accent-hover: #14539a;
  --accent-on-dark: #6ea8e0;
  --ink: #1c1c1c;
  --paper: #ffffff;
  --grey: #6b7480;

  --serif: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --nav-h: 92px;
  --ease: ease-in-out;
  --speed: 0.33s;
  --hairline: 1px solid var(--sage-line);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.15;
  margin: 0;
}

p {
  line-height: 1.7;
  margin: 0 0 1.1em;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 18px;
}
/* Cooley-style tick before the eyebrow label */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.78em;
  background: currentColor;
  margin-right: 10px;
  vertical-align: -0.08em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- reveal-on-scroll ----------
   Base state is visible so the site is fully readable without JS
   or when reduced motion is requested. JS adds .motion-ready to
   <html> only when motion is permitted, which arms the hidden state. */
.motion-ready .reveal {
  opacity: 0;
}

/* ---------- top utility bar ---------- */
.utility-bar {
  background: var(--navy);
  color: var(--mist);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.utility-bar .container {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.utility-bar a {
  color: var(--mist);
  transition: color var(--speed) var(--ease);
}
.utility-bar a:hover {
  color: var(--paper);
}

/* ---------- navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Deliberately no backdrop-filter: it would create a containing block
     for the fixed-position mobile menu and trap it inside the header. */
  background: var(--paper);
  border-bottom: var(--hairline);
  transition: border-color var(--speed) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--navy);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--navy);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand span {
  color: var(--accent);
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--speed) var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-links a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px;
  /* position is required for z-index to apply, so the close button
     stays clickable above the open menu overlay. */
  position: relative;
  z-index: 1200;
  width: 46px;
  height: 46px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy);
  transition:
    transform var(--speed) var(--ease),
    opacity var(--speed) var(--ease),
    background var(--speed) var(--ease);
}
.nav-toggle.is-open span {
  background: var(--paper);
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- hero: typographic, no photography ---------- */
.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  overflow: hidden;
  padding: 96px 0;
}

/* three.js monogram mark, centred above the headline */
.hero-canvas {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 18px;
  opacity: 0.85;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  text-align: center;
  padding: 0 32px;
}
.hero h1 {
  color: var(--navy);
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}
.hero p.lede {
  color: var(--grey);
  font-size: 1.12rem;
  max-width: 580px;
  margin: 0 auto 40px;
}
.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--grey);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-cue .line {
  width: 34px;
  height: 1px;
  background: var(--mist);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  bottom: 0;
  width: 100%;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue .line::after {
    animation: cueSlide 2.2s var(--ease) infinite;
  }
}
@keyframes cueSlide {
  0% {
    left: -100%;
  }
  50% {
    left: 0;
  }
  100% {
    left: 100%;
  }
}

/* ---------- page (interior) hero: shorter, for subpages ----------
   Plain photography under a navy scrim. The duotone treatment is
   deliberately reserved for the home page blocks only. */
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: calc(var(--nav-h) + 96px) 0 88px;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(3, 32, 61, 0.93),
    rgba(3, 32, 61, 0.72)
  );
}
.page-hero .container {
  position: relative;
  z-index: 2;
}
.page-hero h1 {
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}
.page-hero .eyebrow {
  color: var(--mist);
}
.page-hero p.lede {
  color: var(--sage);
  max-width: 620px;
  font-size: 1.05rem;
  margin-top: 18px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--speed) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-outline {
  border-color: var(--mist);
  color: var(--paper);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--paper);
}
.btn-dark {
  border-color: var(--navy);
  color: var(--navy);
}
.btn-dark:hover {
  background: var(--navy);
  color: var(--paper);
}
.btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--speed) var(--ease);
}
.btn:hover svg {
  transform: translateX(4px);
}

/* ---------- sections ---------- */
section {
  padding: 100px 0;
}
.section-tight {
  padding: 72px 0;
}
.bg-navy {
  background: var(--navy);
  color: var(--paper);
}
.bg-navy h2,
.bg-navy h3 {
  color: var(--paper);
}
.bg-navy p {
  color: var(--sage);
}
.bg-navy .eyebrow {
  color: var(--mist);
}
.bg-sage {
  background: var(--sage);
}
.bg-ice {
  background: var(--ice);
}

.section-head {
  max-width: 700px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 400;
}
.section-head p.lede {
  font-size: 1.08rem;
  color: var(--grey);
  margin-top: 16px;
}
.bg-navy .section-head p.lede {
  color: var(--sage);
}

/* ---------- statistic strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.stat {
  padding: 44px 28px;
  text-align: left;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}
.stat:first-child {
  border-left: none;
}
.stat .num {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--paper);
  display: block;
  margin-bottom: 8px;
}
.stat .label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ---------- two-col split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(35%) contrast(1.05);
  transition:
    filter 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.split .img-frame {
  overflow: hidden;
  position: relative;
}
.split .img-frame:hover img {
  filter: grayscale(0%) contrast(1.05);
  transform: scale(1.04);
}

/* ---------- text-only intro split ---------- */
.intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.intro-split h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.1;
}
.intro-split p:last-of-type {
  margin-bottom: 28px;
}

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--sage-line);
}
.card {
  background: var(--paper);
  padding: 44px 38px;
  transition: background var(--speed) var(--ease);
  position: relative;
}
.card:hover {
  background: var(--ice);
}
.card .num {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}
.card h3 {
  font-size: 1.18rem;
  margin-bottom: 12px;
  font-weight: 500;
}
.card p {
  color: var(--grey);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- feature triad: duotone artistic blocks ----------
   Each card is a photo pushed to a hard two-tone blue treatment:
   grayscale -> hue-mapped to brand blue -> deepened for contrast ->
   scanline texture on top. Text sits above all of it. */
.triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.triad-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 460px;
  padding: 40px 34px;
  background: var(--navy-soft);
}

.triad-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.triad-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Crush to high-contrast greyscale so the tint reads as a duotone */
  filter: grayscale(1) contrast(1.45) brightness(1.12);
  transition: transform 0.7s var(--ease);
}
/* Night/low-key sources need lifting or the duotone reads as flat black */
.triad-media.is-low-key img {
  filter: grayscale(1) contrast(1.15) brightness(2.4);
}
/* Map the greyscale luminance onto the brand blue */
.triad-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #1b3ef5;
  mix-blend-mode: color;
}
/* Deepen the base so white type always clears contrast */
.triad-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11, 61, 113, 0.58) 0%,
    rgba(3, 32, 61, 0.9) 100%
  );
}
/* Scanline / dither texture */
.triad-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.11) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.9;
  pointer-events: none;
}
.triad-card:hover .triad-media img {
  transform: scale(1.05);
}

.triad-inner {
  position: relative;
  z-index: 3;
}
.triad-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--mist);
  margin-bottom: 14px;
}
.triad-card h3 {
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 400;
  line-height: 1.06;
  color: var(--paper);
  margin-bottom: 16px;
}
.triad-card p {
  font-size: 0.96rem;
  color: var(--sage);
  margin-bottom: 0;
}
.triad-card .triad-foot {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.triad-card .triad-foot svg {
  width: 46px;
  height: 16px;
  transition: transform var(--speed) var(--ease);
}
.triad-card:hover .triad-foot svg {
  transform: translateX(8px);
}

/* ---------- horizontal carousel ---------- */
.carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.carousel-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 400;
}
.carousel-nav {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}
.carousel-nav button {
  width: 54px;
  height: 40px;
  background: none;
  border: none;
  color: var(--navy);
  cursor: pointer;
  transition:
    color var(--speed) var(--ease),
    opacity var(--speed) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-nav button svg {
  width: 46px;
  height: 16px;
}
.carousel-nav button:hover:not(:disabled) {
  color: var(--accent);
}
.carousel-nav button:disabled {
  opacity: 0.25;
  cursor: default;
}

.carousel-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-item {
  /* Fixed basis + no shrink, so the track overflows and scrolls
     rather than squeezing every item into view. */
  flex: 0 0 calc((100% - 3 * 32px) / 4);
  scroll-snap-align: start;
  border-top: 1px solid var(--navy);
  padding-top: 22px;
}
.carousel-item h3 {
  font-size: clamp(1.3rem, 1.8vw, 1.75rem);
  font-weight: 400;
  line-height: 1.16;
  margin-bottom: 16px;
  transition: color var(--speed) var(--ease);
}
.carousel-item:hover h3 {
  color: var(--accent);
}
.carousel-item p {
  color: var(--grey);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ---------- practice list ---------- */
.practice-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 60px;
}
.practice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
  border-bottom: var(--hairline);
  transition:
    padding-left var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
}
.practice-item:hover {
  padding-left: 12px;
  border-color: var(--accent);
}
.practice-item h3 {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--navy);
}
.practice-item .arrow {
  color: var(--accent);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: var(--speed) var(--ease);
}
.practice-item:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.industry-tags span {
  padding: 10px 20px;
  border: 1px solid var(--mist);
  font-size: 0.82rem;
  color: var(--navy);
  transition: var(--speed) var(--ease);
}
.industry-tags span:hover {
  background: var(--navy);
  color: var(--paper);
  border-color: var(--navy);
}

/* ---------- values rows (expandable) ---------- */
.value-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: var(--hairline);
}
.value-row:last-child {
  border-bottom: var(--hairline);
}
.value-row .idx {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--mist);
}
.value-row h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  font-weight: 500;
}
.value-row p {
  color: var(--grey);
  max-width: 640px;
  margin-bottom: 0;
}

/* Height animation without JS measuring */
.accordion-row {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--speed) var(--ease);
}
.accordion-row.is-open {
  grid-template-rows: 1fr;
}
.accordion-row > * {
  overflow: hidden;
}

/* ---------- quote / pull statement ---------- */
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--navy);
  max-width: 900px;
  position: relative;
  padding-left: 36px;
  border-left: 3px solid var(--accent);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border: var(--hairline);
}
.contact-info {
  padding: 64px;
  background: var(--navy);
  color: var(--paper);
}
.contact-info h2 {
  color: var(--paper);
  font-weight: 400;
  margin-bottom: 8px;
}
.contact-info .eyebrow {
  color: var(--mist);
}
.contact-detail {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.contact-detail .label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 8px;
}
.contact-detail a,
.contact-detail p {
  color: var(--paper);
  font-size: 1.02rem;
  margin: 0;
}
.contact-form {
  padding: 64px;
  background: var(--paper);
}
.form-row {
  margin-bottom: 24px;
}
.form-row label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 8px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--mist);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color var(--speed) var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-row.checkbox input {
  width: auto;
}
.form-row.checkbox label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.86rem;
  color: var(--grey);
}
.form-note {
  font-size: 0.8rem;
  color: var(--grey);
  margin-top: 18px;
}

.map-frame {
  border-top: var(--hairline);
}
.map-frame iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  filter: grayscale(45%) contrast(1.05);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--sage);
  padding: 80px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-brand {
  font-family: var(--serif);
  color: var(--paper);
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.footer-grid h4 {
  color: var(--paper);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-family: var(--sans);
  font-weight: 600;
}
.footer-grid p {
  color: var(--sage);
  font-size: 0.92rem;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li {
  margin-bottom: 12px;
  color: var(--mist);
  font-size: 0.92rem;
}
.footer-grid a {
  color: var(--mist);
  font-size: 0.92rem;
  transition: color var(--speed) var(--ease);
}
.footer-grid a:hover {
  color: var(--paper);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.78rem;
  color: var(--mist);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a {
  color: var(--mist);
}
.footer-bottom a:hover {
  color: var(--paper);
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  background: var(--navy);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--speed) var(--ease);
  z-index: 900;
  border: none;
  cursor: pointer;
}
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.to-top:hover {
  background: var(--accent);
}

/* ===========================================================
   Responsive: fine-grained stepped breakpoints
   =========================================================== */

/* --- 1180px: narrow the practice reel --- */
@media (max-width: 1180px) {
  .carousel-item {
    flex-basis: calc((100% - 2 * 32px) / 3);
  }
}

/* --- 1024px: tablet landscape --- */
@media (max-width: 1024px) {
  .container {
    padding: 0 26px;
  }
  .nav-links {
    gap: 26px;
  }
  .split {
    gap: 44px;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-info,
  .contact-form {
    padding: 48px;
  }
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    row-gap: 36px;
  }
  .triad {
    grid-template-columns: 1fr;
  }
  .triad-card {
    min-height: 0;
  }
  .hero {
    min-height: 0;
    padding: 80px 0;
  }
}

/* --- 920px: drop the 3D monogram; it is decorative only --- */
@media (max-width: 920px) {
  .hero-canvas {
    display: none;
  }
  .hero-content {
    max-width: 640px;
  }
  .carousel-item {
    flex-basis: calc((100% - 32px) / 2);
  }
  .carousel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* --- 860px: hamburger menu --- */
@media (max-width: 860px) {
  :root {
    --nav-h: 76px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--navy);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    text-align: left;
    padding: calc(var(--nav-h) + 40px) 32px 50px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 1100;
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    /* block, or width:100% is ignored on the inline <a> inside <li> */
    display: block;
    color: var(--paper);
    font-size: 1.15rem;
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .nav-links a::after {
    display: none;
  }
  .nav-links a.active {
    color: var(--accent-on-dark);
  }

  .utility-bar .container {
    justify-content: center;
    gap: 20px;
  }

  .split {
    grid-template-columns: 1fr;
  }
  .split .img-frame {
    order: -1;
  }
  .intro-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(3) {
    border-left: none;
  }
  .stat:nth-child(3),
  .stat:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

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

  .practice-list {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

/* --- 700px: large phone / small tablet portrait --- */
@media (max-width: 700px) {
  section {
    padding: 76px 0;
  }
  .carousel-item {
    flex-basis: 78%;
  }
  .map-frame iframe {
    height: 320px;
  }
  .pull-quote {
    padding-left: 22px;
  }
}

/* --- 560px: phone --- */
@media (max-width: 560px) {
  .container {
    padding: 0 20px;
  }
  section {
    padding: 60px 0;
  }
  .section-tight {
    padding: 50px 0;
  }
  .section-head {
    margin-bottom: 40px;
  }

  .hero {
    padding: 56px 0 64px;
  }
  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
  }
  .hero p.lede {
    font-size: 1rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .hero-actions .btn {
    justify-content: center;
  }

  .brand {
    font-size: 1.25rem;
  }
  .brand small {
    font-size: 0.55rem;
    letter-spacing: 0.18em;
  }

  .utility-bar {
    font-size: 0.72rem;
  }
  .utility-bar .container {
    gap: 14px;
  }

  .value-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .value-row .idx {
    font-size: 1.6rem;
  }
  .contact-info,
  .contact-form {
    padding: 34px 24px;
  }
  .triad-card {
    padding: 34px 26px;
  }
  .card {
    padding: 34px 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }
  .stat {
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px 0;
  }
  .stat:first-child {
    border-top: none;
  }

  .page-hero {
    padding: calc(var(--nav-h) + 48px) 0 52px;
  }
  .scroll-cue {
    display: none;
  }
  .to-top {
    right: 16px;
    bottom: 16px;
  }
}

/* --- 380px: small phone --- */
@media (max-width: 380px) {
  .utility-bar .container {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .carousel-item {
    flex-basis: 88%;
  }
  .btn {
    padding: 14px 22px;
    font-size: 0.72rem;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
