/* X24 Digital site styles.
   Colours and type follow the X24 Digital brand style guide v1.0 (brand/x24-brand-style-guide.pdf):
   Electric Azure #0B62AC (primary), Emerald Green #1CB06F (accent and motion), Midnight Slate #0A101D (dark UI and
   text), Canvas White #FFFFFF. Roboto throughout. The logo always sits on white (the light-mode lockup). */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/roboto-latin.woff2") format("woff2");
}

:root {
  --azure: #0B62AC;
  --azure-hover: #084f8c;
  --emerald: #1CB06F;
  --emerald-ink: #0d7a4a;     /* emerald dark enough for text on white */
  --slate: #0A101D;
  --slate-2: #111a2c;
  --slate-3: #1b263b;
  --white: #FFFFFF;

  --on-dark: #ffffff;
  --on-dark-muted: #a9b4c6;
  --on-dark-line: rgba(169, 180, 198, 0.2);
  --azure-bright: #3b93ea;    /* azure and emerald as they appear in the dark-mode lockup */
  --emerald-bright: #2fd195;

  --text: #0A101D;
  --muted: #4a5568;
  --line: #e2e8f0;
  --bg: #ffffff;
  --surface-2: #f5f7fa;
  --tint-azure: #eaf2fa;
  --tint-emerald: #e6f6ee;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(10, 16, 29, 0.05), 0 8px 24px rgba(10, 16, 29, 0.06);
  --wrap: 1160px;
  --gutter: 24px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::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;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azure); text-underline-offset: 3px; }
a:hover { color: var(--azure-hover); }
:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 780px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--slate); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 8px; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border: 2px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--azure); color: #fff; }
.btn-primary:hover { background: var(--azure-hover); color: #fff; }
.btn-accent { background: var(--emerald); color: var(--slate); }
.btn-accent:hover { background: var(--emerald-bright); color: var(--slate); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-outline { border-color: var(--azure); color: var(--azure); }
.btn-outline:hover { background: var(--tint-azure); }
.btn-small { padding: 9px 18px; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link::after { content: " \2192"; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; }
.brand img { width: 150px; height: auto; }
.brand-slogan {
  border-left: 2px solid var(--emerald); padding: 2px 0 2px 16px; max-width: 14em;
  color: var(--azure); font-weight: 600; font-size: 0.78rem; line-height: 1.35; letter-spacing: 0.08em; text-transform: uppercase;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: var(--text); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { color: var(--azure); }
.site-nav ul a[aria-current="page"] { color: var(--azure); border-bottom-color: var(--emerald); }
.nav-toggle { display: none; }

@media (max-width: 1100px) {
  .header-inner { min-height: 72px; flex-wrap: wrap; }
  .brand img { width: 140px; }
  .site-nav { width: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 0 0 16px; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav ul a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--emerald); padding-left: 12px; }
  /* With JavaScript the menu folds behind a button; without it, the links simply show. */
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--line);
    border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 500; color: var(--text); cursor: pointer;
  }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: flex; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: "";
  }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
}

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--surface-2); }
.section-dark { background: var(--slate); color: var(--on-dark); }
.section-dark p { color: var(--on-dark-muted); }
.section-dark a:not(.btn) { color: var(--emerald-bright); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--emerald-ink); margin-bottom: 14px;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--emerald-bright); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.12rem; }
.section-dark .section-head p { color: var(--on-dark-muted); }
.lead { font-size: 1.2rem; color: var(--muted); }
.placeholder { background: #fff4cc; color: #6b4e00; padding: 0 4px; border-radius: 3px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--slate); color: var(--on-dark);
  padding: 96px 0 104px;
}
.hero::before { /* faint grid, like an engineering drawing */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--on-dark-line) 1px, transparent 1px), linear-gradient(90deg, var(--on-dark-line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: 0.35;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
.hero::after { /* emerald rule along the bottom, as in the style guide header */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--emerald);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--emerald-bright); }
.hero .lead { color: var(--on-dark-muted); max-width: 560px; margin-bottom: 32px; }
.hero-diagram { width: 100%; height: auto; }
.page-hero { background: var(--slate); color: var(--on-dark); padding: 80px 0 72px; position: relative; }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--emerald); }
.page-hero h1 { color: #fff; max-width: 820px; }
.page-hero .lead { color: var(--on-dark-muted); max-width: 720px; margin: 0; }

@media (max-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 72px 0; }
  .page-hero { padding: 56px 0 52px; }
}

