/* ==========================================================================
   Meta Business Consulting — Design System
   Built from MetaBC/01_Brand_System.md (Phase 1, locked).
   Accent = Electric Blue #0080FF on Near-Black #0A0A0A. Typeface = Inter.
   60/30/10 rule: blue is for ACTION, not decoration. One blue CTA per viewport.
   ========================================================================== */

:root {
  /* color */
  --bg:            #0A0A0A;
  --surface:       #1A1A1A;
  --surface-2:     #242424;
  --accent:        #0080FF;
  --accent-hover:  #0066CC;
  --accent-text:   #3399FF; /* AA-safe blue for small text on dark */
  --text:          #FFFFFF;
  --text-2:        #B3B3B3;
  --text-muted:    #737373;
  --border:        #2E2E2E;
  --light-bg:      #F5F7FA;
  --on-light:      #1A1A1A;
  --success:       #22C55E;
  --error:         #EF4444;

  /* type */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* radius + shadow */
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 8px 30px rgba(0,0,0,0.4);
  --glow:          0 0 0 3px rgba(0,128,255,0.25);

  /* layout */
  --maxw:          1120px;
  --gutter:        clamp(20px, 5vw, 48px);
  --nav-h:         68px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent); }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: none; box-shadow: var(--glow); border-radius: 4px; }

