/* ============================================================
   Mars Enterprises — corporate site (marsenterprises.co)
   Deliberately quieter than marvinmoney.com:
     • Light, editorial, mostly type on off-white
     • Same ink + type DNA as the product site, indigo as the
       ONLY accent, used sparingly
     • No animation beyond a soft fade-in
   ============================================================ */

:root {
  --bg:         #fbfbfd;
  --bg-alt:     #ffffff;
  --bg-deep:    #0a1628;      /* footer only */

  --ink:        #1d1d1f;
  --ink-soft:   #6e6e73;
  --ink-mute:   #86868b;
  --line:       rgba(0,0,0,0.08);

  --indigo:     #6366f1;
  --indigo-l:   #818cf8;

  --t-headline: clamp(38px, 5.2vw, 64px);
  --t-title:    clamp(28px, 3.6vw, 44px);
  --t-lede:     clamp(18px, 1.9vw, 22px);
  --t-body:     17px;
  --t-small:    14px;

  --container:  980px;
  --radius:     14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
               "Segoe UI", Roboto, sans-serif;
  font-size: var(--t-body);
  line-height: 1.5;
  letter-spacing: -0.018em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Nav — same dark-glass treatment as marvinmoney.com ──── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img {
  height: 30px; width: auto;
  filter: brightness(0) invert(1);
}
.brand .wordmark {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.78);
  transition: color .15s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--indigo-l);
  border-radius: 2px;
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .brand .wordmark { display: none; }
}

/* ── Mobile menu — hamburger + slide-down drawer ──────── */
/* Same treatment as marvinmoney.com, but CSS-only (hidden checkbox):
   this site ships CSP script-src 'none', so the drawer can't be
   JS-injected like the marketing site's. The checkbox sits just
   before .nav in each page; the drawer is the nav's next sibling. */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-menu-btn { display: none; }
.nav-drawer   { display: none; }
@media (max-width: 720px) {
  .nav-menu-btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    cursor: pointer; color: rgba(255,255,255,0.85);
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .nav-menu-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .nav-toggle:focus-visible ~ .nav .nav-menu-btn {
    outline: 2px solid var(--indigo-l); outline-offset: 2px;
  }
  .nav-menu-btn svg { width: 22px; height: 22px; }
  .nav-menu-btn .icon-close { display: none; }
  .nav-toggle:checked ~ .nav .nav-menu-btn .icon-open  { display: none; }
  .nav-toggle:checked ~ .nav .nav-menu-btn .icon-close { display: block; }

  .nav-drawer {
    display: block;
    position: fixed; left: 0; right: 0;
    top: calc(64px + env(safe-area-inset-top, 0px));
    bottom: 0;
    background: rgba(5,11,24,0.98);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 49;
    overflow-y: auto;
    padding: 18px 22px calc(40px + env(safe-area-inset-bottom, 0px));
    opacity: 0; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav-toggle:checked ~ .nav-drawer {
    opacity: 1; pointer-events: auto;
    transform: translateY(0);
  }
  .nav-drawer a {
    display: block;
    padding: 16px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 18px; font-weight: 500;
    color: rgba(255,255,255,0.92);
    letter-spacing: -0.01em;
  }
  .nav-drawer a:last-child { border-bottom: none; }
  .nav-drawer a.active { color: var(--indigo-l); }
  .nav-drawer a:active { background: rgba(255,255,255,0.04); }

  /* Lock page scroll while the drawer is open. */
  body:has(.nav-toggle:checked) { overflow: hidden; }
}

/* ── Sections ────────────────────────────────────────────── */
.fold { padding: clamp(72px, 10vw, 130px) 22px; }
.fold.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fold-inner { max-width: var(--container); margin: 0 auto; }
.fold-inner.narrow { max-width: 720px; }

.eyebrow {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 14px;
}
h1.headline {
  font-size: var(--t-headline);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.025em;
  margin-bottom: 20px;
}
h2.title {
  font-size: var(--t-title);
  font-weight: 700; line-height: 1.12; letter-spacing: -0.022em;
  margin-bottom: 18px;
}
.lede {
  font-size: var(--t-lede);
  line-height: 1.5; letter-spacing: -0.014em;
  color: var(--ink-soft);
  max-width: 640px;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: clamp(90px, 13vw, 170px) 22px clamp(72px, 10vw, 130px); }
.hero .fold-inner { max-width: 800px; }
.hero .mark { height: 64px; width: auto; margin-bottom: 34px; }

/* ── Product grid (home) ─────────────────────────────────── */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; margin-top: 44px;
}
@media (max-width: 760px) { .product-grid { grid-template-columns: 1fr; } }
.pcard {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  display: flex; flex-direction: column;
  min-height: 190px;
  transition: box-shadow .2s ease;
}
a.pcard:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.07); }
.pcard .p-lockup { height: 30px; width: auto; align-self: flex-start; margin-bottom: 18px; }
.pcard .p-tag { font-size: 15px; color: var(--ink); font-weight: 500; margin-bottom: 6px; }
.pcard .p-status { font-size: 14px; color: var(--ink-mute); margin-top: auto; }
.pcard .p-status .live { color: var(--indigo); font-weight: 600; }
.pcard.rnd .p-status { color: var(--ink-mute); }

