/* ============================================================================
   LoopSuite marketing Design System — ported from the app DS
   (website-docs/LoopSuite Design System/tokens/*). Web-tuned: hero type scaled
   up for landing pages; everything else 1:1 with the app so the site matches.
   Shared by /v5/ and /v6/. The ONLY intended per-version difference is
   --cta-fill / accent usage (set in each version's style.css).
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Spline+Sans:wght@300..700&family=Spline+Sans+Mono:wght@400..600&family=Nunito:wght@400..900&display=swap");

:root {
  /* ===== Brand ===== */
  --brand-red: #bf4d3d;
  --brand-red-strong: #a73737;
  --brand-red-deep: #7a2828;
  --brand-ink: #181818;
  --accent: #bf4d3d;
  --accent-soft: rgba(191, 77, 61, 0.10);
  --highlight: #bf4d3d;
  --highlight-soft: rgba(191, 77, 61, 0.10);

  /* ===== Canvas / surfaces ===== */
  --canvas: #eef4ef;
  --canvas-alt: #e3ece6;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-subtle: #f4f5f5;
  --control-fill: #f1f2f2;
  --control-fill-strong: #e7e9e9;

  /* ===== Ink / text ===== */
  --ink: #181818;
  --text-primary: #181818;
  --text-secondary: #5f6670;
  --text-tertiary: #9aa0a6;
  --text-muted: #5f6670;
  --text-inverse: #ffffff;

  /* ===== Lines ===== */
  --border: rgba(24, 24, 24, 0.10);
  --border-strong: rgba(24, 24, 24, 0.18);

  /* ===== Primary action (near-black pill, like the app) ===== */
  --primary-fill: #161616;
  --primary-text: #ffffff;

  /* ===== CTA token — the A/B variable. Default = app near-black.
     /v6/ overrides --cta-fill to var(--brand-red) for max isolation. ===== */
  --cta-fill: var(--primary-fill);
  --cta-text: #ffffff;
  --cta-fill-hover: #000000;

  /* ===== Semantic ===== */
  --success: #237a4b; --success-soft: rgba(35, 122, 75, 0.10);
  --danger: #b3261e;  --danger-soft: rgba(179, 38, 30, 0.10);
  --warning: #ff8e48; --warning-soft: rgba(255, 142, 72, 0.10);

  /* ===== Fonts ===== */
  --font-display: "Spline Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Spline Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-rounded: "Nunito", "SF Pro Rounded", ui-rounded, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700; --weight-heavy: 800;

  /* ===== Type scale — app 1:1, plus web hero sizes (clamped) ===== */
  --text-hero: clamp(34px, 6.4vw, 60px);   /* web landing hero */
  --text-display: clamp(28px, 4.4vw, 40px);
  --text-h1: clamp(24px, 3.4vw, 32px);
  --text-h2: clamp(20px, 2.4vw, 24px);
  --text-h3: 18px;
  --text-title: 16px;
  --text-body: clamp(15px, 1.4vw, 17px);   /* web body slightly larger than app 14 */
  --text-base: 14px;
  --text-sm: 13px;
  --text-xs: 11px;
  --leading-tight: 1.12; --leading-snug: 1.32; --leading-normal: 1.55;
  --tracking-tight: -0.02em; --tracking-label: 0.04em;

  /* ===== Spacing / layout ===== */
  --space-2: 4px; --space-4: 8px; --space-5: 10px; --space-6: 12px; --space-7: 14px;
  --space-8: 16px; --space-9: 18px; --space-10: 22px; --space-12: 26px; --space-14: 32px;
  --space-16: 40px; --space-20: 56px; --space-24: 72px; --space-28: 96px;
  --layout-max: 1240px;
  --layout-content-max: 720px;
  --page-pad: 26px;

  /* ===== Radius (very rounded brand) ===== */
  --radius-xs: 10px; --radius-sm: 14px; --radius-control: 18px;
  --radius: 22px; --radius-lg: 28px; --radius-xl: 34px; --radius-pill: 999px;

  /* ===== Elevation ===== */
  --shadow-card: 0 6px 20px rgba(17, 20, 24, 0.06);
  --shadow-panel: 0 12px 32px rgba(17, 20, 24, 0.09);
  --shadow-pop: 0 14px 28px rgba(17, 20, 24, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(18px) saturate(140%);
  --ring: 0 0 0 3px rgba(191, 77, 61, 0.22);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-heavy); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); color: var(--text-primary); margin: 0; }
p { margin: 0; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.ds-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: var(--weight-heavy); font-size: var(--text-xs);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--text-tertiary);
}
.ds-wrap { width: 100%; max-width: var(--layout-max); margin-inline: auto; padding-inline: var(--page-pad); }
.ds-read { max-width: var(--layout-content-max); margin-inline: auto; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: var(--weight-bold); font-size: var(--text-body);
  border: 0; border-radius: var(--radius-pill); cursor: pointer;
  padding: 15px 26px; line-height: 1; text-align: center;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.ds-btn:active { transform: translateY(1px); }
.ds-btn-primary { background: var(--cta-fill); color: var(--cta-text); box-shadow: var(--shadow-card); }
.ds-btn-primary:hover { background: var(--cta-fill-hover); box-shadow: var(--shadow-pop); }
.ds-btn-lg { padding: 18px 32px; font-size: clamp(16px, 1.6vw, 18px); }
.ds-btn-ghost { background: var(--control-fill); color: var(--text-primary); }
.ds-btn-ghost:hover { background: var(--control-fill-strong); }
:focus-visible { outline: none; box-shadow: var(--ring); }

/* ── Cards ────────────────────────────────────────────────────────────── */
.ds-card {
  background: var(--surface-strong); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-10);
}
.ds-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 8px 14px; font-size: var(--text-sm); font-weight: var(--weight-semibold);
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .ds-btn { transition: none; } }
