/* ThoughtBounce marketing site — calm productivity with playful motion.
   Palette + design direction: docs/ECOSYSTEM_PLAN.md + pricing spec 2026-07. */
:root {
  --bg: #f8faff;
  --surface: #ffffff;
  --text: #172033;
  --muted: #5d6980; /* AA on #f8faff and #fff */
  --accent: #5b5cff;
  --accent-2: #8b7cff;
  --accent-soft: #eef0ff;
  --loop: #ffb86b; /* warm accent — open loops only, use sparingly */
  --border: #e4e8f5;
  --navy: #0d1321;
  --navy-text: #dbe2f4;
  --radius: 20px;
  --shadow: 0 12px 35px rgba(31, 41, 80, 0.06);
  --shadow-lift: 0 18px 45px rgba(31, 41, 80, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c;
    --surface: #1a1d29;
    --text: #e8eaf2;
    --muted: #a3adc2;
    --accent: #7c89ff;
    --accent-2: #9d8fff;
    --accent-soft: #23263c;
    --border: #2a2e40;
    --navy: #0a0f1b;
    --navy-text: #dbe2f4;
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 18px 45px rgba(0, 0, 0, 0.5);
  }
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }

/* ---------- Bounce motif ---------- */
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}
.bounce-dot { animation: gentleBounce 2.4s ease-in-out infinite; }
@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .bounce-dot { animation: none; }
  .card, .btn { transition: none !important; }
  html { scroll-behavior: auto; }
}
h2.section-title .dot { width: 9px; height: 9px; margin-right: 10px; vertical-align: 6px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 22px; height: 62px; }
.logo { font-weight: 700; font-size: 1.12rem; color: var(--text); display: flex; align-items: center; gap: 9px; }
nav.main { display: flex; gap: 18px; margin-left: auto; align-items: center; }
nav.main a { color: var(--muted); font-size: 0.95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 12px;
  font-weight: 600; font-size: 0.98rem; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 20px rgba(91, 92, 255, 0.28);
}
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(91, 92, 255, 0.36); }
.btn.ghost { background: transparent; }

/* ---------- Hero ---------- */
.hero-bg {
  background:
    radial-gradient(900px 420px at 20% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(700px 380px at 85% 5%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
}
.hero { text-align: center; padding: 84px 0 40px; }
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.1rem);
  line-height: 1.08; letter-spacing: -1.5px; font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: 1.18rem; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.trust { margin-top: 18px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Cross-device flow mockup ---------- */
.flow { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 42px 0 26px; }
.flow-connector { display: flex; align-items: center; gap: 5px; padding: 0 4px; }
.flow-connector .dot { width: 7px; height: 7px; opacity: 0.35; }
.flow-connector .dot:nth-child(2) { opacity: 0.65; animation-delay: 0.2s; }
.flow-connector .dot:nth-child(3) { opacity: 1; animation-delay: 0.4s; }
.device {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; text-align: left; width: 272px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.device:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.device .label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 7px;
}
.device .label .dot { width: 7px; height: 7px; }
.device .fakebox {
  border: 1.5px solid var(--accent); border-radius: 12px; padding: 13px;
  color: var(--muted); font-size: 0.94rem; background: var(--accent-soft);
}
.device ul { list-style: none; padding: 10px 2px 0; font-size: 0.9rem; color: var(--muted); }
.device ul li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.device ul li:last-child { border-bottom: none; }
.chip { background: var(--accent-soft); color: var(--accent); border-radius: 20px; padding: 1px 10px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.chip.loop { background: color-mix(in srgb, var(--loop) 22%, transparent); color: #9a5b13; }
@media (prefers-color-scheme: dark) { .chip.loop { color: var(--loop); } }
@media (max-width: 900px) {
  .flow { flex-direction: column; }
  .flow-connector { flex-direction: column; padding: 4px 0; }
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.tint { background: color-mix(in srgb, var(--accent-soft) 45%, var(--bg)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2.section-title { text-align: center; font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.5px; margin-bottom: 10px; }
p.section-sub { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto 42px; font-size: 1.05rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card h3 { font-size: 1.08rem; margin-bottom: 7px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card .icon {
  width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 14px;
}
.card .step { color: var(--accent); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.2px; display: block; margin-bottom: 6px; }

/* ---------- Privacy (dark anchor) ---------- */
section.privacy-block { background: var(--navy); color: var(--navy-text); }
section.privacy-block h2.section-title { color: #ffffff; }
section.privacy-block p.section-sub { color: var(--navy-text); }
section.privacy-block .card {
  background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}
section.privacy-block .card h3 { color: #fff; }
section.privacy-block .card p { color: var(--navy-text); }
section.privacy-block .card .icon { background: rgba(255, 255, 255, 0.08); }
section.privacy-block a { color: #a8b6ff; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; max-width: 820px; margin: 0 auto; align-items: start; }
.plan { position: relative; }
.plan h3 { font-size: 1.2rem; }
.plan .for { color: var(--muted); font-size: 0.92rem; margin: 2px 0 10px; }
.plan .price { font-size: 2.3rem; font-weight: 800; letter-spacing: -1px; }
.plan .per { color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.plan ul { padding: 12px 0 20px 2px; color: var(--muted); font-size: 0.95rem; list-style: none; }
.plan ul li { padding: 5px 0 5px 26px; position: relative; }
.plan ul li::before {
  content: ""; position: absolute; left: 6px; top: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.plan.featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  box-shadow: 0 20px 50px rgba(91, 92, 255, 0.18);
  padding-top: 34px; padding-bottom: 30px;
}
.plan .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  border-radius: 20px; padding: 4px 16px; font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.plan .footnote { color: var(--muted); font-size: 0.8rem; margin-top: 12px; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; margin-bottom: 10px;
}
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq summary::marker { color: var(--accent); }
details.faq p { color: var(--muted); padding-top: 10px; font-size: 0.96rem; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.8px; margin-bottom: 10px; }
.final-cta p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 0.9rem; }
footer.site .cols { display: flex; gap: 52px; flex-wrap: wrap; margin-bottom: 22px; }
footer.site h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px; color: var(--text); }
footer.site a { color: var(--muted); display: block; padding: 2.5px 0; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 20px; }
.legal h1 { margin-bottom: 4px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.legal h2 { margin: 28px 0 8px; font-size: 1.25rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 22px; }

@media (max-width: 640px) {
  nav.main a.hide-sm { display: none; }
  .hero { padding: 56px 0 28px; }
  section { padding: 52px 0; }
}
