/* ============================================================
   Yan Fei, Vern & Partners — Advocates & Solicitors
   Design system: paper / evergreen / brass · Newsreader + Archivo
   ============================================================ */

:root {
  --paper: #F7F5F0;
  --paper-2: #EFEBE2;
  --ink: #182420;
  --green: #1F3A30;
  --green-deep: #162B24;
  --brass: #A8823D;
  --brass-soft: #C4A052;
  --muted: #5B655E;
  --line: #DCD6C9;
  --line-on-dark: rgba(247, 245, 240, 0.16);
  --paper-on-dark: #F1EEE6;
  --muted-on-dark: rgba(241, 238, 230, 0.72);

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --w-max: 1180px;
  --pad-x: clamp(20px, 4vw, 48px);
  --sec-y: clamp(72px, 10vw, 128px);
}

/* Simplified Chinese pages: extend the type stacks with system CJK fonts
   (no extra webfont downloads) and open up line-height for comfortable
   Chinese reading. Latin glyphs still render in Newsreader/Archivo. */
html[lang="zh-CN"] {
  --font-serif: "Newsreader", Georgia, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", serif;
  --font-sans: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
html[lang="zh-CN"] body { line-height: 1.9; }
html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3,
html[lang="zh-CN"] h4 { line-height: 1.4; letter-spacing: 0; }
html[lang="zh-CN"] .hero-title { letter-spacing: 0; }
html[lang="zh-CN"] .brand-name { letter-spacing: 0.06em; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* Running text is justified site-wide; headings, nav and labels stay as set.
   No hyphenation — words are never split across lines — and last lines
   avoid single-word orphans where the browser supports text-wrap: pretty. */
p, li, .lede, .ledger-desc, address {
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  text-wrap: pretty;
}

::selection { background: var(--brass); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: var(--paper-on-dark);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Utilities ---------- */
.wrap {
  max-width: var(--w-max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* Controlled line breaks: each .line span starts a new line */
.line { display: block; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: 20px;
}
.on-dark .eyebrow { color: var(--brass-soft); }

.lede {
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.55;
  color: var(--ink);
}
.muted { color: var(--muted); }
.on-dark .muted { color: var(--muted-on-dark); }

.amp {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--brass);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 28px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--paper-on-dark);
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--brass); background: transparent; color: var(--ink); }
.on-dark .btn {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.on-dark .btn:hover { background: var(--paper-2); border-color: var(--paper-2); }
.on-dark .btn--ghost {
  background: transparent;
  color: var(--paper-on-dark);
  border-color: var(--line-on-dark);
}
.on-dark .btn--ghost:hover { border-color: var(--brass-soft); }

.text-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
.text-link:hover { color: var(--brass); }
.on-dark .text-link { color: var(--paper-on-dark); }
.on-dark .text-link:hover { color: var(--brass-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  text-decoration: none;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  height: 28px;
  width: auto;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: block;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}
.site-nav a:not(.btn) {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--brass); }
.site-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--brass); color: var(--ink); }
.site-nav .btn { padding: 12px 22px; }

/* Language switcher: EN | 中文 */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switch .sep {
  color: var(--line);
  font-family: var(--font-sans);
  font-size: 12px;
}
.site-nav .lang-switch a:not(.btn) {
  color: var(--muted);
  font-size: 12px;
}
.site-nav .lang-switch a:not(.btn):hover { color: var(--ink); }
.site-nav .lang-switch a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--brass);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 10px 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

@media (max-width: 480px) {
  .brand { gap: 10px; }
  .brand-mark { height: 22px; }
  .brand-name { font-size: 15.5px; }
  .brand-sub { font-size: 8px; letter-spacing: 0.24em; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad-x) 24px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--brass); }
  .site-nav .btn { margin-top: 20px; justify-content: center; }
  .site-nav .lang-switch {
    margin-top: 22px;
    justify-content: center;
  }
  .site-nav .lang-switch a:not(.btn) {
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    font-size: 13px;
  }
  .site-nav .lang-switch a[aria-current="true"] { border-bottom-color: var(--brass); }
}

