:root {
  --surface-ground: #f2f4f2;
  --surface-paper: #ffffff;
  --surface-tint: #e7ece9;
  --surface-pine: #0f2920;
  --surface-pine-deep: #091b15;
  --surface-pine-mid: #17372c;

  --ink: #111e19;
  --ink-muted: #44564f;
  --ink-on-pine: #f7faf8;
  --ink-on-pine-muted: #bfd2ca;

  --rule: #d3ddd8;
  --rule-strong: #aebfb7;
  --rule-on-pine: rgba(247, 250, 248, 0.16);

  --accent: #1850b8;
  --accent-hover: #123e91;
  --accent-on-pine: #2566e0;
  --accent-on-pine-hover: #1b53bd;

  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Strict 3-size body scale below hero (+ 4th compact table step) */
  --text-heading: 1.5rem;
  --text-body: 1rem;
  --text-sm: 0.875rem;
  --text-table: 0.8125rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --measure: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme='dark'] {
  --surface-ground: #0b1713;
  --surface-paper: #11221c;
  --surface-tint: #182f27;
  --ink: #eef3f0;
  --ink-muted: #9eb3aa;
  --rule: #233b32;
  --rule-strong: #355449;
  --accent: #4e86f0;
  --accent-hover: #6c9cf5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-ground);
  font-variant-numeric: tabular-nums;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 160ms var(--ease);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-pine);
  color: var(--ink-on-pine);
}

.container {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Single-line top navigation bar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease);
}

[data-theme='dark'] .site-header {
  background: rgba(17, 34, 28, 0.94);
}

.site-header.over-hero:not(.scrolled) {
  background: linear-gradient(180deg, rgba(9, 27, 21, 0.72) 0%, rgba(9, 27, 21, 0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--ink-on-pine);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: inherit;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-pine);
  color: var(--ink-on-pine);
  flex: none;
  transition:
    background-color 180ms var(--ease),
    color 180ms var(--ease);
}

[data-theme='dark'] .brand-mark,
.site-header.over-hero:not(.scrolled) .brand-mark,
.site-footer .brand-mark {
  background: var(--ink-on-pine);
  color: var(--surface-pine);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: inherit;
  opacity: 0.88;
  transition:
    background-color 160ms var(--ease),
    opacity 160ms var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  opacity: 1;
  text-decoration: none;
  background: rgba(15, 41, 32, 0.08);
}

[data-theme='dark'] .site-nav a:hover,
[data-theme='dark'] .site-nav a[aria-current='page'],
.site-header.over-hero:not(.scrolled) .site-nav a:hover,
.site-header.over-hero:not(.scrolled) .site-nav a[aria-current='page'] {
  background: rgba(247, 250, 248, 0.14);
}

.site-nav a.nav-cta {
  margin-left: 4px;
  padding: 8px 15px;
  background: var(--accent-on-pine);
  color: #ffffff;
  font-weight: 600;
  opacity: 1;
}

.site-nav a.nav-cta:hover {
  background: var(--accent-on-pine-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.nav-toggle {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease);
}

.site-header.over-hero:not(.scrolled) .theme-toggle,
.site-header.over-hero:not(.scrolled) .nav-toggle {
  border-color: rgba(247, 250, 248, 0.28);
}

.theme-toggle:hover,
.nav-toggle:hover {
  background: rgba(15, 41, 32, 0.08);
}

.site-header.over-hero:not(.scrolled) .theme-toggle:hover,
.site-header.over-hero:not(.scrolled) .nav-toggle:hover {
  background: rgba(247, 250, 248, 0.14);
}

.nav-toggle {
  display: none;
}

/* Full-bleed photographic equine hero bleeding to y = 0 */
.hero {
  position: relative;
  min-height: min(88dvh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--surface-pine-deep);
  color: var(--ink-on-pine);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 32%;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(9, 27, 21, 0.86) 0%,
      rgba(9, 27, 21, 0.56) 42%,
      rgba(9, 27, 21, 0.08) 68%,
      rgba(9, 27, 21, 0.04) 100%
    ),
    linear-gradient(
      180deg,
      rgba(9, 27, 21, 0.38) 0%,
      rgba(9, 27, 21, 0) 32%,
      rgba(9, 27, 21, 0.78) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 136px 0 80px;
}

.hero-title {
  margin: 0;
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 6.6vw, 5.4rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--ink-on-pine);
}

.hero-copy {
  margin: 24px 0 0;
  max-width: 48ch;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink-on-pine-muted);
}

.hero-cta-row {
  margin-top: 34px;
}

/* Primary & secondary buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  border: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: var(--text-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    background-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(1px);
}

.hero .btn-primary,
.band-pine .btn-primary,
.closing-cta .btn-primary {
  background: var(--accent-on-pine);
}

.hero .btn-primary:hover,
.band-pine .btn-primary:hover,
.closing-cta .btn-primary:hover {
  background: var(--accent-on-pine-hover);
}

/* Bands & Typography */
.band {
  padding: 88px 0;
}

