/* ============================================================
   BrainTrail · Marketing site layout
   Builds on styles.css tokens (teal/orange/plum/cream/ink,
   Fredoka + Nunito). Desktop-first, fully responsive.
   ============================================================ */

:root {
  /* accent is tweakable — defaults to teal brand */
  --mk-accent:       var(--teal-700);
  --mk-accent-deep:  var(--teal-900);
  --mk-accent-soft:  var(--teal-100);
  --mk-accent-wash:  var(--teal-50);
  --mk-radius:       28px;   /* tweakable: playful vs crisp */
  --mk-radius-sm:    16px;
  --mk-maxw:         1200px;
  --mk-gutter:       clamp(20px, 5vw, 64px);
}

.mk {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mk * { box-sizing: border-box; }
.mk h1, .mk h2, .mk h3, .mk h4 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.mk p { margin: 0; text-wrap: pretty; }
.mk a { color: inherit; text-decoration: none; }

/* ---- layout helpers ---- */
.mk-wrap {
  max-width: var(--mk-maxw);
  margin: 0 auto;
  padding-inline: var(--mk-gutter);
}
.mk-section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.mk-section--tight { padding-block: clamp(44px, 6vw, 72px); }

.mk-eyebrow {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mk-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.mk-eyebrow::before {
  content: "";
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--mk-accent);
}

.mk-h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.02; }
.mk-h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.06; }
.mk-h3 { font-size: clamp(20px, 2vw, 25px); line-height: 1.18; }
.mk-lead { font-size: clamp(17px, 1.4vw, 21px); color: var(--ink-soft); line-height: 1.55; }
.mk-muted { color: var(--ink-mute); }

/* ---- buttons (chunky, offset-shadow family) ---- */
.mk-btn {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 17px;
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}
.mk-btn svg { width: 19px; height: 19px; }
.mk-btn:active { transform: translateY(2px); }
.mk-btn-primary {
  background: var(--mk-accent);
  color: #fff;
  box-shadow: 0 4px 0 var(--mk-accent-deep);
}
.mk-btn-primary:hover { filter: brightness(1.06); }
.mk-btn-ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 2px #e7ddc6 inset, 0 4px 0 rgba(20,58,51,0.07);
}
.mk-btn-ghost:hover { background: #fff; box-shadow: 0 0 0 2px var(--mk-accent) inset, 0 4px 0 rgba(20,58,51,0.07); }
.mk-btn-dark {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 4px 0 #06231e;
}
.mk-btn-lg { font-size: 19px; padding: 18px 34px; }
.mk-btn svg { stroke-width: 2.5; }

/* ---- chips ---- */
.mk-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink-soft);
  box-shadow: 0 0 0 1.5px #ece2cc inset;
}
.mk-chip svg { width: 16px; height: 16px; stroke-width: 2.2; }

/* ---- cards ---- */
.mk-card {
  background: var(--paper);
  border-radius: var(--mk-radius);
  border: 1.5px solid #efe6d2;
  box-shadow: 0 4px 0 rgba(20,58,51,0.05), 0 18px 36px -26px rgba(20,58,51,0.30);
}
.mk-card-pad { padding: clamp(24px, 3vw, 36px); }

/* ---- nav ---- */
.mk-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.mk-nav.is-stuck {
  border-bottom-color: #e8ddc6;
  background: color-mix(in srgb, var(--cream) 94%, transparent);
}
.mk-nav-inner {
  max-width: var(--mk-maxw);
  margin: 0 auto;
  padding: 14px var(--mk-gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.mk-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}
.mk-nav-link {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mk-nav-link:hover { background: var(--paper); color: var(--ink); }
.mk-nav-spacer { flex: 1; }
.mk-nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---- brand lockup ---- */
.mk-brand { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; }
.mk-brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-4deg); flex-shrink: 0;
  box-shadow: 0 3px 0 rgba(20,58,51,0.18);
}
.mk-brand-mark svg { width: 23px; height: 23px; stroke-width: 2.2; fill: none; }
.mk-brand-name { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 22px; color: var(--ink); }
.mk-brand-name span { color: var(--orange-500); }

/* ---- generic grid ---- */
.mk-grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.mk-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mk-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- feature row (alternating) ---- */
.mk-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.mk-feature--flip .mk-feature-media { order: -1; }

/* ---- stat ---- */
.mk-stat-num {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ---- topo decoration ---- */
.mk-topo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.mk-topo svg { width: 100%; height: 100%; display: block; }

/* ---- divider lip (curved cream edge) ---- */
.mk-lip { display: block; width: 100%; height: 56px; }

/* ---- entrance animation: content is ALWAYS visible (opacity:1); only a
   subtle transform animates, so a paused/throttled iframe never hides it ---- */
.mk-fadeup { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes mk-fadeup { from { transform: translateY(12px); } to { transform: translateY(0); } }
  .mk-fadeup { animation: mk-fadeup 0.4s ease; }
}

/* ---- pricing ---- */
.mk-price-amt {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---- footer ---- */
.mk-footer { background: var(--ink); color: rgba(255,255,255,0.72); }
.mk-footer h4 { color: #fff; font-size: 15px; font-family: 'Fredoka'; font-weight: 600; margin-bottom: 14px; letter-spacing: 0; }
.mk-footer a { display: block; padding: 5px 0; font-size: 15px; color: rgba(255,255,255,0.72); transition: color 0.15s; }
.mk-footer a:hover { color: #fff; }

/* ---- image placeholder (for real photos to drop in) ---- */
.mk-ph {
  position: relative;
  border-radius: var(--mk-radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, #efe6d2 0 14px, #e9dec6 14px 28px);
  border: 1.5px solid #e2d6bc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-ph span {
  font-family: 'Fredoka', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8c6e;
  background: var(--cream);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px #e2d6bc;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .mk-grid-3 { grid-template-columns: 1fr; }
  .mk-grid-2 { grid-template-columns: 1fr; }
  .mk-feature { grid-template-columns: 1fr; }
  .mk-feature--flip .mk-feature-media { order: 0; }
  .mk-nav-links { display: none; }
}
@media (max-width: 560px) {
  .mk { font-size: 16px; }
  .mk-nav-cta .mk-btn-ghost { display: none; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mk * { animation: none !important; }
}
