/*
 * Cioffi Family Law: what every page shares since the 2026-11 redesign: the
 * flat header (brand, navigation, appearance, consultation), the footer and
 * the buttons. Its classes are its own (cf-…), apart from the pages' own
 * (home.css for the landing page and what every page shares with it,
 * pages.css for the inner pages). Colours are the appearance script's
 * variables (appearance.js: --paper, --ink, --copper, …), so every accent and
 * both modes work; the values below only stand in when scripts are off.
 */
:root {
  --paper: #faf7f1;
  --ivory: #f2ede4;
  --cream: #e6dacb;
  --navy: #071019;
  --navy-2: #101b24;
  --navy-3: #172a36;
  --ink: #13202d;
  --heading: #13202d;
  --muted: #53616d;
  --line: rgba(15, 31, 43, 0.14);
  --copper: #8c6b36;
  --accent-text: #7c5e2e;
  --on-accent: #ffffff;
  --accent-fill-end: #80622f;
  --surface: #ffffff;
  --field-bg: #fcfdfe;
  --theme-glow: 140, 107, 54;

  --cf-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --cf-sans: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --cf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cf-bar: 72px;
  --cf-wide: min(100% - 48px, 1340px);
  --cf-shadow: 0 24px 60px -28px rgba(19, 32, 45, 0.28), 0 2px 8px rgba(19, 32, 45, 0.05);
}

html[data-interface="dark"] {
  --cf-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
  :root {
    --cf-bar: 64px;
    --cf-wide: min(100% - 32px, 1340px);
  }
}

/* One page gives way to the next with a short fade (where the browser can). */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: cf-page-out 0.2s ease both;
}

::view-transition-new(root) {
  animation: cf-page-in 0.36s ease both;
}

@keyframes cf-page-out {
  to {
    opacity: 0;
  }
}

@keyframes cf-page-in {
  from {
    opacity: 0;
  }
}

.cf-header {
  view-transition-name: cf-header;
}

.cf-skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font: 600 14px/1 var(--cf-sans);
  text-decoration: none;
  transition: top 0.2s;
}

.cf-skip:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ header */
.cf-header {
  position: sticky;
  top: 0;
  z-index: 90;
  /* Nearly opaque, and no backdrop blur: over a scrolling page a blurred bar cost Firefox, compositing on
     the processor, half its frames (45 fps against 94, measured 2026-11-14), for a blur this ground hides. */
  background: color-mix(in srgb, var(--paper) 97%, transparent);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--cf-sans);
  transition:
    box-shadow 0.3s,
    background-color 0.3s;
}

/* How far down the page, along the bar's foot (where the browser can tie an animation to scrolling). */
@supports (animation-timeline: scroll()) {
  .cf-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--copper);
    transform: scaleX(0);
    transform-origin: left;
    animation: cf-progress linear both;
    animation-timeline: scroll(root block);
    pointer-events: none;
  }

  @keyframes cf-progress {
    to {
      transform: scaleX(1);
    }
  }
}

.cf-header[data-scrolled] {
  background: var(--paper);
  box-shadow: 0 10px 34px -22px rgba(19, 32, 45, 0.4);
}

.cf-header *,
.cf-footer * {
  box-sizing: border-box;
}

.cf-bar {
  width: var(--cf-wide);
  height: var(--cf-bar);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

.cf-brandgroup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  margin-right: auto;
}

.cf-header .brand,
.cf-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.cf-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  background: linear-gradient(145deg, var(--copper), var(--accent-fill-end));
  color: var(--on-accent);
  font: 500 29px/1 var(--cf-serif);
  padding-bottom: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.5s var(--cf-ease);
}

.brand:hover .cf-mark {
  transform: rotate(-6deg) scale(1.04);
}

.cf-wordmark {
  font: 600 19px/1.05 var(--cf-serif);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  padding-block: 9px;
}

/* "Website Demo": what this site is, on request. */
.cf-demo {
  position: relative;
  flex: none;
}

.cf-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 8px 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: 500 12.5px/1 var(--cf-sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s;
}

.cf-demo-btn:hover,
.cf-demo-btn[aria-expanded="true"] {
  color: var(--ink);
}

.cf-chev {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--cf-ease);
}

[aria-expanded="true"] > .cf-chev {
  transform: rotate(180deg);
}

/* Panels that drop from the bar. */
.cf-pop {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  z-index: 5;
  min-width: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--cf-shadow);
  font: 400 13.5px/1.55 var(--cf-sans);
  transform-origin: 24px 0;
  animation: cf-pop 0.26s var(--cf-ease);
}

.cf-pop[hidden] {
  display: none;
}

@keyframes cf-pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
}

.cf-demo-note {
  width: 290px;
}

.cf-demo-note strong {
  display: block;
  font: 600 20px/1.15 var(--cf-serif);
  margin-bottom: 6px;
}

.cf-demo-note p {
  margin: 0 0 12px;
  color: var(--muted);
}

.cf-demo-note a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.cf-demo-note a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Navigation */
.cf-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.9vw, 36px);
}