.band-paper {
  background: var(--surface-paper);
}

.band-pine {
  background: var(--surface-pine);
  color: var(--ink-on-pine);
}

.band-pine a {
  color: #9ec0ff;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

h2 {
  margin: 0 0 14px;
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h3 {
  margin: 0 0 6px;
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 14px;
  max-width: 62ch;
}

p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--ink-muted);
}

.band-pine .muted,
.closing-cta .muted {
  color: var(--ink-on-pine-muted);
}

.small {
  font-size: var(--text-sm);
}

/* Connected segmented control */
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--surface-tint);
  border: 1px solid var(--rule);
  max-width: 660px;
  width: 100%;
  margin-top: 24px;
}

.segmented button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.segmented button[aria-selected='true'] {
  background: var(--surface-paper);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 30, 25, 0.08);
}

.band-pine .segmented {
  background: var(--surface-pine-deep);
  border-color: var(--rule-on-pine);
}

.band-pine .segmented button {
  color: var(--ink-on-pine-muted);
}

.band-pine .segmented button[aria-selected='true'] {
  background: var(--surface-pine-mid);
  color: var(--ink-on-pine);
  box-shadow: none;
}

/* Interactive product stage */
[hidden] {
  display: none !important;
}

.product-stage {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--surface-ground);
  border: 1px solid var(--rule);
}

.product-panel[hidden] {
  display: none;
}

.feature-list {
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.feature-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.pricing-sheet {
  border-left: 1px solid var(--rule);
  padding-left: 40px;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.price-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.price-footnote {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

/* Asymmetric editorial consulting split */
.asymmetric-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 56px;
  align-items: start;
}

.practice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.practice-list > li {
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.practice-bullets {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--ink-muted);
}

.practice-bullets li {
  margin-bottom: 6px;
}

/* Engagement stage on pine */
.engage-stage {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface-pine-mid);
  border: 1px solid var(--rule-on-pine);
}

.engage-stage h2 {
  color: var(--ink-on-pine);
  margin-bottom: 10px;
}

.engage-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-on-pine);
}

.engage-bullets li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-on-pine);
  color: var(--ink-on-pine-muted);
}

/* Protection & closing CTA */
.split-rule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
}

.closing-cta {
  margin-top: 56px;
  padding: 36px 40px;
  border-radius: var(--radius-lg);
  background: var(--surface-pine);
  color: var(--ink-on-pine);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}

.closing-cta h2 {
  color: var(--ink-on-pine);
  margin-bottom: 8px;
}

/* Subpages & legal document pages */
.page-banner {
  padding: 112px 0 36px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-paper);
}

.page-banner h1 {
  margin: 0 0 12px;
  font-size: clamp(2.15rem, 4.4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-meta {
  margin-top: 14px;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.prose {
  padding: 48px 0 84px;
}

.prose-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.prose-section:first-child {
  padding-top: 0;
}

.prose-section:last-child {
  border-bottom: 0;
}

.prose ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.prose li {
  margin-bottom: 10px;
  max-width: 62ch;
}

.quote-box {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--surface-paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--surface-pine);
  margin: 16px 0;
}

/* Catalog table */
.table-wrap {
  overflow-x: auto;
  background: var(--surface-paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-table);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-ground);
}

tr:last-child td {
  border-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--surface-pine-deep);
  color: var(--ink-on-pine-muted);
  padding: 48px 0 40px;
}

.site-footer a {
  color: var(--ink-on-pine-muted);
}

.site-footer a:hover {
  color: var(--ink-on-pine);
}

.footer-brand .brand {
  color: var(--ink-on-pine);
}

.footer-brand p {
  margin-top: 12px;
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.85fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-on-pine);
}

.footer-col h3 {
  color: var(--ink-on-pine);
  margin-bottom: 10px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--text-sm);
}

.footer-bottom {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  .product-stage,
  .asymmetric-grid,
  .engage-stage,
  .split-rule,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pricing-sheet {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
  }

  .product-stage,
  .engage-stage,
  .closing-cta {
    padding: 24px;
  }
}

@media (max-width: 720px) {
  .container,
  .container-narrow {
    padding: 0 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface-paper);
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a.nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .hero {
    min-height: 540px;
  }

  .hero-media img {
    object-position: 70% 28%;
  }

  .hero-media::after {
    background: linear-gradient(
      180deg,
      rgba(9, 27, 21, 0.54) 0%,
      rgba(9, 27, 21, 0.24) 36%,
      rgba(9, 27, 21, 0.9) 100%
    );
  }

  .hero-content {
    padding: 112px 0 52px;
  }

  .band {
    padding: 56px 0;
  }

  .segmented {
    grid-auto-flow: row;
  }
}

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