:root {
  /* Neutrals — dark-mode tokens from the Paragon Siam brand guide */
  --bg: #0d191d;
  --bg-rgb: 13, 25, 29;
  --bg-panel: #132227;
  --line: rgba(239, 244, 243, 0.14);
  --line-soft: rgba(239, 244, 243, 0.08);
  --text: #eff4f3;
  --text-dim: #9fb2b6;
  --text-faint: #6f8488;

  /* Practice primaries + accents (dark-mode-lifted Signal palette) */
  --polo-primary: #3e93c4;   /* Blue */
  --polo-accent:  #ffd24d;   /* Gold */
  --meridian-primary: #2fc0b0; /* Teal */
  --meridian-accent:  #ff6b78; /* Crimson */
  --anchor-primary: #ff9955;   /* Orange */
  --anchor-accent:  #7c6aff;   /* Violet */

  /* Site-wide default: gold, the tone shared by every practice's mark,
     used as the "house" color outside any single practice's pages. */
  --accent: var(--polo-accent);
  --accent-2: var(--meridian-primary);
  --on-accent: #14100a;
}

/* Practice themes — applied per page via <body class="theme-*">,
   or per card via a modifier class, to swap only --accent/--accent-2/--on-accent. */
body.theme-polo, .card--polo {
  --accent: var(--polo-primary);
  --accent-2: var(--polo-accent);
  --on-accent: #071018;
}
body.theme-meridian, .card--meridian {
  --accent: var(--meridian-primary);
  --accent-2: var(--meridian-accent);
  --on-accent: #06120f;
}
body.theme-anchor, .card--anchor {
  --accent: var(--anchor-primary);
  --accent-2: var(--anchor-accent);
  --on-accent: #1a0f04;
}

/* Page-level ground per practice — dark tints of each practice's own primary,
   so the separation between palettes is visible at a glance, not just in accents.
   Cards on the homepage keep the shared neutral ground; only a full theme page
   (body.theme-*) recolors the ground itself. */