.cf-link {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
  font: 500 14.5px/1 var(--cf-sans);
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.cf-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--cf-ease);
}

.cf-link:hover,
.cf-menu.is-open > .cf-menu-head > .cf-link {
  color: var(--ink);
}

.cf-link:hover::after,
.cf-menu.is-open > .cf-menu-head > .cf-link::after,
.cf-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.cf-link[aria-current="page"] {
  color: var(--accent-text);
}

.cf-menu {
  position: relative;
}

.cf-menu-head {
  display: flex;
  align-items: center;
  gap: 2px;
}

.cf-caret {
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.cf-sub {
  left: -22px;
  padding: 12px;
}

/* The bar's bottom edge to the panel: no gap for the pointer to fall through. */
.cf-sub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
}

.cf-sub-practice {
  width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}

.cf-sub a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font: 500 14px/1.25 var(--cf-sans);
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.cf-sub a:hover,
.cf-sub a:focus-visible {
  background: color-mix(in srgb, var(--copper) 11%, transparent);
  color: var(--accent-text);
}

.cf-sub a small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 500 11.5px/1.2 var(--cf-sans);
  letter-spacing: 0.02em;
}

.cf-sub img {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.cf-sub-attorneys {
  width: 280px;
}

.cf-sub .cf-sub-all {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 13px;
}

/* Actions */
.cf-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.cf-cta,
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--copper), var(--accent-fill-end));
  color: var(--on-accent);
  font: 600 14px/1 var(--cf-sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(var(--theme-glow), 0.9);
  transition:
    transform 0.35s var(--cf-ease),
    box-shadow 0.35s,
    filter 0.25s;
}

.cf-cta {
  height: 42px;
  padding: 0 20px;
  font-size: 13.5px;
}

.cf-cta:hover,
.cf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(var(--theme-glow), 0.95);
  filter: brightness(1.06);
}

.cf-cta:active,
.cf-btn:active {
  transform: translateY(0) scale(0.98);
}

.cf-btn .cf-arrow,
.cf-cta .cf-arrow {
  transition: transform 0.35s var(--cf-ease);
}

.cf-btn:hover .cf-arrow,
.cf-cta:hover .cf-arrow {
  transform: translateX(4px);
}

.cf-btn--ghost {
  background: none;
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
  color: var(--ink);
  box-shadow: none;
}

.cf-btn--ghost:hover {
  border-color: var(--ink);
  box-shadow: none;
  filter: none;
}

.cf-icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.cf-icon-btn:hover,
.cf-icon-btn[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--ink) 40%, transparent);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

/* Appearance: a half-and-half disc in the accent. */
.cf-theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--copper) 50%, transparent 50%);
  box-shadow: inset 0 0 0 1.5px var(--copper);
  transition: transform 0.6s var(--cf-ease);
}

.cf-icon-btn[aria-expanded="true"] .cf-theme-dot,
.cf-icon-btn:hover .cf-theme-dot {
  transform: rotate(180deg);
}

.cf-theme {
  left: auto;
  right: 0;
  width: 292px;
  transform-origin: calc(100% - 24px) 0;
}

.cf-theme h2 {
  margin: 0 0 14px;
  font: 600 22px/1 var(--cf-serif);
  color: var(--ink);
  letter-spacing: 0;
}

.cf-theme-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--muted);
  font: 600 10.5px/1 var(--cf-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cf-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.cf-seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font: 600 13px/1 var(--cf-sans);
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.cf-seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(19, 32, 45, 0.12);
}

.cf-seg svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cf-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.cf-swatch {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s var(--cf-ease);
}

.cf-swatch:hover {
  transform: scale(1.1);
}

.cf-swatch[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.cf-custom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-custom input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  font: 500 13px/1 ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.04em;
}

.cf-custom input[type="text"][aria-invalid="true"] {
  border-color: #c2473d;
}

.cf-custom input[type="color"] {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field-bg);
  cursor: pointer;
}

.cf-theme-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.cf-theme-foot button {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: 600 12.5px/1 var(--cf-sans);
  cursor: pointer;
}

.cf-theme-foot button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The menu button (narrow screens). */
.cf-burger {
  display: none;
}

.cf-burger span,
.cf-burger span::before,
.cf-burger span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.35s var(--cf-ease),
    background-color 0.2s;
}

.cf-burger span {
  position: relative;
}

.cf-burger span::before,
.cf-burger span::after {
  content: "";
  position: absolute;
  left: 0;
}

.cf-burger span::before {
  transform: translateY(-6px);
}

.cf-burger span::after {
  transform: translateY(6px);
}

.cf-burger[aria-expanded="true"] span {
  background: transparent;
}

.cf-burger[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}

.cf-burger[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}

.cf-nav-extra {
  display: none;
}

.cf-header :focus-visible,
.cf-footer :focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

@media (max-width: 1340px) {
  .cf-demo {
    display: none;
  }
}