/* ---------- Hero (home) ---------- */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
  padding-top: clamp(56px, 8vw, 110px);
  padding-bottom: 0;
}
.hero-copy { padding-bottom: clamp(56px, 8vw, 110px); }
.hero-title {
  font-size: clamp(40px, 6vw, 74px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0 0 28px;
}
.hero-title .line { display: block; }
.hero-title em {
  font-style: italic;
  color: var(--brass);
}
.hero-lede {
  /* Sized so the paragraph sets as exactly three lines in the desktop
     hero column, with slack for platform font-metric differences. */
  font-size: clamp(16.5px, 1.5vw, 18.5px);
  color: var(--muted);
  max-width: 36em;
  margin-bottom: 0;
}
/* The partners stand full-body in front of a lit backdrop panel that
   bleeds off the right edge — not inside an image box. */
.hero-stage {
  position: relative;
  align-self: end;
  /* Raised so the figures' baseline sits level with the last line of the
     hero body copy, rather than on the section's bottom edge. */
  margin-bottom: clamp(56px, 8vw, 110px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-panel {
  position: absolute;
  left: 12%;
  right: -50vw;
  top: 15%;
  bottom: 0;
  background: radial-gradient(120% 95% at 42% 30%, #30503F 0%, var(--green) 55%, #16281F 100%);
}
.hero-partners {
  position: relative;
  display: block;
  width: min(94%, 520px);
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(10, 18, 15, 0.35));
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; align-items: start; }
  .hero-copy { padding-bottom: 0; }
  .hero-stage { margin-top: 56px; margin-bottom: 0; }
  .hero-panel { left: 6%; right: calc(-1 * var(--pad-x)); }
  .hero-partners { width: min(88%, 440px); }
}

/* ---------- Photo slots ---------- */
.photo {
  position: relative;
  background: var(--green);
  overflow: hidden;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.photo .photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: var(--green);
}
.photo.missing .photo-fallback { display: flex; }
.photo.missing img { display: none; }
.photo-fallback span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(64px, 8vw, 120px);
  color: var(--brass-soft);
  opacity: 0.85;
  line-height: 1;
}
.photo-fallback small {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

/* ---------- Sections ---------- */
.section { padding-top: var(--sec-y); padding-bottom: var(--sec-y); }
.section + .section { border-top: 1px solid var(--line); }
.section--dark {
  background: var(--green);
  color: var(--paper-on-dark);
}
.section--alt { background: var(--paper-2); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.section-head .section-intro {
  color: var(--muted);
  align-self: end;
  max-width: 36em;
}
.on-dark .section-head .section-intro { color: var(--muted-on-dark); }
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; }
}
/* Centred variant: stacked heading with the intro directly beneath it */
.section-head--center {
  display: block;
  text-align: center;
}
.section-head--center .section-intro {
  text-align: center;
  max-width: 36em;
  margin: 18px auto 0;
}
/* Intro that must set as a single line on desktop */
@media (min-width: 861px) {
  .section-intro--nowrap {
    white-space: nowrap;
    max-width: none;
  }
}

/* ---------- Firm intro (home) ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(32px, 6vw, 80px);
}
.intro-grid .lede { max-width: 30em; }
.firm-facts { border-top: 1px solid var(--line); }
.firm-facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.firm-facts .k {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.firm-facts .v { text-align: right; }
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; }
}

/* ---------- Practice ledger ---------- */
.ledger { border-top: 1px solid var(--line); }
.ledger-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 4fr) minmax(0, 6fr) 60px;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.ledger-row:hover { background: rgba(161, 126, 74, 0.06); }
.ledger-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--brass);
}
.ledger-name {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
}
.ledger-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.ledger-arrow {
  font-family: var(--font-serif);
  color: var(--brass);
  text-align: right;
  font-size: 20px;
  transition: transform 0.2s ease;
}
.ledger-row:hover .ledger-arrow { transform: translateX(6px); }
@media (max-width: 860px) {
  .ledger-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 0;
  }
  .ledger-arrow { display: none; }
}

/* ---------- How we work (dark) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.step {
  border-top: 1px solid var(--line-on-dark);
  padding-top: 24px;
}
.step-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--brass-soft);
  display: block;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 12px;
}
.step p {
  font-size: 15px;
  color: var(--muted-on-dark);
  margin: 0;
}
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4.5vw, 64px);
}
.team-card {
  text-decoration: none;
  text-align: center;
}
.team-card .photo {
  aspect-ratio: 4 / 5;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}
.team-card h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  margin-bottom: 6px;
}
.team-role {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
@media (max-width: 860px) {
  .team-grid { grid-template-columns: 1fr; }
  /* Stacked order: Ng Yan Fei, Lee Vern Sen, Hor Siew Ling, Nur Zulikha
     (desktop DOM order places Nur Zulikha third, under Ng Yan Fei) */
  .team-card:nth-child(3) { order: 4; }
  .team-card:nth-child(4) { order: 3; }
}

/* ---------- Contact band ---------- */
.contact-band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 80px);
}
.contact-band h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 400;
  margin-bottom: 24px;
}
.contact-list { border-top: 1px solid var(--line-on-dark); }
.contact-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-on-dark);
  font-size: 15px;
}
.contact-list .k {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-soft);
  padding-top: 4px;
}
.contact-list a {
  color: var(--paper-on-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--line-on-dark);
}
.contact-list a:hover { border-bottom-color: var(--brass-soft); }
.contact-list--light { border-top-color: var(--line); }
.contact-list--light li { border-bottom-color: var(--line); }
.contact-list--light .k { color: var(--brass); }
.contact-list--light a { color: var(--ink); border-bottom-color: var(--line); }
.contact-list--light a:hover { border-bottom-color: var(--brass); }
@media (max-width: 860px) {
  .contact-band .wrap { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-deep);
  color: var(--paper-on-dark);
  padding: clamp(48px, 6vw, 80px) 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: clamp(32px, 5vw, 72px);
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand .footer-logo {
  width: 220px;
  height: auto;
}
.footer-brand p {
  font-size: 14px;
  color: var(--muted-on-dark);
  margin-top: 18px;
  max-width: 26em;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-soft);
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a {
  color: var(--paper-on-dark);
  text-decoration: none;
  opacity: 0.85;
}
.footer-col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer-col address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-on-dark);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted-on-dark);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  border-bottom: 1px solid var(--line);
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 96px);
}
.page-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  text-wrap: balance;
  max-width: 16em;
}
.page-hero .lede { color: var(--muted); max-width: 38em; }

