/* ===== Design tokens ===== */
:root {
  /* Declare the schemes we support so the browser (and embedded widgets like
     the LogiChat launcher iframe) render form controls, scrollbars, and iframe
     canvases for the real resolved theme — not the undeclared default. */
  color-scheme: light dark;

  --primary: #6D5EF6;
  --accent: #8B5CF6;
  --indigo: #4F46E5;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--accent) 55%, var(--indigo) 100%);

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;
  --text: #0F172A;
  --text-muted: #475569;

  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md: 0 10px 30px -12px rgba(15,23,42,.18);
  --shadow-lg: 0 24px 60px -20px rgba(79,70,229,.35);
  --maxw: 1120px;
  --space: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1020;
    --surface: #131A2E;
    --surface-2: #1B2340;
    --border: #26304F;
    --text: #E9EDF6;
    --text-muted: #A7B0C6;
    --shadow-md: 0 10px 30px -12px rgba(0,0,0,.55);
    --shadow-lg: 0 24px 60px -20px rgba(109,94,246,.45);
  }
}

/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { margin: 0 0 1rem; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.text-muted { color: var(--text-muted); }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: .35rem .75rem; border-radius: 999px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-weight: 600; font-size: 1rem; padding: .8rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ===== Focus ===== */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ===== Nav ===== */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; }
.brand-mark { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; gap: .2rem; font-size: 1.15rem; line-height: 1.1; letter-spacing: -.01em; }
.brand-text small { font-weight: 500; font-size: .6rem; letter-spacing: .16em; line-height: 1; text-transform: uppercase; color: var(--text-muted); }
.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-menu a { color: var(--text-muted); font-weight: 500; }
.nav-menu a:hover { color: var(--text); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.nav-menu .btn-primary, .nav-menu .btn-primary:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-menu { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: .25rem; padding: 1rem 20px 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); transform: translateY(-10px); opacity: 0; pointer-events: none; transition: .2s ease; }
  .nav-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-menu a { padding: .6rem 0; }
  .nav-menu .btn-primary { text-align: center; margin-top: .5rem; }
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto; height: 620px; z-index: -1;
  background: radial-gradient(60% 60% at 30% 20%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 70%),
              radial-gradient(50% 50% at 85% 15%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); }
.hero-inner { max-width: 780px; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 2rem; }
.ph-badge img { height: 54px; width: 250px; }

/* ===== Sections ===== */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin: 0 0 2.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px;
  background: var(--grad); color: #fff; font-size: 1.2rem; margin-bottom: 1rem; }

/* ===== CTA band ===== */
.cta-band { background: var(--grad); color: #fff; text-align: center; padding: clamp(3rem, 7vw, 5rem) 0; }
.cta-band h2 { color: #fff; }
.cta-inner { max-width: 620px; margin: 0 auto; }
.cta-inner .hero-cta { justify-content: center; }
.btn-on-dark { color: #fff; border-color: rgba(255,255,255,.4); }
.btn-on-dark:hover { background: rgba(255,255,255,.12); }

/* ===== Footer ===== */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2.5rem 0 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.social { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; font-size: 1.25rem; }
.social a { color: var(--text-muted); } .social a:hover { color: var(--primary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--text-muted); font-size: .9rem; } .footer-links a:hover { color: var(--text); }
.footer-copy { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .85rem; text-align: center; }

/* ===== Scroll top ===== */
/* Anchored bottom-LEFT so it never collides with the LogiChat launcher
   bubble, which the widget pins to the bottom-right. */
.scroll-top { position: fixed; left: 20px; bottom: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--grad); color: #fff; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: .2s ease; z-index: 40; }
.scroll-top.show { opacity: 1; pointer-events: auto; transform: none; }
