/* ==========================================================
   RDM Chambers — site styles
   ========================================================== */

:root {
  --ink: #0f1b2d;
  --navy: #16263f;
  --sea: #24406a;
  --sand: #f6f1e9;
  --sand-2: #ece4d6;
  --gold: #b8925a;
  --gold-light: #c9a46a;
  --text: #1e2633;
  --muted: #5b6474;
  --line: rgba(15, 27, 45, 0.12);
  --white: #ffffff;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(15, 27, 45, 0.18);
  --header-h: 84px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--sea); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--ink); }
h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1.1em; }

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.95em 1.8em; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.03em;
  text-decoration: none; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-light); }
.btn-ghost { border-color: rgba(255,255,255,0.55); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-small { padding: 0.6em 1.3em; font-size: 0.85rem; }

.eyebrow {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-light);
  margin-bottom: 1.2em; display: inline-flex; align-items: center; gap: 0.8em;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow-dark { color: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background 0.3s, box-shadow 0.3s, height 0.3s;
}
.site-header.scrolled {
  background: rgba(15, 27, 45, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  --header-h: 70px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand-mark {
  font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1; letter-spacing: 0.02em;
  padding-right: 12px; border-right: 1px solid rgba(255,255,255,0.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.18em; text-transform: uppercase; }
.brand-tag { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.btn) {
  color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  position: relative; padding: 4px 0;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--gold-light); transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.site-nav a:not(.btn):hover,
.site-nav a.active { color: var(--white); }
.site-nav a:not(.btn):hover::after,
.site-nav a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  color: var(--white); overflow: hidden; isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%;
  z-index: -2; transform: scale(1.04); animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,19,33,0.85) 0%, rgba(10,19,33,0.55) 45%, rgba(10,19,33,0.1) 100%),
    linear-gradient(0deg, rgba(10,19,33,0.7) 0%, rgba(10,19,33,0) 40%);
}
.hero-content { padding-top: calc(var(--header-h) + 40px); padding-bottom: 140px; max-width: 1180px; }
.hero h1 {
  color: var(--white); font-size: clamp(2.5rem, 5.2vw, 4.1rem); font-weight: 500;
  max-width: 19ch; letter-spacing: -0.015em; margin-bottom: 0.4em;
}
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 54ch; color: rgba(255,255,255,0.85); margin-bottom: 2.2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: rgba(10,19,33,0.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-strip-inner > div { padding: 22px 0; display: flex; flex-direction: column; }
.hero-strip-inner > div + div { padding-left: 32px; border-left: 1px solid rgba(255,255,255,0.15); }
.hero-strip strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.hero-strip span { font-size: 0.82rem; color: rgba(255,255,255,0.7); letter-spacing: 0.04em; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.about-heading { position: sticky; top: 120px; }
.about-heading h2 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); }
.lead { font-size: 1.22rem; color: var(--ink); line-height: 1.6; }
.about-body > p:not(.lead) { color: var(--muted); }

.pillars { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillars li { display: flex; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.pillar-num { font-family: var(--serif); font-size: 1.1rem; color: var(--gold); padding-top: 4px; min-width: 28px; }
.pillars h3 { font-size: 1.35rem; margin-bottom: 0.2em; }
.pillars p { margin: 0; color: var(--muted); }

/* ---------- Practice ---------- */
.practice { background: var(--sand); }
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 36px 32px;
  border: 1px solid rgba(15,27,45,0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); margin-bottom: 26px;
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--gold-light); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.55rem; }
.card p, .card li { color: var(--muted); font-size: 0.97rem; }
.card p:last-child { margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 0.45em; line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px;
  border-radius: 50%; border: 1.5px solid var(--gold);
}

/* ---------- Quote ---------- */
.quote-band {
  background: var(--ink); color: var(--white); padding: clamp(80px, 10vw, 120px) 0; text-align: center;
  position: relative; overflow: hidden;
}
.quote-band::before {
  content: "\201C"; position: absolute; left: 50%; top: -0.18em; transform: translateX(-50%);
  font-family: var(--serif); font-size: 22rem; line-height: 1; color: rgba(201,164,106,0.08); pointer-events: none;
}
.quote-band figure { margin: 0 auto; max-width: 900px; position: relative; }
.quote-band blockquote {
  margin: 0 0 24px; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.25;
}
.quote-band figcaption { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-light); }

