/* ================================================================
   MULTITAKE DESIGN SYSTEM — core.css
   Shared tokens, typography, navigation, footer, buttons, utilities
   Used by ALL landing pages (blog, legal, comparison, tools, etc.)
   ================================================================ */

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── DESIGN TOKENS ── */
:root {
  /* Surfaces */
  --bg:          #030305;
  --bg-raised:   #08080e;
  --bg-elevated: #0e0e18;
  --surface:     rgba(255,255,255,0.025);
  --surface-hover:rgba(255,255,255,0.045);

  /* Text */
  --text:        #e8e8ed;
  --text-2:      #82829a;
  --text-3:      #4a4a62;

  /* Brand */
  --accent:      #8B5CF6;
  --accent-soft: #a78bfa;
  --accent-bg:   rgba(139,92,246,0.10);
  --blue:        #5B8DEF;
  --teal:        #06b6d4;
  --mint:        #34d399;
  --mint-bg:     rgba(52,211,153,0.08);
  --rose:        #f472b6;
  --amber:       #D4A853;
  --amber-light: #F0D78C;
  --red:         #ef4444;

  /* Gradients */
  --grad:        linear-gradient(135deg, #8B5CF6, #5B8DEF 55%, #06b6d4);
  --grad-amber:  linear-gradient(135deg, #D4A853, #F0D78C, #D4A853);
  --grad-warm:   linear-gradient(135deg, #f472b6, #8B5CF6);

  /* Borders */
  --border:      rgba(255,255,255,0.06);
  --border-hover:rgba(255,255,255,0.12);

  /* Radii */
  --radius:      12px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.2);
  --shadow:      0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg:   0 24px 64px rgba(0,0,0,0.4);
  --glow:        0 0 32px rgba(139,92,246,0.06);

  /* Font */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ── LAYOUT ── */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── GRAIN OVERLAY ── */
.grain {
  position: fixed; inset: 0;
  z-index: 10000; pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}


/* ── SCROLL PROGRESS ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  pointer-events: none;
}


/* ── SCROLL REVEAL ── */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--d, 0s);
}
.rv.on {
  opacity: 1;
  transform: none;
}


/* ── NAVIGATION ── */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav-wrap.stuck {
  background: rgba(3,3,5,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: 1140px; margin: 0 auto;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
}
.nav-logo svg { height: 34px; width: auto; }
.nav-logo-text {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
}

.nav-links {
  display: flex; gap: 24px; align-items: center;
}
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-3);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--grad);
  padding: 8px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: #fff !important;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139,92,246,0.3);
}

.mob-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px;
}
.mob-toggle span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text-2); margin: 5px 0; border-radius: 2px;
}

/* Standard page nav HTML (for reference in all subpages):
<div class="nav-wrap" id="navWrap">
  <div class="nav-inner">
    <a href="/" class="nav-logo">
      <svg>...</svg>
      <span class="nav-logo-text">MultiTake</span>
    </a>
    <div class="nav-links" id="navLinks">
      <a href="/#features">Features</a>
      <a href="/#pricing">Pricing</a>
      <a href="/blog/">Blog</a>
      <a href="https://studio.multitake.app" class="nav-cta">Get started free</a>
    </div>
    <button class="mob-toggle" id="mobToggle"><span></span><span></span><span></span></button>
  </div>
</div>
*/


/* ── SECTION CHROME ── */
.sec-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 14px;
}

.sec-title {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.sec-sub {
  font-size: 15px; color: var(--text-2);
  max-width: 520px; margin: 0 auto;
  line-height: 1.7;
}


/* ── BUTTONS ── */
.btn-p {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); color: #fff;
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(139,92,246,0.2);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s;
  position: relative; overflow: hidden;
  font-family: var(--font);
}
.btn-p::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}
.btn-p:hover::after { left: 120%; }
.btn-p:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139,92,246,0.3);
}

.btn-s {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text); padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  font-family: var(--font);
}
.btn-s:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}