/* ── Product card ────────────────────────────────────────── */
.product-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 36px;
  margin-top: 40px;
  transition: box-shadow .2s ease;
}
.product-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.07); }
.product-card .p-logo { height: 34px; width: auto; margin-bottom: 14px; }
.product-card h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.018em; margin-bottom: 6px; }
.product-card .tagline { font-size: 16px; color: var(--ink-soft); margin-bottom: 10px; }
.product-card .meta { font-size: var(--t-small); color: var(--ink-mute); }
.product-card .go {
  font-size: 15px; font-weight: 600; color: var(--indigo);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .product-card { grid-template-columns: 1fr; }
}
.product-note {
  margin-top: 18px;
  font-size: var(--t-small); color: var(--ink-mute);
}

/* ── Principles ──────────────────────────────────────────── */
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px; margin-top: 48px;
}
.principles.four { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .principles, .principles.four { grid-template-columns: 1fr; } }
.principle .num {
  font-size: 15px; font-weight: 700; color: var(--indigo);
  margin-bottom: 12px;
}
.principle h3 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.016em;
  margin-bottom: 8px;
}
.principle p { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* ── Long-form story (About) ─────────────────────────────── */
.story p {
  font-size: 19px; line-height: 1.62; letter-spacing: -0.012em;
  margin-bottom: 26px;
}
.story p.lede-p { font-size: 23px; font-weight: 500; line-height: 1.42; margin-bottom: 34px; }
.story h2 {
  font-size: 27px; font-weight: 700; letter-spacing: -0.02em;
  margin: 50px 0 18px;
}
.story blockquote {
  border-left: 3px solid var(--indigo);
  padding-left: 22px; margin: 34px 0;
  font-size: 23px; font-weight: 500; line-height: 1.42;
  letter-spacing: -0.016em;
}
.story blockquote .attr {
  display: block; margin-top: 10px;
  font-size: var(--t-small); font-weight: 400; color: var(--ink-soft);
}

/* ── Fact list (About / Contact) ─────────────────────────── */
.facts { margin-top: 44px; border-top: 1px solid var(--line); }
.fact {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 20px; padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.fact .k { color: var(--ink-mute); font-weight: 500; }
.fact .v { color: var(--ink); }
.fact .v a { color: var(--indigo); font-weight: 500; }
@media (max-width: 560px) { .fact { grid-template-columns: 1fr; gap: 4px; } }

/* ── Careers ─────────────────────────────────────────────── */
.roles-empty {
  margin-top: 44px;
  border: 1px dashed rgba(0,0,0,0.16);
  border-radius: var(--radius);
  padding: 44px 30px;
  text-align: center;
}
.roles-empty h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.roles-empty p { font-size: 16px; color: var(--ink-soft); max-width: 460px; margin: 0 auto; }
.roles-empty p a { color: var(--indigo); font-weight: 600; }

.support-link { color: var(--indigo); font-weight: 600; }

/* ── Contact cards ───────────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 22px; margin-top: 44px;
}
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.contact-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; }
.contact-card a { font-size: 15px; font-weight: 600; color: var(--indigo); }

/* ── R&D tease ───────────────────────────────────────────── */
.rnd-card {
  margin-top: 22px;
  border: 1px dashed rgba(0,0,0,0.16);
  border-radius: var(--radius);
  padding: 30px 36px;
  display: flex; align-items: center; gap: 22px;
}
.rnd-card .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--indigo); opacity: .55;
  flex: none;
}
.rnd-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.014em; margin-bottom: 4px; }
.rnd-card p { font-size: 15px; color: var(--ink-soft); }

/* ── Leadership ──────────────────────────────────────────── */
.leaders {
  display: grid; grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 26px; margin-top: 44px;
}
@media (max-width: 560px) { .leaders { grid-template-columns: 1fr; } }
.leader {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.leader .avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, #eef0ff, #e2e6f9);
  color: var(--indigo);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.leader h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.016em; margin-bottom: 4px; }
.leader .role { font-size: 15px; color: var(--ink-soft); }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--bg-deep);
  color: rgba(255,255,255,0.65);
  padding: 54px 22px 44px;
  font-size: var(--t-small);
}
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer .cols {
  display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.footer .f-brand img { height: 26px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: .9; }
.footer .f-links { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.footer .f-links a { color: rgba(255,255,255,0.65); transition: color .15s ease; }
.footer .f-links a:hover { color: #fff; }
.footer .legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  font-size: 12.5px; line-height: 1.7;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 720px) {
  .footer { padding: 44px 18px 32px; }
  .footer .cols { flex-direction: column; gap: 26px; }
  .footer .f-links { flex-direction: column; gap: 14px; }
  .footer .f-links a { font-size: 15px; }
}

/* ── Fade-in ─────────────────────────────────────────────── */
.fade-in { animation: fadeUp .7s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
