/*
  MagicBeansAI — minimal, responsive landing styles
*/
:root {
  --bg: #070b14;
  --bg-alt: #0c1220;
  --surface: #0e1529;
  --text: #e6ecff;
  --muted: #a9b2c7;
  --primary: #6b5bff;
  --accent: #00d08a;
  --card: #111a33;
  --border: #1a2340;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --nav-h: 64px;
  --nav-bg: rgba(7,11,20,0.6);
  --brand-grad-start: #6B5BFF; /* purple */
  --brand-grad-mid: #50C7FF;  /* blue */
  --brand-grad-end: #00D08A;  /* green */
}

/* Light theme (executive-friendly) */
.theme-light {
  --bg: #f8faff;
  --bg-alt: #f2f6fc;
  --surface: #ffffff;
  --text: #0b1325;
  --muted: #5a6886;
  --primary: #5865ff;
  --accent: #00b88a;
  --card: #ffffff;
  --border: #d9e2f1;
  --shadow: 0 8px 24px rgba(11,19,37,0.08);
  --nav-bg: rgba(255,255,255,0.55);
  --brand-grad-start: #6A5BFF;
  --brand-grad-mid: #4AB6FF;
  --brand-grad-end: #00C79A;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1400px 700px at 70% -10%, rgba(107,91,255,0.18), transparent 60%), var(--bg);
  line-height: 1.6;
  padding-top: 0; /* let the hero/background reach the very top under the transparent header */
}

/* Ensure in-page anchors are not hidden under fixed header */
:target { scroll-margin-top: calc(var(--nav-h) + 8px); }
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }
#cta, #top { scroll-margin-top: calc(var(--nav-h) + 8px); }

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px min(4vw, 24px);
  background: transparent;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  width: 100%;
  transition: background-color 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.nav.scrolled {
  background: var(--nav-bg);
  border-color: var(--border);
  box-shadow: 0 6px 18px rgba(11,19,37,0.04);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.nav-title { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 800; letter-spacing: 0.2px; opacity: 0; transition: opacity 200ms ease; pointer-events: none; 
  background-image: linear-gradient(90deg, var(--brand-grad-start), var(--brand-grad-mid), var(--brand-grad-end));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 2px rgba(11,19,37,0.08);
}
.nav.scrolled .nav-title { opacity: 1; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
}
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; }

/* Hero */
.hero { position: relative; overflow: visible; min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; z-index: 0; }
.hero::after { content: none; }
.hero .container { padding: 0; }
.hero-content { text-align: center; position: relative; z-index: 2; padding: 0 min(4vw, 24px); }
.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 12px;
}
.brand-gradient {
  background-image: linear-gradient(90deg, var(--brand-grad-start), var(--brand-grad-mid), var(--brand-grad-end));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.accent { background: linear-gradient(90deg, var(--accent), #56f0b5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: clamp(16px, 2.3vw, 20px); margin: 0 auto; max-width: 760px; }
.cta-row { margin-top: 22px; display: inline-flex; gap: 12px; }
.hero-note { margin-top: 12px; color: var(--muted); }
.badge { display: inline-block; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text); opacity: 0.9; }

/* dynamic background canvas */
.bg-canvas {
  position: absolute;
  top: 0; left: 0; right: 0;
  /* extend below the hero so it blends into the next section */
  height: calc(100% + 40vh);
  width: 100%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(107,91,255,0.12), transparent 60%);
}

/* Background switcher removed (keyboard toggle only) */

/* Overlap the first content section into the hero and fade the top */
.section.fade-overlay {
  margin-top: -30vh;
  padding-top: calc(64px + 30vh);
  background-color: var(--bg);
  background-image: none;
}
.section.alt.fade-overlay {
  background-color: var(--bg-alt);
  background-image: none;
}

/* Sections */
.section { padding: 64px 0; background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0) 55%, rgba(255,255,255,0.03)), var(--bg); }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0) 55%, rgba(255,255,255,0.03)), var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.theme-light .section { background: linear-gradient(180deg, rgba(11,19,37,0.04), rgba(11,19,37,0) 60%, rgba(11,19,37,0.04)), var(--bg); }
.theme-light .section.alt { background: linear-gradient(180deg, rgba(11,19,37,0.04), rgba(11,19,37,0) 60%, rgba(11,19,37,0.04)), var(--bg-alt); }
/* Remove gradient on the very first content section under the hero */
.section.fade-overlay { background: var(--bg); }
.section.alt.fade-overlay { background: var(--bg-alt); }
.section h2 { font-size: clamp(22px, 3.5vw, 32px); margin: 0 0 8px; text-align: center; }
.subhead { text-align: center; color: var(--muted); margin-bottom: 24px; }

.grid.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.icon { font-size: 22px; margin-bottom: 8px; }

.steps { display: grid; gap: 14px; max-width: 780px; margin: 0 auto; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.step-num { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(180deg, var(--primary), #4637ff); font-weight: 700; }

.cta { text-align: center; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; background: rgba(255,255,255,0.5); }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.footer .links { display: inline-flex; gap: 16px; }
.footer .copy { text-align: right; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); text-decoration: none; background: rgba(255,255,255,0.03); transition: transform 0.05s ease, background 0.2s ease; }
.btn.small { padding: 8px 12px; font-size: 14px; }
.btn.primary { background: linear-gradient(180deg, var(--primary), #4637ff); border: 1px solid rgba(255,255,255,0.08); color: #ffffff; text-shadow: 0 1px 1px rgba(0,0,0,0.15); }
.btn.ghost { background: transparent; }
.btn:hover { transform: translateY(-1px); }

/* Diagram */
.diagram { display: grid; place-items: center; }
.diagram img { width: min(1100px, 92vw); height: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.diagram svg { width: min(1100px, 92vw); height: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }

/* Responsive */
@media (max-width: 900px) {
  .grid.features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer .copy { text-align: center; }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: calc(var(--nav-h) + 6px); right: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .nav-links a { margin: 8px 6px; }
  .nav-toggle { display: inline-flex; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; }
  .grid.features { grid-template-columns: 1fr; }
}
