/* ============================================================
   Apex Legal — landing page styles
   ============================================================ */

:root {
  --navy: #0A1A2F;
  --navy-2: #122846;
  --cream: #F5F1EA;
  --cream-2: #EFE9DD;
  --brass: #B08D57;
  --brass-2: #C9A876;
  --charcoal: #1A1A1A;
  --muted: #6B6B6B;
  --hairline: #D9D2C5;
  --hairline-dark: #1F3252;

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

  --content-w: 1240px;
  --content-pad: clamp(20px, 4vw, 48px);
  --section-pad-y: clamp(80px, 10vw, 140px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding-left: var(--content-pad);
  padding-right: var(--content-pad);
}

/* -------- Typography utilities -------- */

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brass);
  margin: 0 0 24px;
}

.eyebrow--light { color: var(--brass-2); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brass);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.link-arrow:hover { color: var(--charcoal); border-bottom-color: var(--brass); }

.section-head { margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .display { max-width: 18ch; }
.section-head--light .display { color: var(--cream); }

/* -------- Buttons -------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn--brass {
  background: var(--brass);
  color: var(--cream);
  border-color: var(--brass);
}
.btn--brass:hover { background: #98774A; border-color: #98774A; }

.btn--ghost-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(245, 241, 234, 0.45);
}
.btn--ghost-light:hover { background: rgba(245, 241, 234, 0.08); border-color: var(--cream); }

.btn--ghost-dark {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
  padding: 12px 22px;
  font-size: 11px;
}
.btn--ghost-dark:hover { background: var(--charcoal); color: var(--cream); }

/* -------- Utility bar -------- */

.utility {
  background: var(--navy);
  color: rgba(245, 241, 234, 0.7);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-dark);
}
.utility__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.utility__links { display: flex; gap: 12px; align-items: center; }
.utility a { transition: color 0.2s; }
.utility a:hover { color: var(--brass-2); }
.utility__locations { color: rgba(245, 241, 234, 0.55); }

@media (max-width: 640px) {
  .utility__locations { display: none; }
  .utility__row { justify-content: flex-end; }
}

/* -------- Navigation -------- */

.nav {
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 24px;
}
.nav__brand-mark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--charcoal);
}
.nav__links {
  display: flex;
  gap: 36px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.nav__links a {
  color: var(--charcoal);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav__links a:hover { border-bottom-color: var(--brass); color: var(--brass); }

.nav__cta-wrap { display: flex; align-items: center; gap: 16px; }

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--charcoal);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--charcoal);
  transition: transform 0.25s, opacity 0.25s;
}
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 19px; }
.nav__toggle span:nth-child(3) { top: 24px; }

body.drawer-open .nav__toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.drawer-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.drawer-open .nav__toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__cta-wrap .btn { display: none; }
  .nav__toggle { display: block; }
}

/* -------- Mobile drawer -------- */

.drawer {
  position: fixed;
  inset: 0;
  background: var(--navy);
  color: var(--cream);
  padding: 120px var(--content-pad) 60px;
  z-index: 40;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
  pointer-events: none;
}
body.drawer-open .drawer {
  transform: translateY(0);
  pointer-events: auto;
}
.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.drawer__nav a {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--cream);
  border-bottom: 1px solid var(--hairline-dark);
  padding-bottom: 18px;
}
.drawer__nav .btn {
  margin-top: 24px;
  align-self: stretch;
  letter-spacing: 0.1em;
  font-size: 11px;
  padding: 18px 16px;
  white-space: normal;
  text-align: center;
}

/* -------- Hero -------- */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--cream);
  min-height: calc(100vh - 84px - 38px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(80px, 12vw, 160px) 0 clamp(80px, 10vw, 140px);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("images/hero-bg.jpg");
  background-size: cover;
  background-position: center right;
  opacity: 0.18;
  filter: grayscale(0.4) contrast(1.05);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--navy) 0%, rgba(10, 26, 47, 0.85) 45%, rgba(10, 26, 47, 0.35) 100%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
}
.hero__headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  color: var(--cream);
}
.hero__sub {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  max-width: 58ch;
  color: rgba(245, 241, 234, 0.78);
  margin: 0 0 44px;
}
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  left: var(--content-pad);
  bottom: 36px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.55);
}
.hero__scroll-line {
  width: 60px;
  height: 1px;
  background: var(--brass);
}

