/* HeritEdge Inc — shared stylesheet */
:root {
  --bg: #f7f9fc;
  --band: #edf2fa;
  --band-deep: #e3eaf7;
  --surface: #ffffff;
  --text: #14243b;
  --muted: #4a5a72;
  --soft: #6b7a90;
  --accent: #244ed8;
  --accent-dark: #1b3cad;
  --line: #d8e0ee;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --space: 1.5rem;
  --radius: 12px;
  --shadow: 0 2px 4px rgba(20, 36, 59, 0.04), 0 10px 28px rgba(20, 36, 59, 0.07);
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--text); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 242, 250, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-inc { font-weight: 500; color: var(--soft); font-size: .95rem; margin-left: .15rem; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-list { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  color: var(--text); text-decoration: none; font-size: .925rem; font-weight: 500;
  padding: .35rem 0; border-bottom: 1.5px solid transparent; white-space: nowrap;
}
.nav-list a:hover { color: var(--accent); }
.nav-list a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.menu-toggle {
  display: none; align-items: center; gap: .5rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .9rem; font-weight: 600; padding: .5rem .85rem; cursor: pointer;
}
.menu-toggle-bars { width: 18px; height: 12px; position: relative; }
.menu-toggle-bars::before, .menu-toggle-bars::after, .menu-toggle-bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s;
}
.menu-toggle-bars::before { top: 0; }
.menu-toggle-bars span { top: 5px; }
.menu-toggle-bars::after { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .75rem 1.3rem; border-radius: 8px; border: 1.5px solid var(--accent);
  transition: background .2s, border-color .2s, color .2s; line-height: 1.3; text-align: center;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: rgba(36, 78, 216, .07); color: var(--accent-dark); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-weight: 600; font-size: .95rem;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.text-link:hover { color: var(--accent-dark); }
.text-link .arrow { transition: transform .2s; }
.text-link:hover .arrow { transform: translateX(3px); }

/* ---------- Typography helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2, .h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.section-head p { margin-top: 1rem; color: var(--muted); font-size: 1.1rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 640px; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--band); overflow: hidden; padding: clamp(4rem, 9vw, 7rem) 0 clamp(5rem, 9vw, 7.5rem); }
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.7rem); font-weight: 800; line-height: 1.08; text-transform: uppercase;
  letter-spacing: -0.005em; max-width: 13.5em; margin-bottom: 1.6rem;
}
.hero .lead { color: #2b3b55; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-art svg { position: absolute; }
.art-rings { width: 520px; height: 520px; right: -150px; top: 30px; }
.art-rings-left { width: 300px; height: 300px; left: -200px; top: 46%; }
.art-quarter { width: 46px; height: 46px; right: 26%; top: 17%; }
.art-circle { width: 48px; height: 48px; right: 16%; top: 20%; }
.art-tri { width: 50px; height: 46px; right: 21%; top: 46%; }
.art-dot { width: 24px; height: 24px; left: calc(var(--gutter) * 0.55); top: 52%; }
.art-arch { width: 120px; height: 120px; right: 28%; bottom: -10px; }

/* inner page hero */
.page-hero { position: relative; background: var(--band); overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; text-transform: uppercase; line-height: 1.1; max-width: 16em; margin-bottom: 1.25rem; }
.page-hero .lead { color: #2b3b55; }
.page-hero .hero-actions { margin-top: 2rem; }
.page-hero .art-rings { width: 420px; height: 420px; right: -170px; top: -40px; }
.page-hero .art-tri { right: 12%; top: auto; bottom: 18%; }
.page-hero .art-circle { right: 22%; top: 18%; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1.75rem; padding: 0; font-size: .875rem; color: var(--soft); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: #a3afc2; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text); font-weight: 600; }

/* ---------- Service navigation (home) ---------- */
.service-nav { background: linear-gradient(to bottom, var(--band) 0, var(--band) 210px, var(--bg) 210px); padding-bottom: clamp(3rem, 6vw, 5rem); }
.service-nav-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.service-nav-head h2 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.service-nav-head p { color: var(--muted); max-width: 620px; font-size: 1rem; margin-top: .4rem; }
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(216, 224, 238, .7); padding: 1.75rem 1.75rem 1.6rem; display: flex; flex-direction: column;
}
.card-icon { width: 54px; height: 54px; color: var(--text); margin-bottom: 1.4rem; }
.card h3 { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; margin-bottom: .7rem; letter-spacing: 0; }
.card p { color: var(--muted); font-size: .97rem; }
.card .card-benefit { margin-top: .75rem; color: var(--text); font-size: .93rem; padding-left: .85rem; border-left: 2px solid var(--accent); }
.card .text-link { margin-top: auto; padding-top: 1.4rem; align-self: flex-start; }

/* ---------- Story rows (problem / solution) ---------- */
.stories { display: grid; gap: 1.75rem; }
.story {
  display: grid; grid-template-columns: 300px minmax(0, .85fr) minmax(0, 1.15fr); align-items: stretch;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid rgba(216, 224, 238, .7);
}
.story-visual { background: linear-gradient(160deg, #e9eef7 0%, #d5deed 100%); display: grid; place-items: center; min-height: 220px; color: var(--text); position: relative; }
.story-visual svg.illus { width: 62%; max-width: 180px; height: auto; position: relative; z-index: 1; }
.story-visual::after { content: ""; position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(36, 78, 216, .22); }
.story-label { padding: 2rem 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.story-label h3 { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; margin-bottom: .6rem; letter-spacing: 0; }
.story-label p { color: var(--muted); font-size: .97rem; }
.story-answer { padding: 2rem 2.25rem; background: #f2f5fb; display: flex; flex-direction: column; justify-content: center; }
.story-answer h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: .7rem; }
.story-answer p { color: var(--muted); font-size: .97rem; }
.story-answer .text-link { margin-top: 1rem; align-self: flex-start; }
.story:nth-child(even) { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) 300px; }
.story:nth-child(even) .story-visual { order: 3; }
.story:nth-child(even) .story-label { order: 1; }
.story:nth-child(even) .story-answer { order: 2; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { position: relative; padding-top: 4.25rem; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; width: 50px; height: 50px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: .95rem; background: var(--bg);
}
.steps li::after { content: ""; position: absolute; top: 25px; left: 62px; right: -12px; height: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .5rem; }
.steps p { color: var(--muted); font-size: .97rem; }
.steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.band { background: var(--band); }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(216, 224, 238, .7); padding: clamp(1.5rem, 3vw, 2.25rem); }
.facts { margin: 0; display: grid; gap: 1.25rem; }
.facts div { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: .3rem; }
.facts dd { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.facts dd a { color: var(--accent); }
.facts address { font-style: normal; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--muted); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--accent); }
.check-list li::after { content: ""; position: absolute; left: 5px; top: calc(.45em + 5px); width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.check-list strong { color: var(--text); }

.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.tile { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.6rem; }
.tile h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: .5rem; }
.tile p { color: var(--muted); font-size: .97rem; }
.tile-mark { width: 34px; height: 34px; margin-bottom: 1rem; color: var(--accent); }

/* service overview rows */
.service-rows { display: grid; gap: 1.75rem; }
.service-row { display: grid; grid-template-columns: 340px minmax(0, 1fr); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(216, 224, 238, .7); }
.service-row:nth-child(even) { grid-template-columns: minmax(0, 1fr) 340px; }
.service-row:nth-child(even) .story-visual { order: 2; }
.service-row-body { padding: clamp(1.75rem, 3.5vw, 2.75rem); }
.service-row-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 700; text-transform: uppercase; margin-bottom: .9rem; letter-spacing: 0; }
.service-row-body > p { color: var(--muted); }
.service-row-body .check-list { margin: 1.4rem 0 1.6rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; }

/* ---------- Contact ---------- */
.contact-section { background: var(--band); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact-grid h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 700; text-transform: uppercase; margin-bottom: 1rem; }
.contact-grid > div > p { color: var(--muted); max-width: 560px; }
.topic-list { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.topic-list a {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.topic-list a:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(36, 78, 216, .1); }
.topic-list a span:last-child { color: var(--accent); flex: none; }
.contact-note { margin-top: 1rem; font-size: .9rem; color: var(--soft); }
.email-big { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; overflow-wrap: anywhere; }

/* CTA band */
.cta { background: var(--text); color: #fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.25rem); display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; text-transform: uppercase; max-width: 22em; letter-spacing: 0; }
.cta p { color: #c9d3e5; margin-top: .6rem; max-width: 560px; }
.cta .btn { background: #fff; color: var(--text); border-color: #fff; }
.cta .btn:hover { background: #e4eafb; border-color: #e4eafb; }
.cta svg.cta-rings { position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; opacity: .25; pointer-events: none; }
.cta > div, .cta > a { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-grid h2 { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid a { color: var(--text); text-decoration: none; font-size: .95rem; }
.footer-grid a:hover { color: var(--accent); text-decoration: underline; }
.footer-grid p, .footer-grid address { color: var(--muted); font-size: .95rem; font-style: normal; }
.footer-brand p { margin-top: 1rem; max-width: 320px; }
.footer-bottom { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font-size: .875rem; color: var(--soft); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-list { gap: 1rem; }
  .nav-list a { font-size: .875rem; }
  .story { grid-template-columns: 240px minmax(0, .9fr) minmax(0, 1.1fr); }
  .story:nth-child(even) { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) 240px; }
}
@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(20, 36, 59, .08);
    flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem var(--gutter) 1.5rem;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a { display: block; padding: .85rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); padding-left: .85rem; }
  .cards-3 { grid-template-columns: 1fr; }
  .service-nav { background: linear-gradient(to bottom, var(--band) 0, var(--band) 160px, var(--bg) 160px); }
  .story, .story:nth-child(even) { grid-template-columns: 1fr; }
  .story:nth-child(even) .story-visual { order: 0; }
  .story-visual { min-height: 200px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.25rem; }
  .steps li::after { display: none; }
  .split, .split-wide, .contact-grid { grid-template-columns: 1fr; }
  .service-row, .service-row:nth-child(even) { grid-template-columns: 1fr; }
  .service-row:nth-child(even) .story-visual { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .art-quarter, .art-tri, .art-arch { opacity: .45; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-inner { min-height: 64px; }
  .brand { font-size: 1.25rem; }
  .brand-inc { display: none; }
  .art-rings { width: 300px; height: 300px; right: -170px; top: auto; bottom: -60px; opacity: .6; }
  .page-hero .art-rings { width: 260px; height: 260px; right: -150px; top: -50px; }
  .art-rings-left, .art-quarter, .art-arch, .art-dot { display: none; }
  .art-circle { right: 6%; top: 5%; width: 34px; height: 34px; }
  .art-tri { right: 8%; top: auto; bottom: 6%; width: 34px; height: 32px; }
  .hero-actions .btn { width: 100%; }
  .topic-list { grid-template-columns: 1fr; }
  .steps, .steps-3, .tile-grid { grid-template-columns: 1fr; }
  .story-label, .story-answer { padding: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
