/* ============================================================
   Mesfonic — virtual CFO & FP&A advisory
   Design system v2.0 · black + deep teal + white
   Brand teal sampled from the Mesfonic wordmark: #183835
   ============================================================ */

:root {
  --black: #050707;
  --black-deep: #030505;
  --surface: #0c1111;
  --surface-2: #101616;
  --teal: #183835;
  --teal-deep: #0f2926;
  --teal-mid: #2b5650;
  --teal-light: #6fb3a6;
  --teal-pale: #a9d6cd;
  --ink: #f0f5f5;
  --muted: #9fb0b0;
  --line: rgba(255, 255, 255, 0.10);
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--black);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--teal-mid); color: var(--white); }
img { max-width: 100%; height: auto; }
a { color: var(--teal-light); }
a:hover { color: var(--teal-pale); }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal-light); color: var(--black-deep);
  padding: 0.75rem 1.25rem; z-index: 200; font-weight: 700;
  border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 2px; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4.5rem 0; }
.section-alt { background: var(--black-deep); }
.section-teal { background: var(--teal-deep); color: var(--ink); }
.section-teal h2, .section-teal h3 { color: var(--white); }
.section-teal p { color: #c3d4d4; }
.section-tight { padding: 2.5rem 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 7, 7, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(24, 56, 53, 0.9);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--white); text-decoration: none;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.01em;
}
.brand:hover { color: var(--teal-light); }
.brand img { display: block; }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px; padding: 0.6rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s; }
.primary-nav .nav-list {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none; margin: 0; padding: 0;
}
.primary-nav .nav-list > li > a {
  display: inline-block; padding: 0.7rem 0.85rem;
  color: #e8efef; text-decoration: none; font-size: 0.98rem; font-weight: 500;
  border-radius: 6px;
}
.primary-nav .nav-list > li > a:hover,
.primary-nav .nav-list > li > a.is-current { color: var(--teal-light); }
.has-dropdown { position: relative; }
.dropdown-toggle {
  background: none; border: 0; cursor: pointer; color: #e8efef;
  padding: 0.7rem 0.4rem 0.7rem 0; font-size: 0.9rem;
}
.dropdown-toggle svg { width: 12px; height: 12px; display: block; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 290px;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); list-style: none; margin: 0.25rem 0 0; padding: 0.5rem;
  border: 1px solid var(--line); z-index: 120;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.open > .dropdown { display: block; }