/* ---------- About page ---------- */
/* Firm-story section: building image as a quiet editorial backdrop on the
   right; the reading column sits on solid ivory via the gradient veil. */
.about-story {
  position: relative;
  overflow: hidden;
}
.about-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/building.jpg");
  background-size: cover;
  background-position: right center;
  opacity: 0.35;
}
.about-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--paper) 0%,
    var(--paper) 44%,
    rgba(247, 245, 240, 0.86) 66%,
    rgba(247, 245, 240, 0.42) 100%
  );
}
.about-story .wrap {
  position: relative;
  z-index: 1;
}
@media (max-width: 960px) {
  .about-story::after {
    background: rgba(247, 245, 240, 0.9);
  }
}

.prose {
  max-width: 42em;
}
.prose p { margin-bottom: 1.35em; }
.prose h3 {
  font-size: 24px;
  font-weight: 500;
  margin: 2em 0 0.7em;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-grid .photo {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  position: sticky;
  top: 110px;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .photo { position: static; }
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.value {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.value h3 { font-size: 21px; font-weight: 500; margin-bottom: 12px; }
.value p { font-size: 15px; color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .values-grid { grid-template-columns: 1fr; }
}

.wide-photo {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}

/* ---------- Page-hero backdrops ---------- */
/* Shared treatment: an architectural image anchored right, fading under an
   ivory gradient so the left-aligned headline stays on clean paper. Each
   page sets its own image via --backdrop. */
.has-backdrop {
  position: relative;
  overflow: hidden;
}
.has-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--backdrop) right center / cover no-repeat;
  opacity: 0.55;
}
.has-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--paper) 0%,
    var(--paper) 32%,
    rgba(247, 245, 240, 0.65) 58%,
    rgba(247, 245, 240, 0.1) 100%
  );
}
.has-backdrop .wrap {
  position: relative;
  z-index: 1;
}
@media (max-width: 960px) {
  .has-backdrop::after { background: rgba(247, 245, 240, 0.88); }
}
.pa-hero { --backdrop: url("../img/practice-hero.jpg"); }
.lawyers-hero { --backdrop: url("../img/lawyers-hero.jpg"); }
.contact-hero { --backdrop: url("../img/contact-hero.jpg"); }

/* ---------- Practice areas page ---------- */

.pa-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.pa-index {
  position: sticky;
  top: 110px;
}
.pa-index h4 {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.pa-index li { border-bottom: 1px solid var(--line); }
.pa-index a {
  display: block;
  padding: 11px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.pa-index a:hover { color: var(--brass); padding-left: 6px; }
.pa-article {
  padding-bottom: clamp(48px, 6vw, 80px);
  margin-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.pa-article:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pa-article h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  margin-bottom: 20px;
}
.pa-article > p { color: var(--muted); max-width: 40em; }
.pa-scope {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  border-top: 1px solid var(--line);
}
.pa-scope li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.pa-scope li::before {
  content: "·";
  color: var(--brass);
  font-weight: 700;
}
.pa-scope-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 32px;
  margin-bottom: 4px;
}
@media (max-width: 960px) {
  .pa-layout { grid-template-columns: 1fr; }
  .pa-index { position: static; }
  .pa-index ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .pa-index li { border-bottom: none; }
  .pa-index a {
    border: 1px solid var(--line);
    padding: 8px 14px;
    font-size: 12px;
  }
  .pa-index a:hover { padding-left: 14px; }
  .pa-scope { grid-template-columns: 1fr; }
}

/* ---------- Lawyers page ---------- */
.lawyer {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(48px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.lawyer:last-of-type { border-bottom: none; }
.lawyer .photo {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  max-width: 380px;
}
.lawyer h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 400;
  margin-bottom: 8px;
}
.lawyer .team-role { display: block; margin-bottom: 24px; }
.lawyer-bio { max-width: 40em; color: var(--ink); }
.lawyer-meta {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 40em;
}
.lawyer-meta li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.lawyer-meta .k {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
@media (max-width: 860px) {
  .lawyer { grid-template-columns: 1fr; }
  .lawyer .photo { max-width: 320px; }
}

/* ---------- Contact page ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-form .field { margin-bottom: 26px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
  border-radius: 0;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-bottom-color: var(--brass);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-note {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 18px;
}
.map-frame {
  border: 1px solid var(--line);
  margin-top: var(--sec-y);
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  filter: grayscale(0.9) contrast(0.95);
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}
.cta-band h2 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle { display: none; }
}
