:root {
  --bg: #f5f3ef;
  --panel: #ffffff;
  --panel-soft: #f9f7f4;
  --ink: #161b22;
  --muted: #586274;
  --line: rgba(22, 27, 34, 0.08);
  --brand: #1d4ed8;
  --brand-2: #0f172a;
  --accent: #f5c28b;
  --success: #2e8b57;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.site-header {
  animation: rise-in 0.7s ease both;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 239, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.brand-mark i {
  position: absolute;
  display: block;
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: white;
  transform: rotate(35deg);
}

.brand-mark i:first-child { left: 12px; }
.brand-mark i:nth-child(2) { right: 12px; opacity: 0.55; }
.brand-mark i:nth-child(3) { left: 17px; opacity: 0.28; transform: rotate(-35deg); }

.brand-wordmark em {
  color: var(--brand);
  font-style: normal;
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.button:hover { transform: translateY(-1px); }

.primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: white; }
.secondary { border: 1px solid var(--line); background: rgba(255,255,255,0.5); }

.hero {
  padding: 84px 0 52px;
}

.hero-visual-stack .feature-image.small {
  animation: drift 8s ease-in-out 1s infinite;
}

.hero-banner {
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-banner-luma {
  background: #101827;
  color: white;
}

.hero-banner-luma::after {
  right: -4%;
  top: 12%;
  width: 38%;
  height: 72%;
  border: 1px solid rgba(244, 193, 125, 0.42);
  transform: rotate(-12deg);
}

.hero-banner-luma p,
.hero-banner-luma .hero-stats span {
  color: rgba(255,255,255,0.72);
}

.hero-banner-luma .hero-stats strong,
.hero-banner-luma h1 {
  color: white;
}

.hero-banner-luma .eyebrow { color: #f4c17d; }

.hero-banner-luma .button.secondary {
  color: white;
  border-color: rgba(255,255,255,0.24);
  background: transparent;
}

.hero-banner-meridian {
  background:
    radial-gradient(circle at 14% 22%, rgba(217, 194, 155, 0.28), transparent 24%),
    repeating-linear-gradient(105deg, rgba(122, 138, 115, 0.06) 0 1px, transparent 1px 28px),
    #f4f0e8;
}

.hero-banner-meridian::after {
  left: -8%;
  bottom: -32%;
  width: 46%;
  height: 70%;
  border: 1px solid rgba(122, 138, 115, 0.2);
  border-radius: 50%;
}

.hero-banner-legal {
  background: #132636;
  color: white;
  border-bottom: 5px solid #d5b98d;
}

.hero-banner-legal::after {
  right: 8%;
  top: 16%;
  width: 18%;
  height: 68%;
  border-left: 1px solid rgba(213, 185, 141, 0.5);
  border-right: 1px solid rgba(213, 185, 141, 0.5);
}

.hero-banner-legal p,
.hero-banner-legal .hero-stats span {
  color: rgba(255,255,255,0.72);
}

.hero-banner-legal .hero-stats strong,
.hero-banner-legal h1 {
  color: white;
}

.hero-banner-legal .eyebrow { color: #d5b98d; }

.hero-banner-legal .button.secondary {
  color: white;
  border-color: rgba(255,255,255,0.24);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin-bottom: 12px;
}

h3 { font-size: 1.45rem; letter-spacing: -0.04em; margin-bottom: 12px; }

.theme-luma h1,
.theme-luma h2,
.theme-luma h3,
.theme-luma .brand {
  font-family: "Archivo", "Segoe UI", sans-serif;
}

.theme-meridian h1,
.theme-meridian h2,
.theme-meridian h3,
.theme-meridian .brand {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.theme-meridian h1 {
  letter-spacing: -0.03em;
}

.theme-legal h1,
.theme-legal h2,
.theme-legal h3,
.theme-legal .brand {
  font-family: "Libre Baskerville", Georgia, serif;
}

.theme-legal body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

p { color: var(--muted); }

.lead {
  font-size: 1.08rem;
  max-width: 620px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.8rem;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.media-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.window-bar span {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(22, 27, 34, 0.25);
}

.dashboard {
  border-radius: 24px;
  background: linear-gradient(180deg, #fffdfc, #f5f1ee);
  padding: 22px;
  border: 1px solid rgba(22,27,34,0.05);
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card {
  background: rgba(29, 78, 216, 0.06);
  border: 1px solid rgba(29, 78, 216, 0.08);
  border-radius: 18px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.chart {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  height: 120px;
  background: white;
  border-radius: 18px;
  padding: 14px 12px;
  border: 1px solid var(--line);
}

.chart span {
  display: block;
  width: 18%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, var(--brand), rgba(29,78,216,0.35));
}

.chart span:nth-child(1) { height: 35%; }
.chart span:nth-child(2) { height: 52%; }
.chart span:nth-child(3) { height: 74%; }
.chart span:nth-child(4) { height: 100%; }

.section { padding: 100px 0; }

.section-header {
  max-width: 720px;
  margin-bottom: 34px;
}

.narrow-header {
  max-width: 620px;
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 28px;
}

.stats-strip div {
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-strip strong {
  font-size: 1.9rem;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.stats-strip span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--muted);
}

.service-grid,
.work-grid,
.mini-grid,
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.service-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.work-grid { grid-template-columns: 1.2fr 0.8fr; }
.mini-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.card {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 22px;
}

.service-card {
  padding: 26px 22px 24px;
}

.mini-card {
  padding: 22px 20px;
}

.icon-box {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(29,78,216,0.08);
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 18px;
}

.case-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.case-spotlight {
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(245,240,236,0.9));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
}

.work-feature {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
}

.work-copy {
  padding: 22px 22px 26px;
}

.case-preview {
  min-height: 260px;
  border-radius: 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(29,78,216,0.12), rgba(245,194,139,0.2)), linear-gradient(135deg, #e2eaf4, #f7efe5);
}

.hero-visual-stack {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: end;
}

.feature-image {
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-image.large {
  min-height: 430px;
}

.feature-image.small {
  min-height: 240px;
  margin-bottom: 20px;
}

.overlay-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.overlay-card strong {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.overlay-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.quote-box {
  background: linear-gradient(135deg, #101827, #182335);
  color: white;
  border-radius: 28px;
  padding: 30px 28px;
}

.quote-box p { color: rgba(255,255,255,0.8); }

.person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #fff0d8);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.cta {
  background: linear-gradient(135deg, var(--brand-2), #1a2336);
  color: white;
  border-radius: 30px;
  padding: 42px 28px;
}

.cta p, .cta h2 { color: white; }

.theme-luma .button.primary {
  border-radius: 999px;
  box-shadow: 0 14px 24px rgba(54, 93, 245, 0.18);
}

.theme-luma .button.secondary {
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
}

.theme-luma .section {
  padding: 96px 0;
}

.theme-luma .service-grid,
.theme-luma .mini-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.theme-luma .mini-grid {
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.theme-meridian .button.primary {
  border-radius: 0 18px 0 18px;
  box-shadow: 0 14px 24px rgba(122, 138, 115, 0.18);
}

.theme-meridian .button.secondary {
  border-radius: 18px;
  background: rgba(255,255,255,0.45);
}

.theme-meridian .section {
  padding: 104px 0;
}

.theme-meridian .service-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.theme-meridian .card {
  border-radius: 20px;
  background: rgba(255,255,255,0.52);
}

.theme-legal .button.primary {
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
}

.theme-legal .button.secondary {
  border-radius: 4px;
  background: transparent;
  border: 1px solid rgba(36, 74, 115, 0.2);
}

.theme-legal .section {
  padding: 94px 0;
}

.theme-legal .service-grid {
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.theme-luma .hero-grid {
  grid-template-columns: 1.08fr 0.92fr;
}

.theme-meridian .hero-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.theme-legal .hero-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.theme-meridian .hero-visual-stack {
  grid-template-columns: 0.85fr 1.15fr;
}

.theme-legal .hero-visual-stack {
  grid-template-columns: 1fr 0.9fr;
}

.theme-luma .feature-image.large,
.theme-meridian .feature-image.large,
.theme-legal .feature-image.large {
  border-radius: 26px;
}

.theme-luma .feature-image.small,
.theme-meridian .feature-image.small,
.theme-legal .feature-image.small {
  border-radius: 20px;
}

.theme-luma .split-about,
.theme-meridian .split-about,
.theme-legal .split-about {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: end;
}

.theme-luma .cta {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.theme-meridian .cta {
  background: linear-gradient(135deg, #4b5f51, #7a8a73);
}

.theme-legal .cta {
  background: linear-gradient(135deg, #132636, #244a73);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.contact-actions {
  flex-shrink: 0;
}

.email-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer {
  padding: 24px 0 40px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
}

@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;
  }
}

.theme-luma { --brand: #365df5; --accent: #f4c17d; }
.theme-luma .feature-image.large { background-image: linear-gradient(rgba(15,23,42,0.08), rgba(15,23,42,0.12)), url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=900&q=80'); }
.theme-luma .feature-image.small { background-image: linear-gradient(rgba(15,23,42,0.10), rgba(15,23,42,0.10)), url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=700&q=80'); }
.theme-luma .case-preview { background-image: linear-gradient(rgba(15,23,42,0.12), rgba(15,23,42,0.08)), url('https://images.unsplash.com/photo-1552664730-d307ca884978?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; }

.theme-meridian { --brand: #7a8a73; --accent: #d9c29b; }
.theme-meridian .feature-image.large { background-image: linear-gradient(rgba(67,74,61,0.18), rgba(67,74,61,0.08)), url('https://images.unsplash.com/photo-1515377905703-c4788e51af15?auto=format&fit=crop&w=900&q=80'); }
.theme-meridian .feature-image.small { background-image: linear-gradient(rgba(67,74,61,0.12), rgba(67,74,61,0.12)), url('https://images.unsplash.com/photo-1506126613408-eca07ce68773?auto=format&fit=crop&w=700&q=80'); }
.theme-meridian .case-preview { background-image: linear-gradient(rgba(67,74,61,0.14), rgba(67,74,61,0.08)), url('https://images.unsplash.com/photo-1521590832167-7ae7b8d5fc3a?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; }

.theme-legal { --brand: #244a73; --accent: #d5b98d; }
.theme-legal .feature-image.large { background-image: linear-gradient(rgba(17,31,48,0.18), rgba(17,31,48,0.18)), url('https://images.unsplash.com/photo-1556157382-97eda2d62296?auto=format&fit=crop&w=900&q=80'); }
.theme-legal .feature-image.small { background-image: linear-gradient(rgba(17,31,48,0.12), rgba(17,31,48,0.12)), url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&w=700&q=80'); }
.theme-legal .case-preview { background-image: linear-gradient(rgba(17,31,48,0.20), rgba(17,31,48,0.10)), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; }

.theme-luma .hero-visual-stack { grid-template-columns: 1.08fr 0.92fr; }
.theme-meridian .hero-visual-stack { grid-template-columns: 0.92fr 1.08fr; }
.theme-legal .hero-visual-stack { grid-template-columns: 1fr 0.9fr; }

@media (max-width: 820px) {
  .hero-grid,
  .grid-3,
  .grid-4,
  .case-grid,
  .service-grid,
  .work-grid,
  .mini-grid,
  .split-about {
    grid-template-columns: 1fr;
  }

  .main-nav { display: none; }
  .topbar, .nav-wrap, .footer-row { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; min-height: 54px; }

  .hero {
    padding: 52px 0 32px;
  }

  .hero-visual-stack {
    min-height: 370px;
    grid-template-columns: 1fr 0.72fr;
    gap: 12px;
  }

  .feature-image.large {
    min-height: 320px;
    border-radius: 22px;
  }

  .feature-image.small {
    min-height: 190px;
    margin-bottom: 12px;
    border-radius: 16px;
  }

  .overlay-card {
    right: 10px;
    bottom: 10px;
    padding: 14px 16px;
  }

  .section {
    padding: 76px 0;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.6rem);
  }

  .lead {
    font-size: 1rem;
  }

  .cta {
    padding: 30px 20px;
    border-radius: 22px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 14px 20px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-wrap {
    min-height: 72px;
  }

  .hero {
    padding-top: 38px;
  }

  .hero-visual-stack {
    min-height: 310px;
    grid-template-columns: 1fr 0.62fr;
  }

  .feature-image.large {
    min-height: 270px;
  }

  .feature-image.small {
    min-height: 156px;
  }

  .overlay-card strong {
    font-size: 1.25rem;
  }

  .overlay-card span {
    font-size: 0.7rem;
  }

  .stats-strip {
    gap: 14px;
  }

  .stats-strip div {
    min-width: 90px;
  }
}
