/* P-0196/P-0196.017: FlipSide marketing site styles.
   Palette from docs/DESIGN/theme-1-playful-geometric.md (light mode).
   Design decision: light-only — the app's default free theme is light and
   playful; the marketing site intentionally mirrors it. */

:root {
  --bg: #FFFDF5;
  --surface: #FFFFFF;
  --primary: #8B5CF6;        /* decorative / large text */
  --primary-strong: #7C3AED; /* buttons & links — AA on white */
  --primary-ink: #6D28D9;    /* small link text — AAA-leaning */
  --secondary: #F472B6;
  --tertiary: #FBBF24;
  --success: #34D399;
  --error: #EF4444;
  --ink: #1E1B4B;
  --ink-soft: #5B5875;       /* secondary text — 4.5:1+ on bg */
  --border: #E9D5FF;
  --shadow-color: #1E1B4B;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --font-heading: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 800;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--primary-ink); }
a:hover { color: var(--primary-strong); }

img, svg { max-width: 100%; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.container-narrow { max-width: 760px; }

/* ---------- Accessibility helpers ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--surface);
  color: var(--primary-ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 150ms ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--primary-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 2px solid var(--ink);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow-color);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-color); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow-color); }

.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--primary-ink); }
.btn-sm { min-height: 44px; padding: 8px 20px; font-size: 0.95rem; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.store-badge:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--primary); color: #fff; }
.store-badge small { display: block; font-size: 0.7rem; font-weight: 600; opacity: 0.85; }
.store-badge-text { line-height: 1.2; }

.store-badge-dark { box-shadow: 4px 4px 0 var(--tertiary); }
.store-badge-dark:hover { box-shadow: 5px 5px 0 var(--tertiary); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.site-nav {
  display: none;
}
.site-nav.open {
  display: block;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow-color);
  padding: 16px 20px 24px;
}
.site-nav ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-nav ul a {
  display: block;
  min-height: 48px;
  padding: 12px 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  border-radius: var(--radius-sm);
}
.site-nav ul a:hover { color: var(--primary-strong); background: #F5EFFF; }
.site-nav .btn { display: inline-flex; align-items: center; }

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open {
    display: flex;
    position: static;
    align-items: center;
    gap: 28px;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .site-nav ul {
    flex-direction: row;
    gap: 24px;
    margin: 0;
  }
  .site-nav ul a {
    min-height: 44px;
    padding: 10px 4px;
  }
}

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

.hero {
  padding: 56px 0 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, 0.10), transparent 34%),
    radial-gradient(circle at 88% 78%, rgba(244, 114, 182, 0.10), transparent 34%);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-ink);
  background: #F1E9FF;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 28px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Phone mockup (placeholder until real screenshots) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

.phone-mock {
  width: min(280px, 80vw);
  aspect-ratio: 9 / 19;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 36px;
  box-shadow: 8px 8px 0 var(--primary);
  padding: 10px;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 18px;
  background: var(--ink);
  border-radius: var(--radius-full);
  z-index: 2;
}

.phone-screen {
  height: 100%;
  background: linear-gradient(180deg, #FFFDF5 0%, #F5E9FF 100%);
  border-radius: 28px;
  padding: 36px 14px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mock-scale {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mock-beam {
  position: relative;
  width: 88%;
  height: 14px;
  background: var(--ink);
  border-radius: var(--radius-full);
  transform: rotate(-6deg);
  animation: beam-rock 4s ease-in-out infinite;
}

.mock-pan {
  position: absolute;
  top: 10px;
  width: 58px;
  padding: 6px 4px 8px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 800;
  text-align: center;
}
.mock-pan-pro { left: -22px; box-shadow: 3px 3px 0 var(--success); }
.mock-pan-con { right: -22px; box-shadow: 3px 3px 0 var(--error); }

.mock-dots {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 3px;
  margin: 4px 0 0;
  padding: 0;
}
.mock-dots li {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.mock-pan-pro .mock-dots li { background: var(--success); }
.mock-pan-con .mock-dots li { background: var(--error); }

.mock-pillar {
  width: 12px; height: 64px;
  background: var(--ink);
  border-radius: var(--radius-sm);
}

.mock-base {
  width: 96px; height: 14px;
  background: var(--ink);
  border-radius: var(--radius-full);
}

.mock-verdict {
  margin: 14px 0 4px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  box-shadow: 3px 3px 0 var(--shadow-color);
}

.mock-placeholder-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.65rem;
  color: var(--ink-soft);
}

@keyframes beam-rock {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(4deg); }
}

/* Memphis decorations */
.deco { position: absolute; }
.deco-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid var(--secondary);
  background: rgba(244, 114, 182, 0.15);
  top: 0; right: 8%;
}
.deco-triangle {
  width: 0; height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 38px solid rgba(251, 191, 36, 0.5);
  bottom: 10px; left: 6%;
}
.deco-cross {
  width: 26px; height: 26px;
  background:
    linear-gradient(var(--primary), var(--primary)) center/100% 6px no-repeat,
    linear-gradient(var(--primary), var(--primary)) center/6px 100% no-repeat;
  opacity: 0.5;
  top: 18%; left: 2%;
}

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

.section { padding: 72px 0; }
.section-alt { background: #FBF7FF; border-block: 2px solid var(--border); }

.section-lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 40em;
  margin-bottom: 40px;
}

/* How it works */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 var(--shadow-color);
  padding: 28px 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-strong);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow-color);
  margin-bottom: 16px;
}