@media (max-width: 640px) {
  .hero__scroll { display: none; }
}

/* -------- Trust strip -------- */

.trust {
  background: var(--cream);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 28px 0;
}
.trust__row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--brass);
  border-radius: 50%;
}

/* -------- Firm overview -------- */

.firm { padding: var(--section-pad-y) 0; }
.firm__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.firm__left .display { max-width: 12ch; }
.firm__right p {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--charcoal);
  max-width: 58ch;
}
.firm__right .link-arrow { margin-top: 12px; }

@media (max-width: 860px) {
  .firm__grid { grid-template-columns: 1fr; }
}

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

.practice {
  padding: var(--section-pad-y) 0;
  background: var(--cream-2);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.practice__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.practice-card {
  padding: 44px 36px 48px;
  background: var(--cream);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  transition: background 0.25s;
}
.practice-card:hover { background: var(--cream-2); }
.practice-card__numeral {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--brass);
  margin: 0 0 28px;
  letter-spacing: 0.08em;
}
.practice-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--charcoal);
}
.practice-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 28px;
  flex: 1;
}

@media (max-width: 960px) {
  .practice__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .practice__grid { grid-template-columns: 1fr; }
}

/* -------- Approach (Why Apex) -------- */

.approach {
  padding: var(--section-pad-y) 0;
  background: var(--navy);
  color: var(--cream);
}
.approach__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline-dark);
}
.approach__item {
  padding: 40px 36px 8px 0;
  border-right: 1px solid var(--hairline-dark);
}
.approach__item:last-child { border-right: none; padding-right: 0; }
.approach__item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--cream);
}
.approach__item p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(245, 241, 234, 0.7);
  margin: 0;
  max-width: 38ch;
}

@media (max-width: 860px) {
  .approach__grid { grid-template-columns: 1fr; }
  .approach__item { border-right: none; border-bottom: 1px solid var(--hairline-dark); padding: 32px 0; }
  .approach__item:last-child { border-bottom: none; }
}

/* -------- Counsel / Attorneys -------- */

.counsel { padding: var(--section-pad-y) 0; }
.counsel__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 48px);
}
.counsel-card {
  display: flex;
  flex-direction: column;
}
.counsel-card__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream-2);
  margin-bottom: 24px;
  border-bottom: 2px solid var(--brass);
}
.counsel-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.counsel-card:hover .counsel-card__photo img { transform: scale(1.03); }

.counsel-card__tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 12px;
}
.counsel-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 6px;
  color: var(--charcoal);
}
.counsel-card__title {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 16px;
  font-style: italic;
}
.counsel-card__bio {
  font-size: 15px;
  line-height: 1.7;
  color: var(--charcoal);
  margin: 0;
  max-width: 36ch;
}

@media (max-width: 860px) {
  .counsel__grid { grid-template-columns: 1fr; gap: 56px; }
  .counsel-card__photo { max-width: 420px; }
}

/* -------- CTA band -------- */

.cta-band {
  background: var(--navy);
  color: var(--cream);
  padding: clamp(80px, 10vw, 140px) 0;
  text-align: center;
  border-top: 1px solid var(--hairline-dark);
}
.cta-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.cta-band .display { color: var(--cream); max-width: 18ch; }
.cta-band__sub {
  font-size: 15px;
  color: rgba(245, 241, 234, 0.65);
  margin: 0;
  max-width: 52ch;
  line-height: 1.7;
}
.cta-band .btn { margin-top: 12px; }

/* -------- Footer -------- */

.footer {
  background: var(--cream);
  color: var(--charcoal);
  padding: clamp(60px, 7vw, 96px) 0 32px;
  border-top: 1px solid var(--hairline);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(28px, 3vw, 56px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--hairline);
}
.footer__wordmark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.footer__tag {
  font-style: italic;
  color: var(--muted);
  margin: 0;
  max-width: 24ch;
  line-height: 1.6;
}
.footer__heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 18px;
}
.footer address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.85;
  color: var(--charcoal);
}
.footer address a:hover { color: var(--brass); }

.footer__nav { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.9; }
.footer__nav a { transition: color 0.2s; }
.footer__nav a:hover { color: var(--brass); }

.footer__base {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 32px;
}
.footer__base > p { margin: 0; font-size: 12px; color: var(--muted); }
.footer__disclaimer {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 100ch;
  letter-spacing: 0.02em;
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* -------- Reduced motion -------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