.dropdown a {
  display: block; padding: 0.65rem 0.85rem; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-size: 0.95rem;
}
.dropdown a:hover, .dropdown a.is-current { background: var(--teal-deep); color: var(--teal-light); }
.nav-cta { margin-left: 0.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.85rem 1.7rem; border-radius: 8px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-mid); border-color: var(--teal-mid); color: var(--white); }
.btn-outline { border-color: var(--teal-light); color: var(--teal-light); background: transparent; }
.btn-outline:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.btn-light { background: var(--white); color: #060808; }
.btn-light:hover { background: var(--teal-pale); color: #060808; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(24, 56, 53, 0.55), transparent 60%),
    linear-gradient(160deg, #030505 0%, #050707 60%, #0a1212 100%);
  color: var(--ink); padding: 5.5rem 0 5rem; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  border: 2px solid rgba(43, 86, 80, 0.5); pointer-events: none;
}
.hero-inner { max-width: 780px; position: relative; z-index: 1; }
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-light);
  margin-bottom: 1rem;
}
.hero h1, .page-hero h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.12;
  color: var(--white); margin: 0 0 1.25rem;
}
.hero .lede { font-size: 1.25rem; color: #b9c9c9; max-width: 640px; }
.page-hero {
  background: linear-gradient(160deg, #030505, #0a1212 70%);
  color: var(--ink); padding: 3.75rem 0 3.25rem;
  border-bottom: 1px solid var(--line);
}
.page-hero .lede { color: #b9c9c9; font-size: 1.15rem; max-width: 700px; }
.breadcrumb { font-size: 0.88rem; margin-bottom: 1rem; color: #7d8f8f; }
.breadcrumb a { color: var(--teal-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Typography & prose ---------- */
h2, h3, h4 { font-family: var(--font-serif); color: var(--white); line-height: 1.25; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 1rem; font-weight: 600; }
h3 { font-size: 1.35rem; margin: 0 0 0.6rem; font-weight: 600; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose p, .prose li { color: #cfdbdb; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose strong { color: var(--white); }

/* ---------- Cards & grids ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.9rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card h3 { color: var(--white); }
.card p { color: var(--muted); flex-grow: 1; }
.card .card-link { font-weight: 600; color: var(--teal-light); text-decoration: none; margin-top: 1rem; }
.card .card-link:hover { text-decoration: underline; color: var(--teal-pale); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 1.1rem;
  background: var(--teal); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); color: var(--white); font-size: 1.35rem;
}
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem; margin: 2.5rem 0;
}
.stat {
  border-left: 3px solid var(--teal-mid); padding-left: 1.1rem;
}
.stat .stat-num { font-family: var(--font-serif); font-size: 2.1rem; color: var(--white); font-weight: 600; }
.stat .stat-label { color: var(--muted); font-size: 0.95rem; }

/* ---------- Feature lists ---------- */
.feature-list { list-style: none; margin: 1.25rem 0; padding: 0; }
.feature-list li {
  position: relative; padding-left: 2rem; margin-bottom: 0.9rem; color: #cfdbdb;
}
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0.05rem;
  color: var(--teal-light); font-weight: 800;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 2rem; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; position: relative; }
.step h3 { color: var(--white); }
.step p { color: var(--muted); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif); font-size: 2rem; color: var(--teal-light); display: block; margin-bottom: 0.5rem;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 2rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }
table.pricing { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.98rem; color: var(--ink); }
table.pricing th, table.pricing td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); }
table.pricing thead th { background: var(--teal-deep); color: var(--white); font-family: var(--font-serif); font-size: 1.05rem; }
table.pricing thead th .tier-price { display: block; font-family: var(--font-sans); font-size: 0.9rem; color: var(--teal-light); font-weight: 600; margin-top: 0.25rem; }
table.pricing tbody th { background: var(--surface-2); font-weight: 600; width: 34%; color: var(--white); }
table.pricing td { vertical-align: top; }
.yes { color: var(--teal-light); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-top: 1.5rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 0.9rem; padding: 0;
}
.faq summary {
  cursor: pointer; padding: 1.15rem 1.4rem; font-weight: 600; color: var(--white);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal-light); font-size: 1.5rem; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-a { padding: 0 1.4rem 1.25rem; color: #cfdbdb; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--teal-deep), var(--teal) 55%, var(--teal-mid));
  color: var(--white); border-radius: 18px; padding: 3.2rem;
  margin: 1rem 0; text-align: center; border: 1px solid rgba(111, 179, 166, 0.25);
}
.cta-band h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-band p { max-width: 620px; margin: 0 auto 1.75rem; color: #d3e2e2; font-size: 1.1rem; }
.cta-band a:not(.btn) { color: var(--teal-pale); }
.cta-band .btn-primary { background: var(--white); border-color: var(--white); color: #060808; }
.cta-band .btn-primary:hover { background: var(--teal-pale); border-color: var(--teal-pale); color: #060808; }
.cta-band .btn-outline { border-color: var(--white); color: var(--white); }
.cta-band .btn-outline:hover { background: var(--white); border-color: var(--white); color: #060808; }

/* ---------- Notes / badges ---------- */
.note-box {
  background: rgba(24, 56, 53, 0.28); border: 1px solid rgba(43, 86, 80, 0.7);
  border-left: 4px solid var(--teal-mid);
  border-radius: 8px; padding: 1rem 1.25rem; margin: 1.5rem 0; font-size: 0.97rem; color: #d3e2e2;
}
.badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; background: var(--teal); color: var(--white);
  padding: 0.3rem 0.7rem; border-radius: 999px; margin-bottom: 0.8rem;
}
.badge-coming { background: transparent; color: var(--teal-light); border: 1px dashed var(--teal-mid); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; margin-top: 2rem; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--white); }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 1rem; border: 1px solid #2b3d3d; border-radius: 8px;
  font: inherit; background: var(--black-deep); color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.9rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black-deep); color: #8fa3a3; padding: 4rem 0 0; font-size: 0.97rem; border-top: 1px solid rgba(24, 56, 53, 0.7); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.75rem; }
.footer-brand { font-family: var(--font-sans); font-weight: 700; font-size: 1.5rem; color: var(--white); margin-bottom: 0.75rem; display: block; }
.site-footer h4 { color: var(--teal-light); font-family: var(--font-sans); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: #8fa3a3; text-decoration: none; }
.site-footer a:hover { color: var(--teal-light); }
.footer-contact p { margin: 0 0 0.5rem; }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 1.4rem 0;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.88rem; color: #6d7f7f;
}
.footer-legal a { margin-left: 1.25rem; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 6rem 0; }
.page-404 h1 { font-family: var(--font-serif); font-size: 5rem; color: var(--white); margin: 0; }
.page-404 p { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 3.25rem 0; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #060808; border-top: 1px solid var(--line);
    padding: 0.75rem 1.5rem 1.5rem;
  }
  .primary-nav.open { display: block; }
  .primary-nav .nav-list { flex-direction: column; align-items: stretch; }
  .primary-nav .nav-list > li > a { display: block; padding: 0.8rem 0.25rem; }
  .has-dropdown > a { display: inline-block; }
  .dropdown { position: static; box-shadow: none; border: 0; background: var(--teal-deep); margin: 0 0 0.5rem; }
  .dropdown a { color: #e8efef; }
  .dropdown a:hover { background: rgba(255,255,255,0.06); color: var(--teal-light); }
  .nav-cta { margin: 0.75rem 0 0; }
  .hero { padding: 4rem 0 3.5rem; }
  .cta-band { padding: 2.25rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
