/* =========================================================================
   Mango marketing site - shared stylesheet for the STATIC pages
   (/features, /portal, /integrations, /why-mango).

   v2 - light and fresh: pale-grey paper with a faint grid texture, white
   cards, brand teal, and dark-teal gradient header/footer bookends. The
   React home shares the identical header/footer design (LP-* classes) so
   navigating between the home and these pages never jumps. Typography is
   Inter with a serif-italic accent (Instrument Serif) for one highlight
   word per headline.
   ========================================================================= */

:root {
  --paper: #f6f8f8;
  --paper-2: #eef3f2;
  --card: #ffffff;
  --ink: #173536;        /* deep teal ink - headings */
  --ink-dim: #41393f;    /* warm plum ink - body */
  --ink-faint: #9b8478;  /* taupe-leaning muted labels */
  --teal: #14b8a6;
  --teal-deep: #157570;  /* the deck's brand teal, canonical */
  --teal-ink: #173536;
  --header-grad: #173536; /* dark surfaces are ONE deep teal now */
  --line: rgba(22, 49, 59, 0.12);
  --line-soft: rgba(22, 49, 59, 0.08);
  --shadow-card: 0 10px 30px -18px rgba(12, 43, 40, 0.28);
  --shadow-shot: 0 30px 70px -30px rgba(12, 43, 40, 0.38);
  --ease-out: cubic-bezier(0.246, -0.005, 0, 0.995);
  --ease-soft: cubic-bezier(0.409, 0.001, 0.094, 0.983);
  --dur-1: 220ms;
  --dur-2: 380ms;
  --edge: clamp(20px, 4vw, 56px);
  --maxw: 1420px; /* Shopify's container - THE site width */
}

* { box-sizing: border-box; }

/* NO css smooth-scrolling: it re-smooths every programmatic scrollTo,
   fighting shell.js's eased glide (double animation = the laggy feel). */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Faint grid texture over the paper - the quiet backdrop that keeps large
   pale areas from feeling empty. Fixed so content glides over it. */
.MK-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 38% at 10% 0%, rgba(20, 184, 166, 0.06) 0%, transparent 65%),
    radial-gradient(45% 34% at 96% 18%, rgba(20, 184, 166, 0.05) 0%, transparent 65%),
    radial-gradient(50% 30% at 30% 82%, rgba(20, 184, 166, 0.04) 0%, transparent 65%);
}

.MK-page { position: relative; z-index: 1; }

a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Serif-italic accent word inside headlines. */
.MK-accent {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--teal-deep);
}

/* ── Page scaffolding ──────────────────────────────────────────── */
.MK-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--edge); }

.MK-hero {
  padding: clamp(56px, 8vw, 104px) 0 clamp(24px, 3.5vw, 44px);
  max-width: 880px;
}
.MK-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 16px;
}
.MK-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}
h1.MK-h1 {
  font-size: clamp(36px, 5.2vw, 62px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  color: var(--ink);
}
.MK-lede {
  font-size: clamp(16.5px, 1.6vw, 19px);
  color: var(--ink-dim);
  max-width: 700px;
  margin: 0;
}

.MK-section { padding: clamp(44px, 6vw, 92px) 0; }
.MK-section + .MK-section { border-top: 1px solid var(--line-soft); }
h2.MK-h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--ink);
}
.MK-sub {
  color: var(--ink-dim);
  max-width: 680px;
  margin: 0 0 28px;
}

/* Alternating feature rows: text beside a framed screenshot */
.MK-featrow {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4.5vw, 72px);
  align-items: center;
  padding: clamp(38px, 5vw, 72px) 0;
}
.MK-featrow + .MK-featrow { border-top: 1px solid var(--line-soft); }
.MK-featrow--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.MK-featrow--flip .MK-feattext { order: 2; }
.MK-featrow--flip .MK-featshot { order: 1; }
.MK-feattext h3 {
  font-size: clamp(21px, 2.3vw, 27px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}
.MK-feattext p { color: var(--ink-dim); margin: 0 0 12px; }
.MK-feattext ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-dim);
  font-size: 15px;
}
.MK-feattext li {
  padding: 6px 0 6px 26px;
  position: relative;
}
.MK-feattext li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--teal);
}
.MK-featshot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-shot);
  background: #fff;
}
.MK-featshot--phone {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.MK-featshot--phone img {
  width: min(250px, 42%);
  border-radius: 24px;
}

@media (max-width: 860px) {
  .MK-featrow, .MK-featrow--flip { grid-template-columns: 1fr; }
  .MK-featrow--flip .MK-feattext { order: 1; }
  .MK-featrow--flip .MK-featshot { order: 2; }
}

/* Card grids */
.MK-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.MK-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 24px 24px 22px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-1) var(--ease-soft), transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-soft);
}
.MK-card:hover {
  border-color: rgba(20, 184, 166, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(12, 43, 40, 0.35);
}
.MK-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.MK-card p { font-size: 14.5px; color: var(--ink-dim); margin: 0; }
.MK-card .MK-cardlink {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal-deep);
}