/* diagram */
.dg-line { stroke: rgba(169, 180, 198, 0.35); stroke-width: 1.5; fill: none; }
.dg-flow { stroke: var(--emerald-bright); stroke-width: 2; fill: none; stroke-dasharray: 4 14; animation: flow 2.4s linear infinite; }
.dg-node { fill: var(--slate-2); stroke: rgba(169, 180, 198, 0.45); stroke-width: 1.2; }
.dg-node-core { fill: var(--azure); stroke: var(--azure-bright); }
.dg-label { fill: #fff; font-family: var(--font); font-size: 15px; font-weight: 700; text-anchor: middle; }
.dg-sub { fill: var(--on-dark-muted); font-family: var(--font); font-size: 11.5px; text-anchor: middle; letter-spacing: 0.02em; }
.dg-dot { fill: var(--emerald-bright); }
@keyframes flow { to { stroke-dashoffset: -36; } }
@media (prefers-reduced-motion: reduce) {
  .dg-flow { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- cards and grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card p { color: var(--muted); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .arrow-link { margin-top: auto; padding-top: 8px; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--tint-azure); color: var(--azure);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-icon.green { background: var(--tint-emerald); color: var(--emerald-ink); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 7px;
  border-left: 2px solid var(--emerald); border-bottom: 2px solid var(--emerald); transform: rotate(-45deg);
}
.section-dark .ticks li { color: var(--on-dark-muted); }

.industry-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.industry-list li {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 500;
}

.principles { counter-reset: p; }
.principle { border-top: 3px solid var(--emerald); padding-top: 20px; }
.principle p { color: var(--muted); margin: 0; }
.section-dark .principle { border-top-color: var(--emerald-bright); }
.section-dark .principle p { color: var(--on-dark-muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { position: relative; padding-top: 56px; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0;
  font-size: 1.9rem; font-weight: 700; color: var(--azure); letter-spacing: -0.02em;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 901px) { .steps-5 { grid-template-columns: repeat(5, 1fr); gap: 20px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* service detail rows */
.service { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.service:first-child { border-top: 0; padding-top: 0; }
.service h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.service .intro { color: var(--muted); }
.service-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.service-cols h3 { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--emerald-ink); }
@media (max-width: 860px) { .service, .service-cols { grid-template-columns: 1fr; gap: 20px; } }

/* product band */
.product-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.module-list { display: grid; gap: 14px; }
.module {
  background: var(--slate-2); border: 1px solid var(--on-dark-line); border-radius: var(--radius); padding: 18px 20px;
}
.module strong { color: #fff; display: block; margin-bottom: 2px; }
.module span { color: var(--on-dark-muted); font-size: 0.98rem; }
@media (max-width: 900px) { .product-band { grid-template-columns: 1fr; } }

.offer { border-radius: var(--radius-lg); padding: 34px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.offer.featured { border: 2px solid var(--azure); }
.offer .label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--azure); }
.offer .btn-row { margin-top: auto; padding-top: 12px; }

/* founder */
.founder { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.founder-card { background: var(--slate); color: #fff; border-radius: var(--radius-lg); padding: 32px; position: sticky; top: 110px; }
.founder-card .avatar { width: 112px; height: 112px; font-size: 2.3rem; margin-bottom: 20px; }
.founder-card .avatar-photo { width: 160px; height: 160px; background: none; border: 3px solid var(--emerald); }
.founder-card .name { font-size: 1.4rem; font-weight: 700; margin: 0; }
.founder-card .role { color: var(--on-dark-muted); margin: 4px 0 20px; }
.founder-card .facts { list-style: none; padding: 0; margin: 0 0 24px; border-top: 1px solid var(--on-dark-line); }
.founder-card .facts li { padding: 10px 0; border-bottom: 1px solid var(--on-dark-line); font-size: 0.95rem; color: var(--on-dark-muted); }
.founder-card .facts strong { color: #fff; display: block; font-weight: 600; }
.btn-linkedin { width: 100%; }
.btn-linkedin svg { width: 18px; height: 18px; fill: currentColor; }
.founder-body .lead { margin-bottom: 1.4em; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 2em; }
.skills li { background: var(--tint-azure); color: var(--azure); border-radius: 999px; padding: 6px 14px; font-size: 0.93rem; font-weight: 500; }
@media (max-width: 900px) {
  .founder { grid-template-columns: 1fr; gap: 32px; }
  .founder-card { position: static; }
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--azure), var(--emerald)); color: #fff; font-weight: 700; font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.founder-strip { display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.founder-strip .who { display: flex; gap: 20px; align-items: center; max-width: 760px; }
.founder-strip .avatar { width: 76px; height: 76px; font-size: 1.5rem; }
.founder-strip p { margin: 0; }

/* ---------- insights ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card a {
  display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  border-top: 4px solid var(--azure); transition: transform .15s, box-shadow .15s;
}
.post-card a:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(10,16,29,.06), 0 14px 32px rgba(10,16,29,.1); }
.post-card h3 { color: var(--text); }
.post-card p { color: var(--muted); }
.post-card .post-date { margin: auto 0 0; font-size: 0.9rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; background: var(--tint-emerald); color: var(--emerald-ink); padding: 4px 10px; border-radius: 999px; }
.tag-draft { background: #fff4cc; color: #6b4e00; }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 32px; background: #fff; color: var(--muted); }
.empty-state p { margin: 0; }

.article-head { background: var(--surface-2); padding: 64px 0 44px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.crumbs { margin-bottom: 18px; font-weight: 600; }
.crumbs a { text-decoration: none; }
.crumbs a::before { content: "\2190  "; }
.article-meta { color: var(--muted); font-size: 0.98rem; margin-bottom: 14px; }
.prose { padding-top: 48px; padding-bottom: 24px; font-size: 1.1rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--emerald); color: var(--muted); font-size: 1.15rem; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 1rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.draft-note { background: #fff4cc; color: #6b4e00; padding: 12px 16px; border-radius: 8px; font-size: 0.98rem; }
.article-foot { padding-bottom: 80px; }
.author-box { display: flex; gap: 18px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; margin: 24px 0; }
.author-box p { margin: 0; }
.author-name { font-weight: 700; }
.author-role { color: var(--muted); font-size: 0.95rem; }
.author-links { font-size: 0.95rem; margin-top: 4px !important; }
.back-link { font-weight: 600; text-decoration: none; }
.back-link::before { content: "\2190  "; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.contact-email { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; word-break: break-word; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- closing band and footer ---------- */
.cta-band { background: linear-gradient(120deg, var(--azure) 0%, #0a4f8d 100%); color: #fff; padding: 72px 0; }
.cta-band .inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0; max-width: 620px; }

.site-footer { background: var(--slate); color: var(--on-dark-muted); padding: 64px 0 28px; font-size: 0.96rem; border-top: 5px solid var(--emerald); }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--emerald-bright); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand img { width: 48px; height: 48px; margin-bottom: 14px; border-radius: 8px; }
.footer-name { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.footer-head { color: #fff; font-weight: 700; margin-bottom: 12px; }
.footer-legal { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--on-dark-line); margin-top: 44px; padding-top: 22px; font-size: 0.88rem; }
.footer-legal p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.section-tight-link, .feed-note { margin: 32px 0 0; }
.feed-note { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 560px) { .dg-sub { display: none; } .dg-label { font-size: 17px; } }

/* ModelWeave problem cards (templates/problems.html) */
.problem {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--emerald); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.problem h3 { font-size: 1.12rem; }
.problem p { color: var(--muted); font-size: 0.98rem; }
.problem .fix { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--azure); font-weight: 600; font-size: 0.95rem; }
.problem .fix span { display: block; color: var(--muted); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.problem-answer {
  margin-top: 32px; display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--tint-azure); border-radius: var(--radius-lg); padding: 28px 32px;
}
.problem-answer p { margin: 0; max-width: 720px; color: var(--text); }
.hero-actions { margin-top: 28px; }
.dg-halo { fill: none; stroke: var(--emerald-bright); stroke-width: 1.5; stroke-dasharray: 3 6; opacity: 0.7; }
.dg-label-core { font-size: 21px; }
.dg-sub-core { fill: #dbe8f7; font-size: 12.5px; }

/* hero tagline and the ModelWeave link in the intro */
.hero-tagline { color: #fff; font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 700; letter-spacing: 0.01em; margin: 0 0 14px; }
.hero .lead a.mw-link {
  color: var(--emerald-bright); font-weight: 700; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: rgba(47, 209, 149, 0.45);
}
.hero .lead a.mw-link:hover { color: #fff; text-decoration-color: var(--emerald-bright); }

@media (max-width: 560px) {
  .brand { gap: 12px; }
  .brand img { width: 118px; }
  .brand-slogan { font-size: 0.66rem; padding-left: 10px; max-width: 112px; letter-spacing: 0.06em; }
  .js .nav-toggle { padding: 10px 12px; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 1100px) { .header-inner { padding-top: 10px; padding-bottom: 10px; } }

/* strategic diagram (home hero) and the ModelWeave diagram section */
.dg-outcome { fill: rgba(47, 209, 149, 0.12); stroke: var(--emerald-bright); stroke-width: 1.5; }
.dg-strategy { fill: rgba(59, 147, 234, 0.12); stroke: rgba(59, 147, 234, 0.6); }
.mw-diagram { width: 100%; height: auto; }
.dg-pill { font-size: 14px; }

/* subdued SAP line under the hero intro */
.hero .lead:has(+ .hero-sub) { margin-bottom: 18px; }
.hero-sub {
  max-width: 560px; margin: 0 0 30px; padding-left: 14px; border-left: 2px solid var(--azure-bright);
  color: #8794a8; font-size: 0.98rem; line-height: 1.6;
}
.hero-sub a { color: var(--azure-bright); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hero-sub a::after { content: " \2192"; }
.hero-sub a:hover { color: #fff; }

/* ModelWeave operating model (home hero) */
.dg-heading { fill: var(--emerald-bright); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; text-anchor: middle; }
.dg-left { text-anchor: start; }
.dg-green { fill: var(--emerald-bright); }
.dg-num { fill: var(--emerald-bright); }
.dg-num-text { fill: var(--slate); font-family: var(--font); font-size: 14px; font-weight: 700; text-anchor: middle; }
.dg-card { fill: var(--slate); stroke: rgba(169, 180, 198, 0.35); stroke-width: 1.2; }
.dg-card-label { fill: #fff; font-family: var(--font); font-size: 13px; font-weight: 700; text-anchor: middle; }
.dg-dispatch { fill: var(--azure); stroke: var(--azure-bright); stroke-width: 1.5; }
.dg-dispatch-label { fill: #fff; font-family: var(--font); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-anchor: middle; }
@media (max-width: 560px) { .dg-card-label { font-size: 15px; } .dg-dispatch-label { font-size: 15px; letter-spacing: 0.04em; } }

/* hero: the diagram starts level with the eyebrow, not centred against the text */
@media (min-width: 901px) {
  .hero-grid { align-items: start; }
  .hero-diagram { margin-top: 4px; }
}

/* menu dropdowns (Products, Services) */
.site-nav ul a.active { color: var(--azure); border-bottom-color: var(--emerald); }
.has-sub { position: relative; }
.has-sub > a::after { content: ""; display: inline-block; margin-left: 7px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: 0.7; }
.sub-menu {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 10px); left: -14px; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--emerald); border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 60;
}
.sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* keeps the menu open while the pointer moves down */
.has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { display: block; padding: 9px 12px; border-radius: 6px; border-bottom: 0; white-space: nowrap; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu a[aria-current="page"] { background: var(--tint-azure); color: var(--azure); }
.featured-service { display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.featured-service h2 { margin-bottom: 8px; }
.featured-service p { color: var(--muted); max-width: 720px; margin: 0; }
.product-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.product-tagline { color: var(--emerald-ink); font-weight: 600; font-size: 1.1rem; margin-top: -6px; }
.product-modules .module { background: var(--slate); }
@media (max-width: 900px) { .product-feature { grid-template-columns: 1fr; } }
@media (max-width: 1100px) {
  .has-sub > a::after { display: none; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; min-width: 0; padding: 0 0 0 16px; border: 0; box-shadow: none; background: none; border-radius: 0; }
  .sub-menu::before { display: none; }
  .site-nav .sub-menu a { padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--muted); }
  .site-nav .sub-menu a:hover, .site-nav .sub-menu a[aria-current="page"] { background: none; }
}
.site-nav .sub-menu { display: block; }
@media (max-width: 1100px) { .site-nav ul a.active { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--emerald); padding-left: 12px; } }
@media (max-width: 1100px) { .site-nav .sub-menu { padding: 0 0 0 18px; } .site-nav .sub-menu a { font-size: 0.97rem; } }

/* footer: brand, then Products, Services and Company, matching the menu */
.footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.footer-head a { color: #fff; }
.footer-contact { margin-top: 14px; }
.footer-legal-links { display: flex; gap: 20px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* a second, quieter paragraph under a page headline */
.page-hero .lead + .lead-second { margin-top: 16px; font-size: 1.02rem; color: #8794a8; }
.page-hero .lead-second a { color: var(--azure-bright); }

/* Products: visual value section */
.value-flow { display: grid; grid-template-columns: 1fr 60px 2.2fr; gap: 24px; align-items: center; margin-bottom: 72px; }
.value-chips { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.value-chips li { background: var(--slate); color: #fff; border-radius: 10px; padding: 14px 18px; font-weight: 600; border-left: 4px solid var(--emerald); }
.value-arrow { height: 2px; background: var(--emerald); position: relative; }
.value-arrow::after { content: ""; position: absolute; right: -2px; top: -6px; border-left: 12px solid var(--emerald); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.outcome-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.outcome-grid li { background: var(--tint-azure); border-radius: 12px; padding: 18px 12px; text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--slate); }
.outcome-grid svg { display: block; width: 30px; height: 30px; margin: 0 auto 10px; stroke: var(--azure); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.value-head { margin-bottom: 28px; }
.benefit-steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: b; }
.benefit-steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 20px 64px; box-shadow: var(--shadow); }
.benefit-steps li::before { counter-increment: b; content: counter(b); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--emerald); color: var(--slate); font-weight: 700; display: grid; place-items: center; }
.benefit-steps strong { display: block; }
.benefit-steps span { color: var(--muted); font-size: 0.95rem; }
.value-card { border-radius: var(--radius-lg); padding: 28px; }
.value-card h3 { margin-bottom: 12px; }
.value-card.cash { background: var(--tint-emerald); border: 1px solid #bfe6d2; }
.value-card.ops { background: var(--surface-2); border: 1px solid var(--line); }
.value-card.ops p { color: var(--muted); margin: 0; }
.stat-callout { margin-top: 48px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--slate); color: #fff; border-radius: var(--radius-lg); padding: 28px 32px; }
.stat-figure { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; color: var(--emerald-bright); letter-spacing: -0.02em; }
.stat-text { margin: 0; color: var(--on-dark-muted); }
.stat-text a { color: var(--azure-bright); }
@media (max-width: 1000px) {
  .value-flow { grid-template-columns: 1fr; }
  .value-arrow { width: 2px; height: 36px; margin: 0 auto; }
  .value-arrow::after { right: -6px; top: auto; bottom: -2px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 12px solid var(--emerald); border-bottom: 0; }
  .outcome-grid { grid-template-columns: repeat(3, 1fr); }
  .benefit-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .outcome-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-callout { grid-template-columns: 1fr; gap: 8px; }
}
.value-note { margin: 32px 0 0; color: var(--muted); font-size: 1.05rem; border-left: 3px solid var(--emerald); padding-left: 14px; }

/* Products page: brand colour instead of dark boxes */
.product-modules .module {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--azure);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.product-modules .module strong { color: var(--azure); font-size: 1.05rem; }
.product-modules .module span { color: var(--muted); }
.product-modules .module:nth-child(2) { border-left-color: var(--emerald); background: linear-gradient(90deg, var(--tint-emerald), #fff 60%); }
.product-modules .module:nth-child(2) strong { color: var(--emerald-ink); }
.product-modules .module:nth-child(1) { background: linear-gradient(90deg, var(--tint-azure), #fff 60%); }
.product-modules .module:nth-child(3) { border-left-color: var(--azure-bright); background: linear-gradient(90deg, #e8f3fd, #fff 60%); }
.product-modules .module:nth-child(3) strong { color: #1f6fc2; }

.value-chips li { border-left: 0; box-shadow: var(--shadow); }
.value-chips li:nth-child(1) { background: var(--azure); color: #fff; }
.value-chips li:nth-child(2) { background: var(--emerald); color: var(--slate); }
.value-chips li:nth-child(3) { background: var(--tint-azure); color: var(--azure); border: 1px solid #c9dcf0; }

.outcome-grid li { border: 1px solid transparent; transition: transform .15s; }
.outcome-grid li:nth-child(odd) { background: var(--tint-azure); border-color: #cfe0f2; }
.outcome-grid li:nth-child(even) { background: var(--tint-emerald); border-color: #bfe6d2; }
.outcome-grid li:nth-child(even) svg { stroke: var(--emerald-ink); }
.outcome-grid li:hover { transform: translateY(-2px); }
.value-section.section-alt .outcome-grid li { box-shadow: 0 1px 2px rgba(10,16,29,.04); }
