/* ============================================================
   MRH — "Refined Craft" landing system
   Tokens lifted directly from lib/theme/mrh_theme.dart
   ============================================================ */

:root {
  /* Color — primary */
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-surface: #EEF2FF;
  --primary-glow: rgba(79, 70, 229, 0.15);

  /* Color — amber accent */
  --amber: #E8930C;
  --amber-surface: #FFF7ED;

  /* Color — semantic */
  --success: #059669;
  --success-surface: #ECFDF5;
  --info: #0284C7;
  --info-surface: #F0F9FF;
  --error: #DC2626;
  --error-surface: #FEF2F2;

  /* Color — surfaces */
  --background: #F6F7FB;
  --surface: #FFFFFF;
  --surface-muted: #EEF0F6;
  --surface-warm: #FAF8F6;
  --border: #DFE3ED;
  --border-subtle: #ECEFF5;

  /* Color — text */
  --text: #101828;
  --text-soft: #667085;
  --text-muted: #98A2B3;

  /* Gradients */
  --grad-amber: linear-gradient(135deg, #F0A92C 0%, #E8930C 55%, #E07B05 100%);
  --grad-indigo: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  --grad-dark: linear-gradient(135deg, #0F172A 0%, #312E81 100%);

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 16px rgba(16, 24, 40, 0.08);
  --shadow-elevated: 0 2px 4px rgba(16, 24, 40, 0.04), 0 12px 32px rgba(16, 24, 40, 0.12);
  --shadow-glow: 0 8px 20px rgba(79, 70, 229, 0.15);
  --shadow-amber-glow: 0 18px 48px rgba(224, 123, 5, 0.28);

  /* Radii */
  --r-input: 14px;
  --r-btn: 16px;
  --r-card: 20px;
  --r-card-lg: 28px;
  --r-pill: 999px;

  /* Type */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--primary-surface); color: var(--primary-dark); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0;
}
.eyebrow.muted { color: var(--text-muted); }

h1, h2, h3 { font-family: var(--font-display); color: var(--text); margin: 0; }

.h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.h3 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}
.body { font-size: 16px; font-weight: 500; line-height: 1.55; color: var(--text-soft); margin: 0; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-tight { padding: clamp(56px, 7vw, 96px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  border-radius: var(--r-btn); padding: 15px 26px; border: none; cursor: pointer;
  text-decoration: none; line-height: 1; white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--grad-indigo); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79,70,229,0.28); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-card); }
.btn-white {
  background: #fff; color: var(--primary); border-radius: var(--r-pill);
  box-shadow: 0 8px 20px rgba(16,24,40,0.14);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16,24,40,0.2); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.btn-lg { padding: 18px 34px; font-size: 18px; }
.btn-sm { padding: 11px 18px; font-size: 15px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
  padding: 26px;
}
.card-lg { border-radius: var(--r-card-lg); padding: 32px; }
.lift { transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease, border-color .22s ease; }
.lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-elevated); border-color: var(--border-subtle); }

/* ---------- Icon chip ---------- */
.chip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 13px;
  background: var(--primary-surface); color: var(--primary); flex: none;
}
.chip-icon svg { width: 24px; height: 24px; }
.chip-icon.amber { background: var(--amber-surface); color: var(--amber); }
.chip-icon.success { background: var(--success-surface); color: var(--success); }
.chip-icon.info { background: var(--info-surface); color: var(--info); }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: var(--r-pill);
}
.badge.info { background: var(--info-surface); color: var(--info); }
.badge.amber { background: var(--amber-surface); color: var(--amber); }
.badge.success { background: var(--success-surface); color: var(--success); }
.badge.primary { background: var(--primary-surface); color: var(--primary); }

.pill-outline {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-pill); padding: 12px 18px; font-weight: 600; font-size: 15px;
  cursor: default; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.pill-outline:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--primary-surface); color: var(--primary); }
.pill-outline.selected { background: var(--primary-surface); color: var(--primary); border-color: transparent; }
.pill-outline svg { width: 18px; height: 18px; }

/* ---------- Segmented toggle ---------- */
.segmented {
  display: inline-flex; background: var(--surface-muted); border-radius: var(--r-pill);
  padding: 4px; gap: 2px;
}
.segmented button {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  border: none; background: transparent; color: var(--text-soft);
  padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer;
  transition: all .18s ease;
}
.segmented button.active {
  background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(16,24,40,0.12);
}

/* ---------- Reveal on scroll ---------- */
/* opacity flips instantly (so static/throttled captures + print never get stuck hidden);
   only the transform slides — purely decorative motion. */
.reveal { opacity: 0; transform: translateY(20px); transition: transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative; width: 300px; border-radius: 44px; background: #0c0c10;
  padding: 11px; box-shadow: 0 30px 70px rgba(16,24,40,0.28), 0 8px 18px rgba(16,24,40,0.16);
  flex: none;
}
.phone-screen { border-radius: 34px; overflow: hidden; background: var(--background); display: block; }
.phone-screen img { width: 100%; display: block; }
.phone-notch {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 26px; background: #0c0c10; border-radius: 0 0 16px 16px; z-index: 2;
}

/* ---------- Floating proof cards ---------- */
.float-card {
  position: absolute; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-elevated); border: 1px solid var(--border-subtle);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.float-toast {
  position: absolute; background: var(--success); color: #fff; border-radius: var(--r-pill);
  box-shadow: 0 14px 34px rgba(5,150,105,0.35); padding: 12px 18px;
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.floaty-a { animation: floaty 5.5s ease-in-out infinite; }
.floaty-b { animation: floaty 6.5s ease-in-out infinite; animation-delay: -2s; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border-subtle); border: 0; }
.glow-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.glow-bg::before {
  content: ''; position: absolute; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.10) 0%, rgba(79,70,229,0) 70%);
  top: -180px; right: -120px;
}
.glow-bg::after {
  content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,147,12,0.10) 0%, rgba(232,147,12,0) 70%);
  bottom: -160px; left: -120px;
}

.avatars { display: flex; align-items: center; }
.avatars .av {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff;
  margin-left: -10px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #fff;
}
.avatars .av:first-child { margin-left: 0; }

.stars { display: inline-flex; gap: 2px; color: var(--amber); }
.stars svg { width: 16px; height: 16px; fill: currentColor; }
