/* ─── VARIABLES ─── */
:root {
  --brown: #4B141B;
  --brown-dark: #3A1015;
  --cream: #FFFCF0;
  --black: #1A1A1A;
  --grey: #6B6B6B;
  --white: #FFFFFF;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1100px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

/* ─── RESET & BASE ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brown);
  color: var(--white);
}

/* ─── LAYOUT ─── */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ─── NAV ─── */
/* The nav is taller than before to accommodate the stacked
   TWAIN / ADVISORY logo without crushing it. */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

nav.scrolled {
  background: rgba(255, 252, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  /* Slightly tighter padding when scrolled — feels more compact */
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  /* Position relative so the two logo variants can stack on top of each other */
  position: relative;
}

/* Both logo images live in the same spot; we just fade between them.
   `light` is used on dark backgrounds (the brown hero, unscrolled state).
   `dark` is used on light backgrounds (scrolled state, inner pages). */
.nav-logo-img {
  display: block;
  height: 56px;
  width: auto;
  transition: opacity 0.4s ease, height 0.4s ease;
}

.nav-logo-light { opacity: 1; }
.nav-logo-dark {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

/* Scrolled state: hide the light logo, show the dark one.
   Also shrink slightly so the nav doesn't feel heavy on inner pages. */
nav.scrolled .nav-logo-light { opacity: 0; }
nav.scrolled .nav-logo-dark { opacity: 1; }
nav.scrolled .nav-logo-img { height: 48px; }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.3s, color 0.4s ease;
}

nav.scrolled .nav-links a { color: var(--black); }
.nav-links a:hover { opacity: 1; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
  transition: transform 0.3s, opacity 0.3s, background 0.4s ease;
}

nav.scrolled .hamburger span { background: var(--brown); }

/* ─── BADGE ─── */
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--white);
  background: var(--brown);
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
  margin-bottom: 2.5rem;
}

.badge-light {
  background: rgba(255,252,240,0.15);
  color: var(--cream);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
  padding-bottom: 6rem;
  background: var(--brown);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7.5vw, 6.5rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.08;
  max-width: 900px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s ease 0.3s forwards;
  position: relative;
  z-index: 2;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── PAGE HEADER (inner pages) ─── */
.page-header {
  background: var(--brown);
  padding-top: 8.5rem;
  padding-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-header-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.1;
}

/* ─── SECTIONS ─── */
section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-cream { background: var(--cream); }
.section-white { background: var(--white); }
.section-brown { background: var(--brown); color: var(--cream); }

/* ─── OVERVIEW ─── */
.overview-content .lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 400;
  color: var(--brown);
  line-height: 1.4;
  margin-bottom: 2.5rem;
}

.overview-content p {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--grey);
  margin-bottom: 1.5rem;
}

/* ─── THE FIRM ─── */
.firm-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 4rem;
}

.firm-lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 400;
  color: var(--brown);
  line-height: 1.4;
}

.firm-body p {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--grey);
  margin-bottom: 1.5rem;
}

.firm-body .firm-accent {
  color: var(--brown);
  font-weight: 500;
  font-style: italic;
}

/* ─── PRACTICE ─── */
.practice-intro {
  margin-bottom: 4rem;
}

.practice-intro .lead {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--brown);
  line-height: 1.4;
  margin-bottom: 1.5rem;
  max-width: 780px;
}

.practice-intro p {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--grey);
  max-width: 780px;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.practice-grid-bottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  max-width: 66.666%;
  margin-left: auto;
  margin-right: auto;
}

.practice-card {
  background: var(--white);
  padding: 2.2rem;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.05);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.practice-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.practice-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.practice-card p {
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--grey);
  margin-bottom: 1rem;
}

.practice-card p:last-child {
  margin-bottom: 0;
}

.practice-card ul {
  list-style: none;
  padding: 0;
}

.practice-card li {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--grey);
  padding: 0.4rem 0;
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.5;
}

/* Subtle arrow-style icon: a small chevron drawn from two borders,
   rotated 45° so it points to the right. Crisp at any zoom level. */