.step-card p { color: var(--ink-soft); margin-bottom: 0; }

/* Features */
.feature-grid {
  display: grid;
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
}

.feature-card-pro {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--primary);
}

.feature-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }

.feature-card p, .ai-card p { color: var(--ink-soft); margin-bottom: 0; }

p.feature-tag {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: #EEF2FF;
  color: #3F3D66;
  border: 1.5px solid var(--border);
}
p.feature-tag-pro {
  background: var(--primary-strong);
  color: #fff;
  border-color: var(--ink);
}

/* AI section */
.ai-section {
  background:
    radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.12), transparent 40%),
    var(--bg);
}

.ai-grid {
  display: grid;
  gap: 24px;
}

.ai-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 0 var(--secondary);
  padding: 30px 26px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
}

.price-card-featured {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--primary);
}

.price-badge {
  position: absolute;
  top: -14px; right: 20px;
  background: var(--tertiary);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-full);
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 18px;
}

.price-amount {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.4rem;
}

.price-period { color: var(--ink-soft); font-size: 1rem; }

.price-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 10px;
  flex: 1;
}

.price-list li {
  padding-left: 28px;
  position: relative;
  color: var(--ink-soft);
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 800;
}

.pricing-note {
  margin-top: 32px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 46em;
  margin-inline: auto;
}

/* FAQ */
.faq-list { display: grid; gap: 14px; }

.faq-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 6px;
}

.faq-item[open] { border-color: var(--ink); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-strong);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }

.faq-item p { padding: 0 16px 16px; margin: 0; color: var(--ink-soft); }

/* Inline text links get generous hit area without breaking line rhythm */
.faq-item p a, .legal-body a, .pricing-note a {
  display: inline-block;
  padding: 10px 1px;
  margin: -10px 0;
}

/* CTA */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}
.cta-section h2, .cta-section .section-lede { color: #fff; }
.cta-section .section-lede { margin-inline: auto; }
.cta-section .hero-badges { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #DDD8F7;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #3B3572;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  margin: 0;
}

.footer-brand .brand-mark { margin-bottom: 10px; }

.footer-tagline { color: #B7AEE8; margin: 4px 0 0; }

.footer-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  color: #DDD8F7;
  text-decoration: none;
  font-weight: 600;
}
.footer-nav a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  padding-top: 20px;
  font-size: 0.85rem;
  color: #9C93D6;
}
.footer-legal p { margin: 0; }

/* ---------- Legal pages ---------- */

.legal-page { padding: 56px 0 80px; }

.legal-header-block { margin-bottom: 32px; }

.legal-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

.legal-status {
  margin: 24px 0;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #F7F1FF;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.legal-status.is-error { border-color: var(--error); background: #FEF2F2; }

.legal-body h2 { font-size: 1.4rem; margin-top: 1.6em; }
.legal-body h3 { font-size: 1.15rem; margin-top: 1.4em; }
.legal-body ul, .legal-body ol { padding-left: 1.4em; }
.legal-body li { margin-bottom: 0.4em; }
.legal-body code {
  background: #F1E9FF;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
}

/* ---------- Responsive ---------- */

@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .footer-nav ul { flex-direction: row; gap: 28px; }
}

@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mock-beam { animation: none; }
}