/* Integration tiles */
.MK-integ {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.MK-integ img { height: 30px; width: auto; flex-shrink: 0; }
.MK-integ .MK-integtext h3 { font-size: 16px; margin: 0 0 4px; color: var(--ink); }
.MK-integ .MK-integtext p { font-size: 14px; color: var(--ink-dim); margin: 0; }
.MK-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 8px;
  vertical-align: 2px;
}
.MK-badge--live { background: rgba(20, 184, 166, 0.14); color: var(--teal-deep); }
.MK-badge--soon { background: rgba(12, 43, 40, 0.07); color: var(--ink-faint); }

/* CTA band - the dark-teal gradient moment on light pages */
.MK-ctaband {
  margin: clamp(44px, 6vw, 92px) 0;
  padding: clamp(38px, 5vw, 68px);
  border-radius: 24px;
  background:
    radial-gradient(120% 180% at 12% 0%, rgba(45, 212, 191, 0.22) 0%, transparent 55%),
    var(--header-grad);
  color: #e6fcfa;
  text-align: center;
  box-shadow: 0 30px 70px -35px rgba(6, 48, 44, 0.7);
}
.MK-ctaband h2 { margin-bottom: 10px; color: #ffffff; }
.MK-ctaband h2 .MK-accent { color: #7ef0dd; }
.MK-ctaband p { color: rgba(230, 252, 250, 0.75); max-width: 580px; margin: 0 auto 26px; }
.MK-ctaband .MK-ctarow {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Scroll-in reveals ─────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-soft), transform 700ms var(--ease-out);
}
.rv.rv-in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 90ms; }
.rv-d2 { transition-delay: 180ms; }
.rv-d3 { transition-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}
/* No-JS safety: if the observer script never runs, everything shows. */
.no-rv .rv { opacity: 1; transform: none; }

/* Card-grid stagger */
.MK-grid .rv:nth-child(3n + 2) { transition-delay: 70ms; }
.MK-grid .rv:nth-child(3n + 3) { transition-delay: 140ms; }

/* ── Card icons - the sales-deck lucide set on feature grids ────── */
.MK-cardicon { display: inline-flex; color: #0f766e; margin-bottom: 10px; }
.MK-cardicon svg { display: block; }

/* ── Founder photo collage (Why Mango story) - the deck's polaroid
   layout: main shot straight, two overlapping tilted prints. ────── */
.MK-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 580px);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.MK-collage {
  position: relative;
  aspect-ratio: 97 / 100;
  max-width: 600px;
  margin: 8px auto 0;
  width: 100%;
}
.MK-collage-ph {
  position: absolute;
  background: #fff;
  padding: clamp(7px, 1.4vw, 12px);
  border: 1px solid #e9ebee;
  box-shadow: 0 22px 50px rgba(17, 24, 39, 0.24);
  box-sizing: border-box;
}
.MK-collage-ph img { width: 100%; height: auto; display: block; }
.MK-collage-ph--1 { left: 6%; top: 0; width: 84%; z-index: 1; }
.MK-collage-ph--2 { left: 0; top: 51%; width: 59%; z-index: 2; transform: rotate(-6deg); }
.MK-collage-ph--3 { left: 61%; top: 41%; width: 39%; z-index: 3; transform: rotate(7deg); }
@media (max-width: 900px) {
  .MK-story-grid { grid-template-columns: 1fr; }
  .MK-collage { margin-top: 20px; }
}

/* ── Display face: Bricolage Grotesque for headings only ────────── */
.MK-h1, .MK-h2,
.MK-featrow h3,
.MK-card h3 {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
}