body.theme-polo {
  --bg: #0d161c;
  --bg-rgb: 13, 22, 28;
  --bg-panel: #152028;
}
body.theme-meridian {
  --bg: #0d1c1a;
  --bg-rgb: 13, 28, 26;
  --bg-panel: #152827;
}
body.theme-anchor {
  /* Deep brown, not dark orange — orange desaturates to brown at low
     lightness far more legibly than it reads as "dark orange." */
  --bg: #20160e;
  --bg-rgb: 32, 22, 14;
  --bg-panel: #2d2016;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Leelawadee UI", -apple-system, BlinkMacSystemFont, "Noto Sans Thai", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; }
h1, h2 { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(var(--bg-rgb), 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 92px;
}
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo {
  font-family: Cambria, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.005em;
  font-size: 1.7rem;
  line-height: 1;
  display: inline-block;
  transform: scaleY(1.16);
  transform-origin: left center;
  color: var(--text) !important;
}
.logo-mark {
  width: 24px;
  height: auto;
  display: block;
}
nav a {
  color: var(--text-dim);
  margin-left: 36px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

.lang-switch {
  margin-left: 36px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.lang-switch a {
  color: var(--text-faint);
  margin-left: 0;
  border-bottom: none;
  font-weight: 700;
  text-transform: none;
}
.lang-switch a + a { margin-left: 10px; }
.lang-switch a.active { color: var(--accent); }
.lang-switch a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(180deg, rgba(var(--bg-rgb), 0.62) 0%, rgba(var(--bg-rgb), 0.86) 65%, var(--bg) 100%);
}
.hero .container, .service-hero .container {
  position: relative;
  z-index: 2;
}
.hero .container {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 64px;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.5rem);
  line-height: 1.14;
  max-width: 13ch;
  margin-bottom: 0;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 26px 0 34px;
}
.hero-col-right { border-left: 1px solid var(--line); padding-left: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 2px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--accent);
}
.btn:hover {
  background: transparent;
  color: var(--accent);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  padding: 13px 25px;
  border-radius: 2px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.stat {
  padding: 22px 24px 22px 0;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.stat .label {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Services */
.services { padding: 96px 0; border-bottom: 1px solid var(--line); }
.services-head {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.services h2 { font-size: 2rem; }
.services-head p { color: var(--text-dim); font-size: 0.98rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 32px;
  display: block;
  background: transparent;
  transition: background 0.15s;
}
a.card:hover { background: var(--bg-panel); }
.card-icon {
  width: 40px;
  height: auto;
  display: block;
  margin-bottom: 22px;
}
.service-hero .card-icon,
.service-hero-icon {
  width: 52px;
  height: auto;
  display: block;
  margin-bottom: 24px;
}
.card-tag {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.card h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--text);
}
.card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.card-link {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: block;
}
a.card:hover .card-link { color: var(--text); }

/* About */
.about { padding: 96px 0; border-bottom: 1px solid var(--line); background: var(--bg-panel); }
.about .container {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 48px;
}
.about h2 { font-size: 2rem; }
.about p { color: var(--text-dim); font-size: 1.04rem; max-width: 62ch; }
.about p + p { margin-top: 16px; }

/* Contact */
.contact { padding: 96px 0; }
.contact-head { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; margin-bottom: 48px; align-items: end; }
.contact-head p { color: var(--text-dim); font-size: 0.98rem; }

.stat-row--vertical { grid-template-columns: 1fr; border-top: none; }
.stat-row--vertical .stat { border-right: none; padding: 18px 0; border-top: 1px solid var(--line); }
.stat-row--vertical .stat:first-child { padding: 0 0 18px; border-top: none; }
.stat-row--vertical .stat:last-child { padding: 18px 0 0; }
.contact h2 { font-size: 2rem; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.contact-item {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 30px;
}
.contact-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.contact-item span:not(.contact-label),
.contact-item a {
  font-size: 1.02rem;
  font-weight: 500;
}
.contact-grid.contact-grid-2 { grid-template-columns: repeat(2, 1fr); }
.contact-item-emails {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-item-emails a { font-size: 0.96rem; }
.contact-item-emails .role {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 8px;
}

/* Service detail pages */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--accent); }

.service-hero { position: relative; overflow: hidden; padding: 44px 0 0; border-bottom: 1px solid var(--line); }
body.theme-polo .service-hero .hero-overlay,
body.theme-meridian .service-hero .hero-overlay,
body.theme-anchor .service-hero .hero-overlay {
  background-image: linear-gradient(180deg, rgba(var(--bg-rgb), 0.62) 0%, rgba(var(--bg-rgb), 0.88) 55%, var(--bg) 100%);
}
.service-hero .container {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: end;
  padding-bottom: 56px;
}
.service-hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.16;
  max-width: 16ch;
}
.service-hero .hero-sub { margin: 22px 0 30px; }
.service-hero .hero-col-right { border-left: 1px solid var(--line); padding-left: 40px; }
.service-hero .hero-col-right p { color: var(--text-dim); font-size: 0.95rem; }

.detail-section { padding: 88px 0; border-bottom: 1px solid var(--line); }
.detail-section.alt { background: var(--bg-panel); }
.detail-section h2 { font-size: 1.7rem; margin-bottom: 44px; max-width: 26ch; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feature-item {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 30px;
}
.feature-item h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.feature-item p { color: var(--text-dim); font-size: 0.92rem; }

.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  color: var(--accent-2);
}
.step h3 { font-size: 1.02rem; margin-bottom: 6px; font-weight: 700; }
.step p { color: var(--text-dim); font-size: 0.92rem; max-width: 62ch; }

.cta-band { padding: 76px 0; }
.cta-band .container {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  align-items: center;
}
.cta-band h2 { font-size: 1.5rem; margin-bottom: 10px; font-weight: 400; }
.cta-band p { color: var(--text-dim); }
.cta-band .container > div:last-child { text-align: right; }

.other-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--bg-panel); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; }
.site-footer p { color: var(--text-faint); font-size: 0.82rem; }
.footer-brands { font-size: 0.82rem; color: var(--text-faint); }
.footer-brands span { margin-left: 16px; }

/* Responsive */
@media (max-width: 860px) {
  .hero .container, .service-hero .container, .services-head, .about .container,
  .contact-head, .cta-band .container { grid-template-columns: 1fr; }
  .hero-col-right, .service-hero .hero-col-right {
    border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px;
  }
  .cards, .contact-grid, .contact-grid.contact-grid-2, .feature-list, .other-services { grid-template-columns: 1fr; }
  .cta-band .container > div:last-child { text-align: left; }
  nav a { margin-left: 20px; }
  .logo { font-size: 1.25rem; }
  .logo-mark { width: 19px; }
  .header-inner { height: 80px; }
  .site-footer .container { flex-direction: column; gap: 12px; align-items: flex-start; }
}
