/* ==========================================================================
   Marketing Codes — Homepage
   Brand system matched to marketingcodes.io:
     emerald green on white, display serif headlines with italic green accent,
     Inter body, mono micro-labels, dark navy band.
   ========================================================================== */

:root {
  --green: #16a34a;          /* brand green — light backgrounds (from logo-light-bg.svg) */
  --green-700: #15803d;      /* hover */
  --green-900: #14532d;      /* deep */
  --green-100: #ECFDF3;      /* mint tint */
  --green-200: #BBF0CF;      /* mint border */
  --green-bright: #4ade80;   /* brand green — dark backgrounds (from logo-dark-bg.svg) */
  --navy: #0B1526;           /* dark band */
  --navy-2: #121F33;

  --bg: #FFFFFF;
  --bg-alt: #F6F9F7;
  --surface: #FFFFFF;
  --line: #E6EAE7;
  --line-strong: #CFD6D1;
  --text: #0F172A;
  --muted: #5B6672;
  --muted-2: #8A94A0;

  --font-head: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --h1: clamp(2.9rem, 1.9rem + 4vw, 5.4rem);
  --h2: clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem);
  --h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --body: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --shadow: 0 10px 30px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg: 0 30px 60px rgba(15,23,42,.14);
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--body); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2 { font-family: var(--font-head); font-weight: 400; line-height: 1.02; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); max-width: 24ch; }
h1 em, h2 em { font-style: italic; color: var(--green); }
h3, h4 { font-family: var(--font-body); margin: 0; letter-spacing: -0.01em; }
h3 { font-size: var(--h3); font-weight: 700; line-height: 1.3; }
h4 { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); font-family: var(--font-mono); }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--green); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600; z-index: 100; }
.skip-link:focus { top: 12px; }

