/* ════════════════════════════════════════════════════════════════════
   Shared styles loaded by every page in the Marvin site. The base lives
   here; per-page styles inline in the page <head>. Keeps each page
   standalone-able for quick A/B tests while preventing the nav, brand,
   button, and dropdown from drifting between pages.
   ════════════════════════════════════════════════════════════════════ */

:root {
  --g50:  #fffbeb;
  --g100: #fef3c7;
  --g200: #fde68a;
  --g300: #fcd34d;
  --g400: #fbbf24;
  --g500: #f59e0b;
  --g600: #d97706;
  --g700: #b45309;
  --g800: #92400e;
  --g900: #78350f;

  --ink-0:  #0a0500;
  --ink-1:  #1a0d00;
  --ink-2:  #2a1808;
  --ink-3:  #3d2614;

  --paper:  #fdf6e3;
  --paper-2: #faecd0;
  --line: rgba(255, 251, 235, 0.10);

  --tech-1: #06b6d4;
  --tech-2: #0891b2;
  --tech-3: #0e7490;

  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-display: var(--f-sans);
  --f-mono: var(--f-sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-sans);
  background: var(--ink-1);
  color: rgba(255,251,235,0.92);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* ════════ NAV ════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  background: rgba(10, 5, 0, 0.55);
  border-bottom: 1px solid rgba(251,191,36,0.08);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(10, 5, 0, 0.82);
  border-bottom-color: rgba(251,191,36,0.18);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: #fff;
}
.brand-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--g200) 0%, var(--g400) 55%, var(--g700) 100%);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 22px;
  box-shadow: 0 10px 22px -8px rgba(180,83,9,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
  letter-spacing: -0.02em;
}
.brand-name {
  font-family: var(--f-display);
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
}
.brand-name b { color: var(--g300); font-weight: 700; }

.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links > a {
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,251,235,0.72);
  transition: color 0.18s ease;
}
.nav-links > a:hover { color: var(--g300); }

/* Dropdown menu */
.nav-dd { position: relative; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 0; color: rgba(255,251,235,0.72);
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  padding: 6px 0;
  transition: color 0.18s ease;
}
.nav-dd-btn:hover { color: var(--g300); }
.nav-dd-btn svg { transition: transform 0.25s ease; }
.nav-dd.open .nav-dd-btn svg { transform: rotate(180deg); }
.nav-dd.open .nav-dd-btn { color: var(--g300); }

.nav-dd-panel {
  position: absolute;
  top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 460px;
  background: rgba(20, 12, 0, 0.96);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(251,191,36,0.22);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.04);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 8px;
  z-index: 110;
}
.nav-dd.open .nav-dd-panel,
.nav-dd:hover .nav-dd-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dd-col {
  display: grid; gap: 4px;
  padding: 6px;
}
.nav-dd-col + .nav-dd-col {
  border-left: 1px solid rgba(251,191,36,0.10);
  padding-left: 14px;
}
.nav-dd-panel a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  color: rgba(255,251,235,0.82);
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-dd-panel a:hover,
.nav-dd-panel a:focus {
  background: rgba(251,191,36,0.12);
  color: #fff;
}
.nav-dd-panel a svg { color: rgba(255,251,235,0.45); transition: color 0.18s ease, transform 0.18s ease; }
.nav-dd-panel a:hover svg { color: var(--g300); transform: translateX(2px); }
.nav-dd-parent {
  background: rgba(251,191,36,0.10);
  border: 1px solid rgba(251,191,36,0.22);
  color: var(--g300) !important;
}
.nav-dd-parent:hover { background: rgba(251,191,36,0.22); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--g400) 0%, var(--g700) 100%);
  color: #fff; font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px -8px rgba(180,83,9,0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.nav-cta:hover { transform: translateY(-1.5px); box-shadow: 0 14px 28px -8px rgba(180,83,9,0.65); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,251,235,0.18);
  border-radius: 12px;
  align-items: center; justify-content: center;
  color: #fff;
}
.nav-toggle:active { background: rgba(255,255,255,0.10); }
.nav-toggle svg { width: 22px; height: 22px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  border: 0;
  min-height: 44px;
}
.btn.primary {
  background: linear-gradient(135deg, var(--g400) 0%, var(--g700) 100%);
  color: #fff;
  box-shadow: 0 14px 28px -10px rgba(180,83,9,0.55), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -12px rgba(180,83,9,0.65); }