/* ---------- Type scale ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
h1 { font-size: clamp(40px, 6.5vw, 64px); }
h2 { font-size: clamp(30px, 4.6vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 600; letter-spacing: -0.01em; }
p  { margin: 0 0 1rem; color: var(--text-2); }
strong { color: var(--text); font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}

.lead { font-size: clamp(18px, 2.2vw, 20px); color: var(--text-2); max-width: 60ch; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.center { text-align: center; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(64px, 9vw, 112px); }
.section-light { background: var(--light-bg); color: var(--on-light); }
.section-light p { color: #3f4754; }
.section-light h2, .section-light h3, .section-light strong { color: var(--on-light); }
.section-surface { background: var(--surface); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 16px; font-weight: 600;
  padding: 14px 26px; border-radius: var(--radius);
  cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }
.section-light .btn-secondary { color: var(--on-light); border-color: #d3d8e0; }
.section-light .btn-secondary:hover { border-color: var(--accent); }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-block { width: 100%; justify-content: center; }

.textlink {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-text); font-weight: 600;
}
.textlink:hover { color: var(--accent); gap: 10px; transition: gap .15s ease; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 17px;
}
.brand .mark-text { font-size: 16px; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.02em; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.navlink { color: var(--text-2); font-weight: 500; font-size: 15px; }
.nav-links a.navlink:hover, .nav-links a.navlink[aria-current="page"] { color: var(--text); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  color: var(--text);
}
.nav-toggle svg { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(72px, 11vw, 140px) clamp(40px, 6vw, 72px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 0%, rgba(0,128,255,0.16), transparent 60%),
    radial-gradient(50% 60% at 100% 10%, rgba(0,128,255,0.08), transparent 55%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 22px; font-size: clamp(18px, 2.3vw, 21px); max-width: 62ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.trust-line { margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.trust-line strong { color: var(--text-2); }

/* ---------- Name strip / stat strip ---------- */
.namestrip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.namestrip .container { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-block: 22px; }
.namestrip .label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.namestrip .roster { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.namestrip .roster span { font-weight: 600; color: var(--text); font-size: 16px; }
.namestrip .roster span::after { content: "·"; color: var(--text-muted); margin-left: 26px; }
.namestrip .roster span:last-child::after { content: ""; margin: 0; }

.statbar { display: flex; flex-wrap: wrap; gap: 8px 36px; }
.statbar .stat { display: flex; align-items: baseline; gap: 8px; }
.statbar .num { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.statbar .num.is-blue { color: var(--accent); }
.statbar .cap { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.card:hover { border-color: #3a3a3a; background: var(--surface-2); }
.card h3 { margin-bottom: 10px; }
.card .eyebrow { margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card .card-cta { margin-top: 18px; }

.section-light .card { background: #fff; border-color: #e4e8ee; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.section-light .card:hover { border-color: #cfd6e0; background: #fff; }

/* feature list (How we work) */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.feature { display: flex; gap: 16px; }
.feature .tick {
  flex: none; width: 28px; height: 28px; border-radius: 8px; margin-top: 2px;
  display: grid; place-items: center;
  background: rgba(0,128,255,0.12); color: var(--accent);
}
.feature h3 { font-size: 18px; margin-bottom: 4px; }
.feature p { margin: 0; font-size: 15px; }

/* roster list */
.roster-list { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.roster-item { padding: 26px 28px; border-bottom: 1px solid var(--border); background: var(--surface); transition: background .15s ease; }
.roster-item:last-child { border-bottom: 0; }
.roster-item:hover { background: var(--surface-2); }
.roster-item h3 { margin-bottom: 4px; }
.roster-item .projects { color: var(--text-2); font-style: italic; font-size: 15px; margin-bottom: 8px; }
.roster-item p { margin: 0; font-size: 15px; }
.roster-item .memoriam { color: var(--text-muted); font-style: italic; font-size: 14px; }

/* ---------- Stat table (case study) ---------- */
.stat-table { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat-table .cell { background: var(--bg); padding: 26px 20px; text-align: center; }
.stat-table .big { font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.stat-table .big.is-blue { color: var(--accent); }
.stat-table .lbl { margin-top: 10px; font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Pricing ---------- */
.pricing-banner {
  background: rgba(0,128,255,0.10); border: 1px solid rgba(0,128,255,0.35);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 40px;
  font-size: 16px;
}
.pricing-banner strong { color: var(--text); }
.section-light .pricing-banner { background: rgba(0,128,255,0.07); }
.section-light .pricing-banner strong { color: var(--on-light); }

.tier { position: relative; display: flex; flex-direction: column; }
.tier.is-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier .flag {
  position: absolute; top: -12px; left: 28px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px; letter-spacing: 0.03em;
}
.tier .price { font-size: 22px; font-weight: 700; color: var(--text); margin: 4px 0 2px; letter-spacing: -0.01em; }
.section-light .tier .price { color: var(--on-light); }
.tier .price small { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-top: 4px; }
.tier .for { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; }
.checks { display: grid; gap: 10px; margin: 18px 0 22px; padding: 0; }
.checks li { position: relative; padding-left: 26px; font-size: 15px; color: var(--text-2); }
.section-light .checks li { color: #3f4754; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px;
  background: var(--accent); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.tier .promise { font-size: 14px; color: var(--text-muted); font-style: italic; margin: 0 0 22px; }
.tier .tier-cta { margin-top: auto; }

/* ---------- FAQ (accordion) ---------- */
.faq-list { max-width: 800px; margin-inline: auto; border-top: 1px solid var(--border); }
.section-light .faq-list { border-color: #e4e8ee; }
.faq-item { border-bottom: 1px solid var(--border); }
.section-light .faq-item { border-color: #e4e8ee; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font); font-size: clamp(17px, 2.2vw, 19px); font-weight: 600; color: var(--text);
  padding: 24px 44px 24px 0; position: relative; line-height: 1.4;
}
.section-light .faq-q { color: var(--on-light); }
.faq-q .icon { position: absolute; right: 4px; top: 26px; width: 18px; height: 18px; transition: transform .2s ease; color: var(--accent); }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 44px 24px 0; }
.faq-a-inner p { margin: 0; }

/* ---------- Legal pages (Terms, Privacy, Refunds) ---------- */
.legal { max-width: 760px; }
.legal h2 {
  font-size: clamp(21px, 2.6vw, 26px);
  margin: 52px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.legal > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p:last-child { margin-bottom: 0; }
.legal ul { display: grid; gap: 11px; margin: 0 0 1.25rem; }
.legal ul li { position: relative; padding-left: 20px; color: var(--text-2); }
.legal ul li::before {
  content: ""; position: absolute; left: 3px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.legal address { font-style: normal; color: var(--text-2); line-height: 1.9; }
.legal-updated { font-size: 14px; color: var(--text-muted); margin-top: 18px; }
.legal-intro { font-size: 17px; }

/* ---------- Forms (Contact) ---------- */
.form-wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
.form-aside h2 { margin-bottom: 16px; }
.form-aside .contact-line { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--text-2); font-size: 15px; }
.form-aside .contact-line svg { color: var(--accent); flex: none; }

form .field { margin-bottom: 18px; }
form label { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
form label .req { color: var(--accent); }
form input, form select, form textarea {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
form textarea { min-height: 130px; resize: vertical; }
form input::placeholder, form textarea::placeholder { color: var(--text-muted); }
form input:focus, form select:focus, form textarea:focus { border-color: var(--accent); box-shadow: var(--glow); outline: none; }
form input.invalid, form textarea.invalid, form select.invalid { border-color: var(--error); }
form .err { display: none; color: var(--error); font-size: 13px; margin-top: 6px; }
form .field.has-error .err { display: block; }
.form-note { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.form-status { display: none; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; margin-bottom: 18px; }
.form-status.show { display: flex; }
.form-status.success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }
.form-status.error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 18ch; margin-inline: auto; }
.cta-band .lead { margin: 18px auto 0; }
.cta-band .hero-cta { justify-content: center; }
.cta-band .or { margin-top: 16px; font-size: 14px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 56px 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer p { font-size: 14px; max-width: 38ch; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 10px; font-weight: 500; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-bottom p { margin: 0; font-size: 13px; color: var(--text-muted); }
.footer-legal { width: 100%; display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 18px; }
.footer-legal a { font-size: 13px; font-weight: 500; color: var(--text-2); }
.footer-legal a:hover { color: var(--text); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .form-wrap { grid-template-columns: 1fr; gap: 36px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stat-table { grid-template-columns: repeat(2, 1fr); }
  .stat-table .cell:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a.navlink { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 14px; }
  .nav-toggle { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .namestrip .container { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 460px) {
  .stat-table { grid-template-columns: 1fr; }
  .stat-table .cell:last-child { grid-column: auto; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