/* ── GLASS CARD ── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.35s, box-shadow 0.35s;
}
.glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246,0.18);
  box-shadow: var(--glow), 0 16px 32px rgba(0,0,0,0.15);
}


/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  position: relative;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.2), rgba(212,168,83,0.12), transparent);
}

.ft-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 40px;
}
.ft-brand .ft-name {
  font-size: 18px; font-weight: 700; margin-bottom: 10px;
}
.ft-brand p {
  font-size: 12px; color: var(--text-3); line-height: 1.6; max-width: 220px;
}
.ft-col h4 {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-2); margin-bottom: 14px;
}
.ft-col a {
  display: block; font-size: 13px; color: var(--text-3);
  margin-bottom: 8px; transition: color 0.25s;
}
.ft-col a:hover { color: var(--text); }

.ft-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-3);
}


/* ── CONTENT PROSE (for articles, legal, etc.) ── */
.prose {
  color: var(--text-2);
  line-height: 1.8;
}
.prose h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700; color: var(--text);
  margin: 48px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.prose h3 {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 32px 0 12px;
}
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol {
  margin: 16px 0; padding-left: 24px;
}
.prose li { margin-bottom: 8px; }
.prose a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.prose a:hover { color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px; margin: 24px 0;
  background: var(--accent-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.prose table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
}
.prose th, .prose td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.prose th {
  font-weight: 600; color: var(--text);
  background: var(--surface);
}
.prose code {
  background: var(--surface); padding: 2px 6px;
  border-radius: 4px; font-size: 13px;
  color: var(--accent-soft);
}
.prose .cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px; text-align: center;
  margin: 40px 0;
}
.prose .cta-box h3 {
  color: var(--text); margin-top: 0;
}


/* ── ARTICLE PAGE CHROME ── */
.article-header {
  padding: 120px 0 40px;
  text-align: center;
  position: relative;
}
.article-header::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 30%, rgba(139,92,246,0.06), transparent);
  pointer-events: none;
}
.article-header .wrap { position: relative; z-index: 1; }

.article-tag {
  display: inline-block;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-bg); color: var(--accent-soft);
  margin-bottom: 16px;
}

.article-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.12; margin-bottom: 16px;
  max-width: 700px; margin-left: auto; margin-right: auto;
}

.article-meta {
  font-size: 13px; color: var(--text-3);
  display: flex; gap: 16px; justify-content: center;
  align-items: center;
}
.article-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

.article-body {
  padding: 40px 0 80px;
}

/* Reading progress bar */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; background: var(--grad);
  transform-origin: left; transform: scaleX(0);
  z-index: 200; pointer-events: none;
}


/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .ft-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mob-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(3,3,5,0.95);
    backdrop-filter: blur(20px);
    padding: 20px 24px; gap: 14px;
    border-bottom: 1px solid var(--border);
  }
  .ft-grid { grid-template-columns: 1fr; gap: 20px; }
  .ft-bottom { flex-direction: column; gap: 8px; text-align: center; }
}


/* ── SHARED JS INIT (reference for subpages) ──
<script>
// Sticky Nav
(function(){
  var n=document.getElementById('navWrap'),t=false;
  window.addEventListener('scroll',function(){
    if(!t){requestAnimationFrame(function(){n.classList.toggle('stuck',scrollY>50);t=false});t=true}
  });
})();

// Scroll Reveal
(function(){
  var obs=new IntersectionObserver(function(e){
    e.forEach(function(x){if(x.isIntersecting)x.target.classList.add('on')});
  },{threshold:0.06,rootMargin:'0px 0px -30px 0px'});
  document.querySelectorAll('.rv').forEach(function(el){obs.observe(el)});
})();

// Mobile Menu
document.getElementById('mobToggle').addEventListener('click',function(){
  document.getElementById('navLinks').classList.toggle('open');
});

// Scroll Progress (optional)
(function(){
  var bar=document.querySelector('.scroll-progress')||document.querySelector('.reading-progress');
  if(!bar)return;
  window.addEventListener('scroll',function(){
    bar.style.transform='scaleX('+(scrollY/(document.body.scrollHeight-innerHeight))+')';
  });
})();
</script>
*/