.btn.ghost {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,251,235,0.18);
  backdrop-filter: blur(8px);
}
.btn.ghost:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,251,235,0.30); }

/* Section header */
.section { padding: clamp(80px, 12vh, 140px) 0; position: relative; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--g400);
  margin-bottom: 18px;
}
.section-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--g500);
}
.section-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
  color: #fff;
  max-width: 22ch;
  margin: 0 0 16px;
}
.section-lead {
  font-size: clamp(15px, 1.6vw, 17px);
  color: rgba(255,251,235,0.65);
  max-width: 60ch;
  line-height: 1.65;
}

/* Footer */
footer.foot {
  background: var(--ink-0);
  padding: 60px 0 40px;
  border-top: 1px solid rgba(251,191,36,0.10);
}
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot h5 {
  font-family: var(--f-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--g400);
  margin: 0 0 14px;
}
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot ul a {
  font-size: 13.5px; color: rgba(255,251,235,0.65);
  transition: color 0.18s ease;
}
.foot ul a:hover { color: var(--g300); }
.foot .blurb {
  font-size: 13.5px; line-height: 1.65;
  color: rgba(255,251,235,0.62); max-width: 32ch;
  margin: 14px 0 0;
}
.foot-bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,251,235,0.42);
}
.foot-bottom a { color: var(--g400); }

/* CTA card */
.cta-section { padding: clamp(70px, 10vh, 110px) 0; position: relative; }
.cta-card {
  position: relative;
  padding: clamp(40px, 6vw, 64px);
  border-radius: 32px;
  background:
    radial-gradient(60% 100% at 90% 0%, rgba(251,191,36,0.32), transparent 65%),
    radial-gradient(70% 100% at 5% 110%, rgba(180,83,9,0.42), transparent 65%),
    linear-gradient(135deg, var(--ink-2) 0%, var(--ink-3) 100%);
  border: 1px solid rgba(251,191,36,0.22);
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7);
}
.cta-card > * { position: relative; }
.cta-card h2 {
  font-family: var(--f-display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
  color: #fff; margin: 0;
  max-width: 22ch;
}
.cta-card h2 em { font-style: italic; color: var(--g300); }
.cta-card p {
  font-size: 16px; color: rgba(255,251,235,0.78);
  max-width: 56ch; margin: 18px 0 0;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* Scroll-margin so anchor jumps clear the fixed nav */
[id] { scroll-margin-top: 84px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }

/* Mobile drawer hidden by default everywhere — the @media block below
   promotes it to display:flex on small screens once `.open` is toggled.
   Without this base rule the drawer renders as `display: block` on desktop. */
.nav-drawer { display: none; }

/* Mobile drawer (used on every page) */
@media (max-width: 820px) {
  .nav { padding: 12px 0; }
  .brand-name { font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; font-size: 19px; }
  .nav-links { gap: 8px; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .nav-dd { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { padding: 10px 14px; font-size: 12.5px; gap: 6px; }

  .nav-drawer {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 5, 0, 0.96);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    z-index: 150;
    padding: 76px 22px 32px;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-drawer.open { display: flex; }
  .nav-drawer > a {
    font-family: var(--f-display);
    font-size: 22px; font-weight: 700; letter-spacing: -0.015em;
    color: #fff;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(251,191,36,0.10);
  }
  .nav-drawer > a:active { color: var(--g300); }
  .nav-drawer > a.nav-drawer-cta-link {
    margin-top: 6px;
    color: var(--g300);
    border-bottom: 0;
  }
  .nav-drawer-sub {
    display: grid; gap: 0;
    padding: 4px 0 6px 4px;
    margin: 0 0 4px;
    border-bottom: 1px solid rgba(251,191,36,0.10);
  }
  .nav-drawer-sub a {
    font-family: var(--f-sans);
    font-size: 14.5px; font-weight: 500;
    letter-spacing: 0.005em;
    color: rgba(255,251,235,0.62);
    padding: 8px 0 8px 18px;
    border: 0;
  }
  .nav-drawer-sub a:active { color: var(--g300); }
  .nav-drawer-cta {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 18px;
  }
  .nav-drawer-cta .btn {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    min-height: 48px;
  }
  .nav-drawer .close {
    position: absolute; top: 18px; right: 22px;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,251,235,0.18);
    border-radius: 12px;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
  }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