.practice-card li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72rem;
  width: 5px;
  height: 5px;
  border-top: 1.5px solid var(--brown);
  border-right: 1.5px solid var(--brown);
  transform: rotate(45deg);
}

/* ─── PHILOSOPHY ─── */
.philosophy-content {
  text-align: center;
}

.philosophy-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 3rem;
  font-style: italic;
}

.philosophy-body p {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 252, 240, 0.7);
  margin-bottom: 1.5rem;
  text-align: left;
}

.philosophy-body .philosophy-closing {
  color: var(--cream);
  opacity: 1;
  font-style: italic;
}

/* ─── LOCATIONS ─── */
.locations-hq {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.locations-hq .city {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--black);
  position: relative;
}

.locations-hq .city:not(:last-child)::after {
  content: '·';
  position: absolute;
  right: -1.7rem;
  color: var(--brown);
  font-weight: 300;
}

.locations-body {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--grey);
  margin-bottom: 2rem;
}

.locations-list {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 2;
  color: var(--grey);
}

.locations-list span::after {
  content: ' · ';
  color: var(--brown);
}

.locations-list span:last-child::after {
  content: '';
}

/* ─── CONTACT ─── */
.contact-lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 400;
  color: var(--brown);
  line-height: 1.4;
  max-width: 720px;
  margin-bottom: 3rem;
}

.contact-block {
  margin-bottom: 2.75rem;
}

.contact-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.6rem;
}

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid rgba(75, 20, 27, 0.25);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-email:hover {
  color: var(--brown);
  border-color: var(--brown);
}

.contact-offices {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.contact-office .city {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--black);
  display: block;
  margin-bottom: 0.35rem;
}

.contact-office a {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--grey);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-office a:hover { color: var(--brown); }

/* ─── FOOTER ─── */
footer {
  background: var(--brown);
  color: var(--cream);
  padding: 4rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

/* The footer now uses the full stacked logo instead of an icon + wordmark. */
.footer-logo {
  display: block;
  margin-bottom: 1rem;
}

.footer-logo-img {
  display: block;
  height: 70px;
  width: auto;
}

.footer-tagline {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.5;
}

.footer-right {
  font-family: var(--sans);
  font-size: 0.78rem;
  opacity: 0.45;
  text-align: right;
  line-height: 1.7;
}

.footer-right .footer-email {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 252, 240, 0.3);
  transition: border-color 0.3s ease;
}

.footer-right .footer-email:hover {
  border-color: var(--cream);
}

/* ─── UTILITIES ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--brown);
  margin: 3rem 0;
  opacity: 0.4;
}

.divider-center { margin: 3rem auto; }
.divider-light { background: rgba(255,252,240,0.3); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .firm-grid { gap: 3rem; }
  .practice-grid-bottom { max-width: 100%; }
}

@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  nav.scrolled { padding: 0.8rem 1.5rem; }

  .nav-logo-img { height: 44px; }
  nav.scrolled .nav-logo-img { height: 40px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 252, 240, 0.97);
    backdrop-filter: blur(12px);
    padding: 2rem 1.5rem;
    gap: 1.5rem;
  }
  .nav-links.open a { color: var(--black); }
  .hamburger { display: flex; }

  section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .page-header { padding-top: 6.5rem; padding-bottom: 2.5rem; }
  .hero { padding-bottom: 4rem; min-height: 75vh; }

  .firm-grid { grid-template-columns: 1fr; gap: 2rem; }

  .practice-grid { grid-template-columns: 1fr; }
  .practice-grid-bottom { grid-template-columns: 1fr; max-width: 100%; }

  .locations-hq .city { font-size: 1.6rem; }
  .locations-hq .city:not(:last-child)::after { right: -1.2rem; }

  footer { flex-direction: column; gap: 2rem; align-items: flex-start; }
  .footer-right { text-align: left; }
  .footer-logo-img { height: 60px; }
}

@media (max-width: 500px) {
  .hero-title { font-size: 2.8rem; }
  .locations-hq { gap: 1.5rem; }
  .locations-hq .city:not(:last-child)::after { display: none; }
}
