:root {
  --ink: #162522;
  --ink-soft: #273b37;
  --paper: #f3f0e8;
  --paper-deep: #e6e0d4;
  --white: #fffdf8;
  --orange: #f0643b;
  --orange-dark: #c64725;
  --green: #8ba89d;
  --line: rgba(22, 37, 34, .17);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--white); padding: 10px 15px; }
.skip-link:focus { top: 16px; }

.site-header,
.hero,
.section,
footer {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.heritage-logo { display: block; width: 199px; max-width: 100%; height: auto; mix-blend-mode: multiply; }
.legal-header .heritage-logo { padding: 3px 6px; background: #fff; mix-blend-mode: normal; }
.heritage-logo-footer { width: 180px; }
nav { display: flex; align-items: center; gap: 30px; font-size: 14px; }
nav a { text-decoration: none; }
nav a:not(.nav-cta):hover { color: var(--orange-dark); }
.nav-cta { border: 1px solid var(--ink); padding: 10px 17px; border-radius: 999px; }
.nav-cta:hover { background: var(--ink); color: var(--white); }

.hero {
  min-height: 690px;
  padding: 85px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  align-items: center;
  gap: 8vw;
}
.kicker { margin: 0 0 21px; color: var(--orange-dark); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; font-size: clamp(52px, 7vw, 94px); font-weight: 600; letter-spacing: -.07em; line-height: .97; }
h1 em { display: inline-block; color: var(--orange); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero-lead { max-width: 680px; margin: 37px 0 0; color: var(--ink-soft); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 39px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 25px; border-radius: 2px; text-decoration: none; font-size: 14px; font-weight: 750; }
.button-primary { background: var(--orange); color: var(--ink); }
.button-primary:hover { background: var(--orange-dark); color: var(--white); }
.text-link { font-size: 14px; text-underline-offset: 5px; }

.system-map {
  position: relative;
  aspect-ratio: 1;
  max-width: 535px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(240,100,59,.15) 0 22%, transparent 22.5%), linear-gradient(135deg, rgba(255,255,255,.55), rgba(230,224,212,.35));
}
.system-map::before,
.system-map::after { content: ""; position: absolute; inset: 16%; border: 1px dashed rgba(22,37,34,.2); border-radius: 50%; }
.system-map::after { inset: 32%; }
.map-label { position: absolute; top: 8%; left: 50%; transform: translateX(-50%); font: 700 11px/1 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.map-core { position: absolute; inset: 40%; z-index: 3; display: grid; place-items: center; border-radius: 50%; background: var(--orange); font-weight: 800; }
.map-node { position: absolute; z-index: 3; min-width: 105px; padding: 10px 14px; border: 1px solid var(--ink); background: var(--white); text-align: center; font-size: 12px; font-weight: 750; }
.node-a { left: -2%; top: 25%; }.node-b { right: -2%; top: 27%; }.node-c { right: 4%; bottom: 17%; }.node-d { left: 4%; bottom: 17%; }
.map-line { position: absolute; z-index: 2; height: 1px; background: var(--ink); transform-origin: left center; }
.line-a { width: 38%; left: 19%; top: 35%; transform: rotate(23deg); }.line-b { width: 35%; left: 52%; top: 51%; transform: rotate(-29deg); }.line-c { width: 34%; left: 51%; top: 54%; transform: rotate(36deg); }.line-d { width: 35%; left: 20%; top: 71%; transform: rotate(-34deg); }

.section { padding: 100px 0; border-top: 1px solid var(--line); }
.section-index { font: 700 11px/1 ui-monospace, monospace; color: var(--orange-dark); }
.intro { display: grid; grid-template-columns: 70px 1.15fr .85fr; gap: 35px; align-items: start; }
h2 { margin: 0; max-width: 800px; font-size: clamp(38px, 5vw, 65px); font-weight: 590; letter-spacing: -.055em; line-height: 1.04; }
.section-copy { margin: 42px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.75; }
.section-heading { display: grid; grid-template-columns: 70px 1fr; gap: 35px; margin-bottom: 65px; }

.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service-card { min-height: 340px; padding: 35px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-card-featured { grid-row: span 2; min-height: 680px; background: var(--ink); color: var(--white); }
.card-number { color: var(--orange); font: 700 11px/1 ui-monospace, monospace; }
.service-card h3 { margin: 60px 0 22px; max-width: 480px; font-size: clamp(27px, 3vw, 42px); font-weight: 560; letter-spacing: -.04em; line-height: 1.08; }
.service-card:not(.service-card-featured) h3 { margin-top: 72px; }
.service-card p { max-width: 560px; color: #50605c; font-size: 16px; }
.service-card-featured p { color: #d8dfdc; font-size: 18px; }
.service-card ul { margin: 50px 0 0; padding: 0; list-style: none; }
.service-card li { padding: 13px 0; border-top: 1px solid rgba(255,255,255,.18); font-size: 14px; }

.process { border-top: 0; }
.process-steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.process-steps li { display: grid; grid-template-columns: 70px 1fr; gap: 35px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.process-steps > li > span { color: var(--orange-dark); font: 700 11px/1.8 ui-monospace, monospace; }
.process-steps div { display: grid; grid-template-columns: .75fr 1.25fr; gap: 40px; }
.process-steps h3 { margin: 0; font-size: 30px; font-weight: 570; letter-spacing: -.04em; }
.process-steps p { margin: 3px 0 0; max-width: 600px; color: #50605c; }

.profile { display: grid; grid-template-columns: 1.2fr .8fr; min-height: 560px; background: var(--ink); color: var(--white); }
.profile-copy, .profile-principle { padding: clamp(45px, 7vw, 100px); }
.kicker-light { color: #ff9777; }
.profile h2 { max-width: 650px; }
.profile-copy > p:last-child { max-width: 680px; margin: 45px 0 0; color: #ced9d5; font-size: 18px; line-height: 1.75; }
.profile-principle { display: flex; flex-direction: column; justify-content: flex-end; border-left: 1px solid rgba(255,255,255,.16); background: var(--ink-soft); }
.profile-principle > p:last-child { margin: 0; font-family: Georgia, serif; font-size: clamp(27px, 3vw, 41px); line-height: 1.27; }

.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8vw; align-items: start; }
.contact-heading > h2 + p { max-width: 630px; margin-top: 34px; color: #50605c; font-size: 18px; }
.direct-contact { margin-top: 50px; padding-top: 25px; border-top: 1px solid var(--line); }
.direct-contact > * { display: block; }
.contact-name { margin: 0 0 25px; font-size: 23px; font-weight: 700; }
.direct-contact > a { margin: 9px 0; text-underline-offset: 5px; }
.direct-contact address { margin: 25px 0; font-style: normal; }
.contact-form { position: relative; padding: 36px; background: var(--white); border: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-form label { display: block; margin-bottom: 22px; font-size: 13px; font-weight: 720; }
.contact-form input:not([type="checkbox"]), .contact-form textarea { display: block; width: 100%; margin-top: 8px; border: 1px solid #aeb8b4; border-radius: 0; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.contact-form input:not([type="checkbox"]) { height: 48px; padding: 0 12px; }
.contact-form textarea { min-height: 155px; padding: 11px 12px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid rgba(240,100,59,.35); border-color: var(--orange-dark); }
.privacy-check { display: grid !important; grid-template-columns: 19px 1fr; align-items: start; gap: 10px; font-weight: 500 !important; line-height: 1.5; }
.privacy-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--orange-dark); }
.privacy-check a { text-underline-offset: 4px; }
.form-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.button-dark { margin-top: 30px; background: var(--ink); color: var(--white); }
.button-dark:hover { background: var(--orange); color: var(--ink); }
.contact-form .button-dark { border: 0; cursor: pointer; }
.form-note { margin: 16px 0 0; color: #67746f; font-size: 11px; }

footer { padding: 45px 0 35px; border-top: 1px solid var(--line); }
.brand-footer { margin-bottom: 16px; }
footer > p { color: #50605c; }
.footer-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--line); color: #67746f; font-size: 11px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { text-underline-offset: 4px; }

.legal-header { background: var(--ink); color: var(--white); }
.legal-header .site-header { border-color: rgba(255,255,255,.16); }
.legal-header .nav-cta { border-color: var(--white); }
.legal-header .nav-cta:hover { background: var(--white); color: var(--ink); }
.legal-page { width: min(calc(100% - 48px), 900px); margin: 0 auto; padding: 85px 0 120px; }
.legal-page h1 { max-width: none; margin-bottom: 30px; font-size: clamp(50px, 7vw, 82px); }
.legal-page h2 { margin: 65px 0 20px; font-size: clamp(28px, 4vw, 42px); }
.legal-page h3 { margin: 34px 0 10px; font-size: 20px; }
.legal-page p, .legal-page li, .legal-page address { max-width: 760px; color: #43534f; font-size: 16px; }
.legal-page address { font-style: normal; }
.legal-page a { text-underline-offset: 4px; }
.legal-page ul { padding-left: 22px; }
.legal-page li { margin: 8px 0; }
.legal-intro { max-width: 740px; font-size: 19px !important; line-height: 1.7; }
.legal-draft { margin: 42px 0 55px; padding: 20px 23px; border-left: 4px solid var(--orange); background: var(--paper-deep); }
.legal-draft p { margin: 0; font-size: 14px; }
.legal-block { padding: 1px 0 42px; border-bottom: 1px solid var(--line); }
.legal-meta { margin-top: 70px; padding-top: 20px; border-top: 1px solid var(--line); color: #687571 !important; font-size: 12px !important; }

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .system-map { width: min(100%, 540px); margin: 35px auto 0; }
  .intro { grid-template-columns: 45px 1fr; }
  .section-copy { grid-column: 2; margin-top: 0; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card-featured { grid-row: auto; min-height: auto; }
  .profile, .contact { grid-template-columns: 1fr; }
  .profile-principle { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); }
}

@media (max-width: 650px) {
  .site-header, .hero, .section, footer { width: min(calc(100% - 30px), var(--max)); }
  .site-header { align-items: flex-start; gap: 12px; padding: 20px 0; }
  .heritage-logo { width: 165px; }
  nav { justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; max-width: 180px; font-size: 12px; }
  nav a:nth-child(3) { display: none; }
  .nav-cta { padding: 7px 12px; }
  .hero { padding: 62px 0 48px; }
  h1 { font-size: clamp(45px, 14vw, 66px); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .system-map { margin-top: 25px; }
  .map-node { min-width: 78px; padding: 7px 8px; font-size: 9px; }
  .section { padding: 70px 0; }
  .intro, .section-heading, .process-steps li { grid-template-columns: 30px 1fr; gap: 17px; }
  .section-heading { margin-bottom: 42px; }
  .section-copy { font-size: 16px; }
  .service-card { min-height: 0; padding: 28px 24px 35px; }
  .service-card h3, .service-card:not(.service-card-featured) h3 { margin-top: 35px; }
  .process-steps div { grid-template-columns: 1fr; gap: 8px; }
  .process-steps h3 { font-size: 25px; }
  .profile { width: 100%; }
  .profile-copy, .profile-principle { padding: 55px 25px; }
  .contact { gap: 45px; }
  .contact-form { padding: 27px 23px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-meta { flex-direction: column; gap: 7px; }
  .legal-page { width: min(calc(100% - 30px), 900px); padding: 60px 0 85px; }
  .legal-page h2 { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
