/* My AI Widget — marketing site design system */

:root {
  --bg: #FAFAFC;
  --bg-raised: #FFFFFF;
  --bg-sunken: #F1F2F7;
  --ink: #14161F;
  --ink-soft: #4A4F5E;
  --ink-faint: #8A8FA3;
  --line: #E4E6EE;
  --brand-a: #1EE7B7;
  --brand-b: #6A3DE8;
  --shadow-sm: 0 1px 2px rgba(20, 22, 31, 0.05);
  --shadow-md: 0 8px 30px rgba(20, 22, 31, 0.08);
  --shadow-lg: 0 24px 70px rgba(20, 22, 31, 0.16);
  --radius: 20px;
}

:root[data-theme="dark"] {
  --bg: #10131F;
  --bg-raised: #1B2036;
  --bg-sunken: #171C33;
  --ink: #F1F2F7;
  --ink-soft: #B7BBD0;
  --ink-faint: #7A80A0;
  --line: #2A3050;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10131F;
    --bg-raised: #1B2036;
    --bg-sunken: #171C33;
    --ink: #F1F2F7;
    --ink-soft: #B7BBD0;
    --ink-faint: #7A80A0;
    --line: #2A3050;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

.gradient-text {
  background: linear-gradient(120deg, var(--brand-a), var(--brand-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(120deg, var(--brand-a), var(--brand-b));
  color: #fff;
  box-shadow: 0 10px 30px rgba(106, 61, 232, 0.28);
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(106, 61, 232, 0.38); }

.btn-ghost {
  background: var(--bg-raised);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-faint); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}
.glyph {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  position: relative;
  flex-shrink: 0;
}
.glyph::before, .glyph::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 6px;
  border-radius: 1.5px;
  background: var(--bg);
}
.glyph::before { left: 7px; }
.glyph::after { right: 7px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 15px;
}

@media (max-width: 760px) {
  .nav-links .nav-links-inner { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 60px;
  position: relative;
  overflow: clip;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-note { font-size: 13.5px; color: var(--ink-faint); }

/* ---------- Hero visual: CSS phone + widget mock ---------- */

.phone {
  position: relative;
  width: 300px;
  height: 610px;
  margin: 0 auto;
  border-radius: 52px;
  background: #05060a;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .phone { animation: none; } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #05060a;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 38px;
  background: linear-gradient(160deg, #eef1fb, #dfe3f5);
  overflow: hidden;
  position: relative;
}
.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 20px 24px 0;
  font-size: 13px;
  font-weight: 600;
  color: #14161F;
}
.widget-card {
  margin: 60px 18px 0;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  border-radius: 26px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 20px 40px rgba(30, 231, 183, 0.25);
}
.widget-card .wg-greeting {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 10px;
}
.widget-card .wg-headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 14px;
}
.widget-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  opacity: 0.95;
  margin-bottom: 8px;
  line-height: 1.4;
}
.widget-row .ic { opacity: 0.85; font-family: ui-monospace, monospace; }

.app-cards {
  margin: 16px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-card {
  background: rgba(255,255,255,0.7);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 12px;
  color: #14161F;
}
.app-card b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.app-card span { color: #5b5f70; }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 38px); margin: 10px 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 17px; }

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.step-num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* Feature grid */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.feature-card .fi {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-sunken);
  margin-bottom: 16px;
  font-size: 18px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* Themes strip */

.themes-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .themes-strip { grid-template-columns: repeat(2, 1fr); } }

.theme-swatch {
  border-radius: 16px;
  padding: 16px;
  height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.theme-swatch span {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.theme-swatch.classic {
  background: repeating-linear-gradient(135deg, #fff, #fff 10px, #eef0f5 10px, #eef0f5 20px);
}
.theme-swatch.classic span { color: var(--ink); text-shadow: none; }

/* Pricing */

.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 700px) { .pricing { grid-template-columns: 1fr; } }

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--bg-raised);
}
.plan.pro {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box,
    linear-gradient(135deg, var(--brand-a), var(--brand-b)) border-box;
  position: relative;
}
.plan-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 6px; }
.plan.pro .plan-name { color: transparent; background: linear-gradient(120deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; }
.plan-price { font-size: 34px; font-weight: 700; margin-bottom: 20px; }
.plan-price span { font-size: 15px; font-weight: 500; color: var(--ink-faint); }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plan li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink-soft); }
.plan li b { color: var(--ink); font-weight: 600; }
.check { color: var(--brand-b); flex-shrink: 0; font-weight: 700; }

/* Trust */

.trust {
  background: var(--bg-sunken);
  border-radius: 28px;
  padding: 56px;
}
@media (max-width: 700px) { .trust { padding: 32px 24px; } }
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 28px;
}
@media (max-width: 700px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: 14px; }
.trust-item .ti-mark {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  padding-top: 3px;
}
.trust-item h4 { font-size: 15.5px; margin: 0 0 4px; }
.trust-item p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* Final CTA */

.cta-band {
  text-align: center;
  padding: 96px 0;
}
.cta-band h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 16px; }
.cta-band p { color: var(--ink-soft); font-size: 17px; margin-bottom: 32px; }

/* Footer */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 24px; font-size: 14px; color: var(--ink-soft); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 13px; color: var(--ink-faint); }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Privacy / legal page ---------- */

.legal {
  padding: 64px 0 100px;
}
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(32px, 4.4vw, 44px); margin-bottom: 8px; }
.legal .updated { color: var(--ink-faint); font-size: 14px; margin-bottom: 48px; }
.legal h2 {
  font-size: 21px;
  margin: 44px 0 14px;
  padding-top: 4px;
}
.legal p, .legal li { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--brand-b); text-decoration: underline; text-underline-offset: 2px; }
:root[data-theme="dark"] .legal a { color: #A98CF5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal a { color: #A98CF5; }
}
.legal-toc {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 40px;
  background: var(--bg-raised);
}
.legal-toc p { margin: 0 0 10px; font-weight: 600; color: var(--ink); font-size: 14px; }
.legal-toc ol { margin: 0; padding-left: 20px; font-size: 14.5px; }
.legal-toc li { margin-bottom: 6px; }
.legal-toc a { text-decoration: none; color: var(--ink-soft); }
.legal-toc a:hover { color: var(--brand-b); }
