/* ============================================================
   Carriage Capital — design tokens
   ============================================================ */
:root {
  --bg: #23241F;
  --bg-raise: #2B2C26;
  --line: #34362E;
  --line-strong: #55584B;
  --ink: #EDE8DA;
  --ink-soft: #C9C4B4;
  --muted: #A9A492;
  --faint: #8B8776;
  --dim: #6E7062;
  --accent: #7E9C87;
  --accent-deep: #274436;

  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --pad-x: clamp(24px, 6vw, 72px);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent-deep); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--pad-x);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease-out-quart);
}
.site-nav.is-scrolled {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 2px solid var(--faint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.05em;
  transition: border-color 0.25s var(--ease-out-quart);
}
.brand-mark b { font-weight: 400; color: var(--accent); }
.brand:hover .brand-mark { border-color: var(--accent); }
.brand-name {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: clamp(20px, 3.4vw, 40px);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B9B4A4;
}
.nav-links a {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s var(--ease-out-quart);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease-out-expo);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(64px, 9vw, 96px) var(--pad-x) clamp(72px, 10vw, 110px);
  overflow: hidden;
}
.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1.1fr);
  gap: 56px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-kicker {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
  text-wrap: balance;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.5vw, 86px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 940px;
  text-wrap: balance;
}
/* Word-level mask wrappers added by JS for the entrance choreography */
.hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero-title .wi { display: inline-block; }
.hero-lede {
  margin-top: 32px;
  max-width: 640px;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
}
.hero-locations {
  margin-top: clamp(56px, 8vw, 96px);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}
.hero-locations span { color: var(--dim); }

.hero-art {
  max-width: 540px;
  justify-self: end;
  align-self: center;
}
.hero-art img { width: 100%; }

/* ============================================================
   Sections
   ============================================================ */
section { border-top: 1px solid var(--line); }

.section-label {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Firm --- */
.firm { padding: clamp(72px, 10vw, 120px) var(--pad-x); }
.firm-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(32px, 6vw, 72px);
}
.firm-grid .section-label { padding-top: 14px; }
.firm-statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.42;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.firm-statement b { font-weight: 400; color: var(--accent); }

/* --- Capabilities --- */
.capabilities { padding: clamp(72px, 9vw, 110px) var(--pad-x); }
.capabilities-inner { max-width: 1200px; margin: 0 auto; }
.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 44px;
}
.cap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 48px 56px 48px 0;
}
.cap:nth-child(odd) { border-right: 1px solid var(--line); }
.cap:nth-child(even) { padding: 48px 0 48px 56px; }
.cap:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.cap-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.cap-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--dim);
  transition: color 0.3s var(--ease-out-quart);
}
.cap:hover .cap-num { color: var(--accent); }
.cap h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 2.6vw, 30px);
}
.cap p {
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 52ch;
}

/* --- Contact --- */
.contact {
  padding: clamp(84px, 11vw, 130px) var(--pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.5vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  max-width: 760px;
  text-wrap: balance;
}
.contact-email {
  margin-top: 46px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 26px);
  color: var(--accent);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  transition: border-color 0.3s var(--ease-out-quart);
}
.contact-email:hover,
.contact-email:focus-visible { border-color: var(--accent); }
.contact-phone {
  margin-top: 26px;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 300;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.site-footer .locations { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-art { justify-self: start; max-width: 440px; }
}
@media (max-width: 800px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap,
  .cap:nth-child(even) { padding: 40px 0; }
  .cap:nth-child(odd) { border-right: none; }
  .cap:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .firm-grid { grid-template-columns: 1fr; gap: 24px; }
  .firm-grid .section-label { padding-top: 0; }
  .nav-links { display: none; }
}

/* ============================================================
   Reduced motion — everything settles instantly
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