.mono, .eyebrow { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow { color: var(--green); margin-bottom: 16px; display: block; }
.link-arrow { font-weight: 600; font-size: 0.95rem; color: var(--green); display: inline-block; }
.link-arrow:hover { color: var(--green-700); text-decoration: underline; text-underline-offset: 4px; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--green-200); background: var(--green-100); color: var(--green); border-radius: 999px; font-size: 0.85rem; font-weight: 600; margin-bottom: 26px; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; line-height: 1; white-space: nowrap; border: 1px solid transparent; transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn-lg { padding: 16px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,.25); }
.btn-primary::after { content: "→"; font-weight: 500; transition: transform .18s var(--ease); }
.btn-primary:hover { background: var(--green-700); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(22,163,74,.3); }
.btn-primary:hover::after { transform: translateX(3px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: #fff; }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { color: var(--green); display: block; filter: drop-shadow(0 3px 8px rgba(22,163,74,.25)); }
.brand-glyph { stroke: #fff; }
.brand-name { font-family: "Plus Jakarta Sans", var(--font-body); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.3px; white-space: nowrap; }
.brand-name em { font-style: italic; color: var(--green); }

.primary-nav { margin-left: 24px; flex: 1; }
.nav-list { display: flex; gap: 2px; }
.nav-btn, .nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 13px; border-radius: 8px; font-size: 0.95rem; font-weight: 500; color: var(--text); }
.nav-btn:hover, .nav-link:hover, .nav-btn[aria-expanded="true"] { color: var(--green); background: var(--green-100); }
.chev { transition: transform .18s var(--ease); }
.nav-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.header-cta { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* Mega menu */
.has-mega { position: static; }
.mega { position: absolute; left: 0; right: 0; top: 76px; background: #fff; border-bottom: 1px solid var(--line); padding: 34px 0 38px; box-shadow: var(--shadow-lg); }
.mega[hidden] { display: none; }
.mega-grid { display: grid; gap: 44px; }
.mega-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mega-grid--2 { grid-template-columns: 1.2fr 1fr; }
.mega-head { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mega-col ul li a { display: block; padding: 9px 12px; margin-left: -12px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; color: var(--text); }
.mega-col ul li a span { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.mega-col ul li a:hover { background: var(--green-100); color: var(--green); }
.mega-feature { display: block; margin-top: 18px; padding: 20px; border: 1px solid var(--green-200); border-radius: var(--radius); background: var(--green-100); color: var(--text); }
.mega-feature .eyebrow { margin-bottom: 8px; }
.mega-feature strong { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 400; line-height: 1.1; margin-bottom: 8px; }
.mega-feature > span:not(.eyebrow):not(.link-arrow) { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.mega-feature:hover { border-color: var(--green); color: var(--text); box-shadow: var(--shadow); }
.mega-feature--accent { margin-top: 0; }

/* Mobile toggle + nav */
.menu-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; border-radius: 8px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text); transition: transform .2s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; max-height: calc(100vh - 76px); overflow: auto; padding: 12px 0 28px; }
.mobile-nav:not([hidden]) { display: block; }
.m-group summary, .m-link { display: block; padding: 14px 0; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.m-group summary::-webkit-details-marker { display: none; }
.m-group summary { list-style: none; position: relative; }
.m-group summary::after { content: "+"; position: absolute; right: 2px; top: 12px; color: var(--green); }
.m-group[open] summary::after { content: "–"; }
.m-group a { display: block; padding: 10px 0 10px 14px; color: var(--muted); }
.m-sub { padding: 14px 0 4px 14px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); }
.mobile-nav .btn { margin-top: 22px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(60px, 8vw, 120px) 0 clamp(52px, 6vw, 88px); background: radial-gradient(1200px 500px at 85% -10%, var(--green-100) 0%, rgba(230,244,238,0) 60%), #fff; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.hero h1 { max-width: 12ch; margin-bottom: 26px; }
.lead { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); color: var(--muted); max-width: 52ch; margin-bottom: 32px; line-height: 1.6; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero-points li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.92rem; }
.hero-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px 18px; box-shadow: var(--shadow); }
.panel-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.panel-top .mono { display: block; color: var(--muted-2); margin-bottom: 6px; }
.panel-title { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: var(--green); background: var(--green-100); padding: 5px 10px; border-radius: 999px; }
.surface-list li { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.surface-name { font-weight: 600; font-size: 0.92rem; }
.bar { height: 7px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--green-700), var(--green)); border-radius: 99px; transform-origin: left; animation: grow 1.1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tag { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); background: #fff; }
.tag-on { color: var(--green); border-color: var(--green-200); background: var(--green-100); }
.panel-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Platform strip ---------- */
.strip { padding: 30px 0; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.strip-label { text-align: center; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.strip-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
.strip-list li { font-weight: 700; color: var(--muted); font-size: 0.95rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(68px, 8vw, 120px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-intro { color: var(--muted); max-width: 60ch; margin-top: 18px; font-size: 1.08rem; }

.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.card:hover { border-color: var(--green-200); transform: translateY(-3px); box-shadow: var(--shadow); }
.card--accent { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 16px 36px rgba(22,163,74,.28); }
.card--accent h3 { color: #fff; }
.card.card--accent p { color: rgba(255,255,255,.9); }
.card--accent .card-icon { background: rgba(255,255,255,.16); color: #fff; }
.card--accent .card-links a { border-color: rgba(255,255,255,.4); color: #fff; background: rgba(255,255,255,.1); }
.card--accent .card-links a:hover { background: #fff; color: var(--green); border-color: #fff; }
.card--accent .link-arrow { color: #fff; }
.card--accent:hover { border-color: var(--green); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--green-100); color: var(--green); display: grid; place-items: center; }
.card p { color: var(--muted); }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; }
.card-links a { font-size: 0.82rem; font-weight: 500; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); background: #fff; }
.card-links a:hover { border-color: var(--green); color: var(--green); background: var(--green-100); }
.card .link-arrow { margin-top: auto; }

/* Dark band — approach */
.section--dark { background: var(--navy); color: #fff; }
.section--dark .eyebrow { color: var(--green-bright); }
.section--dark h2 em { color: var(--green-bright); }
.section--dark .approach-copy p { color: #B9C2CE; }
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.approach-copy p { color: var(--muted); margin: 18px 0; max-width: 54ch; }
.approach-copy .btn { margin-top: 10px; }
.steps { display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 24px; background: var(--navy-2); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); transition: border-color .2s var(--ease), background .2s var(--ease); }
.steps li:hover { border-color: rgba(74,222,128,.5); background: #15253D; }
.step-num { font-family: var(--font-mono); font-weight: 500; color: var(--green-bright); font-size: 0.95rem; letter-spacing: 0.08em; }
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; color: #fff; }
.steps p { color: #B9C2CE; font-size: 0.95rem; grid-column: 2; }
.steps li h3 { grid-column: 2; grid-row: 1; }
.steps li .step-num { grid-row: 1 / span 2; padding-top: 3px; }

/* Case / paper cards */
.case-meta { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.case { border-top: 4px solid var(--green); }
.case-stat { font-family: var(--font-head); font-size: 2.6rem; font-weight: 400; color: var(--green); letter-spacing: -0.02em; line-height: 1; }
.placeholder { border-style: dashed; }
.ph-badge { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; font-weight: 500; color: #8A5A00; background: #FFF4D6; border: 1px solid #F3D98B; padding: 4px 8px; border-radius: 6px; align-self: flex-start; }

.insight-list { display: grid; gap: 12px; }
.insight-list li a { display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: center; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow-sm); }
.insight-list li.placeholder a { border-style: dashed; box-shadow: none; }
.insight-list li a:hover { border-color: var(--green-200); box-shadow: var(--shadow); }
.insight-title { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.15; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(36px, 6vw, 88px); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; font-weight: 600; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; color: var(--green); background: var(--green-100); font-weight: 500; }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--muted); padding: 0 0 22px; max-width: 64ch; }

/* CTA / form */
.cta { background: linear-gradient(180deg, #fff 0%, var(--green-100) 100%); border-top: 1px solid var(--line); }
.cta-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.cta-copy p { color: var(--muted); margin: 18px 0 24px; max-width: 48ch; }
.cta .hero-points { flex-direction: column; gap: 10px; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea { width: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); padding: 12px 14px; font: inherit; font-size: 0.95rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.2em; font-size: 0.9rem; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #C02828; }
.form-fine { font-size: 0.8rem; color: var(--muted-2); }
.form-fine a { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: clamp(52px, 6vw, 84px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; }
.site-footer .brand-mark { color: var(--green-bright); filter: none; }
.site-footer .brand-glyph { stroke: #0a0a0a; }
.site-footer .brand-name em { color: var(--green-bright); }
.footer-brand p { color: #B9C2CE; font-size: 0.95rem; margin: 18px 0; max-width: 34ch; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #B9C2CE; }
.social a:hover { color: #fff; border-color: var(--green-bright); }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h4 { margin-bottom: 6px; color: #8A94A0; }
.footer-col a { color: #B9C2CE; font-size: 0.92rem; }
.footer-col a:hover { color: var(--green-bright); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 0.85rem; color: #8A94A0; }
.legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal a { color: #8A94A0; }
.legal a:hover { color: var(--green-bright); }
.site-footer :focus-visible { outline-color: var(--green-bright); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards--3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .mega-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-cta .btn { display: none; }
  .hero-grid, .approach-grid, .faq-grid, .cta-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .insight-list li a { grid-template-columns: 1fr; gap: 8px; }
  .surface-list li { grid-template-columns: 120px 1fr auto; }
}
@media (max-width: 600px) {
  .cards--3 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .surface-list li { grid-template-columns: 1fr; gap: 6px; }
  .surface-list .tag { justify-self: start; }
  .steps li { grid-template-columns: 44px 1fr; padding: 18px; }
  .hero-points { flex-direction: column; gap: 8px; }
}

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