/* ---------- Team ---------- */
.profile {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: center;
  margin-bottom: clamp(64px, 9vw, 110px);
}
.profile:last-child { margin-bottom: 0; }
.profile-reverse .profile-photo { order: 2; }
.profile-photo { position: relative; }
.profile-photo::after {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--gold);
  border-radius: var(--radius); z-index: -1;
}
.profile-reverse .profile-photo::after { inset: 18px 18px -18px -18px; }
.profile-photo img {
  width: 100%; height: auto; border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  box-shadow: var(--shadow);
}
.profile-photo-landscape img { aspect-ratio: 3 / 2; object-position: 50% 30%; }
.profile-role { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6em; }
.profile h3 { font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: 0.5em; }
.creds { list-style: none; padding: 0; margin: 0 0 1.5em; display: flex; flex-wrap: wrap; gap: 8px; }
.creds li {
  font-size: 0.82rem; padding: 6px 14px; border-radius: 999px; background: var(--sand); color: var(--ink);
}
.profile-body > p { color: var(--muted); }
details { margin: 0 0 1.4em; }
details p { color: var(--muted); }
summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.92rem; color: var(--ink); margin-bottom: 1em;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; color: var(--gold); line-height: 1; transition: transform 0.3s; }
details[open] summary::after { transform: rotate(45deg); }
.profile-contact {
  display: inline-block; font-size: 0.92rem; color: var(--sea); text-decoration: none;
  border-bottom: 1px solid var(--gold); padding-bottom: 2px;
}
.profile-contact:hover { color: var(--gold); }

/* ---------- Resources ---------- */
.resources { background: var(--sand); }
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }
.resource-col h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1em; }
.resource {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 1.35rem; font-weight: 500; transition: padding 0.3s, color 0.3s;
}
.resource:first-of-type { border-top: 1px solid var(--line); }
.resource small { display: block; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.05em; margin-top: 2px; }
.resource .arrow { font-family: var(--sans); color: var(--gold); font-size: 1.1rem; transition: transform 0.3s; }
.resource:hover { padding-left: 14px; color: var(--sea); }
.resource:hover .arrow { transform: translate(3px, -3px); }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: var(--white); }
.contact h2, .contact h3 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: stretch; }
.contact-lead { color: rgba(255,255,255,0.75); font-size: 1.08rem; max-width: 46ch; }
.contact-cards { display: grid; gap: 12px; margin: 36px 0; }
.contact-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03); color: var(--white); text-decoration: none; transition: background 0.3s, border-color 0.3s;
}
a.contact-item:hover { background: rgba(255,255,255,0.07); border-color: var(--gold); }
.ci-label { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-light); }
.ci-value { font-size: 1.02rem; font-weight: 500; }
.addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.addresses h3 { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.8em; }
address { font-style: normal; color: rgba(255,255,255,0.8); line-height: 1.7; }
.contact-map { border-radius: var(--radius); overflow: hidden; min-height: 420px; border: 1px solid rgba(255,255,255,0.12); }
.contact-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: grayscale(0.4) contrast(1.05); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 56px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 26px; }
.footer-nav a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--gold-light); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: 0.8rem; }
.footer-legal p { margin: 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

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

@media (max-width: 880px) {
  :root { --header-h: 70px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; z-index: 60;
  }
  .nav-toggle span { display: block; height: 1.5px; background: var(--white); transition: transform 0.3s, opacity 0.3s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: 0; background: var(--ink);
    flex-direction: column; justify-content: center; gap: 28px;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
  }
  .site-nav a:not(.btn) { font-family: var(--serif); font-size: 2rem; }
  .site-nav.open { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }

  .about-grid, .contact-grid, .resource-grid { grid-template-columns: 1fr; }
  .about-heading { position: static; }
  .profile { grid-template-columns: 1fr; }
  .profile-reverse .profile-photo { order: 0; }
  .profile-photo { max-width: 460px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .practice-grid { grid-template-columns: 1fr; }
  .card { padding: 30px 24px; }
  .hero-content { padding-bottom: 250px; }
  .hide-mobile { display: none; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; padding: 0.95em 1.1em; font-size: 0.82rem; white-space: nowrap; }
  .hero-strip-inner { grid-template-columns: 1fr; }
  .hero-strip-inner > div { padding: 12px 0; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
  .hero-strip-inner > div + div { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.12); }
  .hero-strip strong { font-size: 1.15rem; }
  .addresses { grid-template-columns: 1fr; }
  .brand-mark { font-size: 1.7rem; }
  .brand-name { font-size: 1.05rem; }
  .profile-photo::after { display: none; }
  .footer-legal { flex-direction: column; }
}