@media (max-width: 1180px) {
  .cf-burger {
    display: grid;
  }

  .cf-actions .cf-cta {
    display: none;
  }

  .cf-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    max-height: calc(100dvh - var(--cf-bar));
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px max(24px, (100% - 1340px) / 2) 28px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 30px 50px -30px rgba(19, 32, 45, 0.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 0.3s,
      transform 0.4s var(--cf-ease),
      visibility 0s 0.4s;
  }

  .cf-header.is-menu .cf-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.3s,
      transform 0.4s var(--cf-ease);
  }

  .cf-nav > .cf-link,
  .cf-menu-head {
    display: flex;
    border-bottom: 1px solid var(--line);
  }

  .cf-link {
    flex: 1;
    padding: 18px 0;
    font: 500 26px/1 var(--cf-serif);
    letter-spacing: 0;
  }

  .cf-link::after {
    display: none;
  }

  .cf-caret {
    width: 52px;
    height: auto;
  }

  .cf-caret .cf-chev {
    width: 14px;
    height: 14px;
  }

  .cf-sub,
  .cf-sub-practice,
  .cf-sub-attorneys {
    position: static;
    width: auto;
    padding: 8px 0 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation: none;
  }

  .cf-sub::before {
    display: none;
  }

  .cf-nav-extra {
    display: grid;
    gap: 14px;
    margin-top: 22px;
  }

  .cf-nav-extra .cf-btn {
    width: 100%;
  }

  .cf-nav-extra p {
    margin: 0;
    color: var(--muted);
    font: 400 12.5px/1.5 var(--cf-sans);
  }
}

@media (max-width: 640px) {
  .cf-nav {
    padding-inline: 16px;
  }

  .cf-brandgroup {
    gap: 8px;
  }

  .cf-header .brand {
    gap: 10px;
  }

  .cf-mark {
    width: 34px;
    height: 34px;
    font-size: 26px;
  }

  .cf-wordmark {
    font-size: 14.5px;
    letter-spacing: 0.14em;
    padding-left: 10px;
  }

  .cf-icon-btn {
    width: 40px;
    height: 40px;
  }

  .cf-actions {
    gap: 8px;
  }

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

  .cf-theme {
    position: fixed;
    top: calc(var(--cf-bar) + 10px);
    right: 12px;
    left: auto;
    width: min(292px, 100vw - 24px);
  }
}

/* A phone: the name on two lines, "Cioffi" over "Family Law". */
@media (max-width: 480px) {
  .cf-wordmark {
    white-space: normal;
    max-width: 9em;
    font-size: 13px;
    line-height: 1.25;
    padding-block: 2px;
  }
}

@media (max-width: 350px) {
  .cf-wordmark {
    font-size: 11.5px;
  }
}

/* ------------------------------------------------------------------ footer */
.cf-footer {
  position: relative;
  background: var(--navy);
  color: #c9d1d6;
  font: 400 14px/1.6 var(--cf-sans);
  padding: clamp(56px, 7vw, 96px) 0 28px;
  overflow: hidden;
}

html[data-interface="dark"] .cf-footer {
  border-top: 1px solid var(--line);
}

.cf-footer::before {
  content: "C";
  position: absolute;
  right: -0.04em;
  bottom: -0.36em;
  font: 500 clamp(280px, 36vw, 560px) / 1 var(--cf-serif);
  color: rgba(255, 255, 255, 0.028);
  pointer-events: none;
}

.cf-footer-grid {
  position: relative;
  width: var(--cf-wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, 0.7fr));
  gap: 40px clamp(28px, 4vw, 72px);
}

.cf-footer .brand {
  color: #f6f1e8;
}

.cf-footer .cf-wordmark {
  border-color: rgba(255, 255, 255, 0.18);
}

.cf-footer-blurb {
  max-width: 40ch;
  margin: 22px 0 0;
  color: #93a0a8;
  font-size: 13.5px;
}

/* Where the firm works: Hackensack, Hoboken and Morristown (user direction, 2026-11-14). */
.cf-footer-offices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 18px 0 0;
  color: #e6e1d8;
  font-size: 13.5px;
}

.cf-footer-offices span {
  color: #7f8d96;
  font: 600 10.5px/1 var(--cf-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cf-footer h2 {
  margin: 6px 0 16px;
  color: #7f8d96;
  font: 600 10.5px/1 var(--cf-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cf-footer-col a {
  display: block;
  width: fit-content;
  padding: 6px 0;
  color: #e6e1d8;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 4px) / 0 1px no-repeat;
  transition: background-size 0.35s var(--cf-ease);
}

.cf-footer-col a:hover {
  background-size: 100% 1px;
}

.cf-footer-legal {
  position: relative;
  width: var(--cf-wide);
  margin: clamp(40px, 5vw, 72px) auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px 40px;
  flex-wrap: wrap;
  color: #7f8d96;
  font-size: 12px;
}

.cf-footer-legal p {
  margin: 0;
  max-width: 78ch;
}

@media (max-width: 900px) {
  .cf-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cf-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .cf-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  .cf-pop,
  .cf-nav {
    animation: none;
    transition: none;
  }
}
