/* Argumentator — public web styling.
 *
 * Brand palette (Spark theme from theme-spark-v1.md):
 *   --coral  #FF4757   primary (passion, spark)
 *   --yellow #FFD23F   accent (energy, attention)
 *   --navy   #1E3A5F   secondary / headings / dark surface
 *   --cream  #FFF8F0   light surface (warm)
 *   --mint   #7FE5A0   success / agreement
 *   --char   #2D2D2D   outlines / text
 *
 * Apple-inspired system fonts. No framework — stays small and CDN-cacheable.
 */

:root {
  /* Brand */
  --coral: #FF4757;
  --coral-soft: #FFE4E7;
  --yellow: #FFD23F;
  --yellow-soft: #FFF5D6;
  --navy: #1E3A5F;
  --cream: #FFF8F0;
  --mint: #7FE5A0;

  /* Semantic */
  --bg: #FFF8F0;
  --surface: #FFFFFF;
  --surface-elev: #FFFFFF;
  --text: #1D1D1F;
  --text-secondary: #4A4A4A;
  --muted: #6B7280;
  --border: #EFEAE3;
  --accent: var(--coral);
  --accent-hover: #E53E4E;
  --shadow-sm: 0 1px 3px rgba(30, 58, 95, 0.08);
  --shadow-md: 0 4px 16px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 12px 32px rgba(30, 58, 95, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A;
    --surface: #1A2744;
    --surface-elev: #223055;
    --text: #F5F5F7;
    --text-secondary: #C7CDD9;
    --muted: #8A94A8;
    --border: #2A3A5E;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* Keyboard navigation — visible focus ring (WCAG 2.4.7).
   yellow over any surface meets 3:1 non-text contrast on both light/dark bg.
   border-radius: inherit so the ring hugs round buttons/pills properly. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.store-badge:focus-visible,
.page-back a:focus-visible,
.legal-lang-switch a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: inherit;
}

/* Respect user preference for less motion (vestibular-disorder a11y).
   Disables hover lifts, colour transitions, decorative animations. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .feature:hover,
  .legal-section:hover,
  .support-channel:hover,
  .store-badge:hover,
  .btn:hover {
    transform: none;
  }
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

@media (min-width: 640px) {
  .page { padding: 48px 24px 56px; }
}

/* ── Hero (landing) ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  text-align: center;
  padding: 48px 20px 56px;
  background: linear-gradient(135deg, var(--coral-soft) 0%, var(--yellow-soft) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

@media (prefers-color-scheme: dark) {
  .hero {
    background: linear-gradient(135deg,
      rgba(255, 71, 87, 0.15) 0%,
      rgba(255, 210, 63, 0.12) 100%);
  }
}

/* Decorative speech-bubble marks in hero corners */
.hero::before,
.hero::after {
  content: '"';
  position: absolute;
  font-family: Georgia, serif;
  font-size: 180px;
  line-height: 1;
  color: var(--coral);
  opacity: 0.10;
  pointer-events: none;
  font-weight: 700;
}
.hero::before { top: -30px; left: 12px; transform: scaleX(-1); }
.hero::after  { bottom: -80px; right: 16px; }

.hero h1 {
  font-size: 44px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  color: var(--navy);
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .hero h1 { color: var(--text); }
}

@media (min-width: 640px) {
  .hero h1 { font-size: 56px; letter-spacing: -2px; }
}

.hero .tagline {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .hero .tagline { color: var(--text); }
}

.hero .subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 28px;
  position: relative;
}

/* ── Store badges ───────────────────────────────────────────────────── */

.store-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 52px;
  min-width: 168px;
  padding: 10px 18px;
  background: #000;
  color: #fff !important;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: #fff !important;
}
.store-badge-sup {
  font-size: 10px;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
}
.store-badge-name {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px;
}

/* ── Features ───────────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (prefers-color-scheme: dark) {
  .feature h2 { color: var(--text); }
}
.feature h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}
.feature p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Share card ─────────────────────────────────────────────────────── */

.share-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* Coral accent bar at top */
.share-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--yellow) 100%);
}

.share-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.share-statement {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  color: var(--navy);
}
@media (prefers-color-scheme: dark) {
  .share-statement { color: var(--text); }
}
@media (min-width: 640px) {
  .share-statement { font-size: 30px; }
}

.share-body {
  border-left: 3px solid var(--coral);
  padding: 4px 0 4px 16px;
  margin-bottom: 28px;
}

.share-preview {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.share-cta {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.share-cta-head {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 18px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.share-deeplink {
  margin-top: 16px;
  font-size: 14px;
}
.share-deeplink a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.share-deeplink a:hover { text-decoration: underline; }

/* ── Legal (privacy / terms) — single style across all pages ────────── */

.legal-hero {
  text-align: center;
  padding: 40px 20px 32px;
  background: linear-gradient(135deg, var(--navy) 0%, #2B4A73 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.legal-hero h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .legal-hero h1 { font-size: 40px; }
}

.legal-updated {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.legal-lang-switch {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.legal-lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px; /* WCAG touch target */
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  /* 0.75 alpha → ~4.6:1 on the navy gradient → passes WCAG AA */
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: all 0.15s ease;
}
.legal-lang-switch a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.legal-lang-switch a.active {
  background: var(--coral);
  color: #fff;
}

.legal-content {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.legal-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.legal-section:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Thin coral-yellow accent bar at top of every section card */
.legal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--yellow) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.9;
}

.legal-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  padding-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

@media (prefers-color-scheme: dark) {
  .legal-section h2 { color: var(--text); }
}

.legal-section h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 20px;
  background: var(--coral);
  border-radius: 3px;
  flex-shrink: 0;
}

.legal-section p,
.legal-section ul,
.legal-section ol { font-size: 15px; line-height: 1.65; color: var(--text); margin-bottom: 8px; }
.legal-section p:last-child,
.legal-section ul:last-child,
.legal-section ol:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol { padding-left: 20px; }
.legal-section li { margin-bottom: 6px; }

.legal-section a {
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.legal-section a:hover { border-bottom-style: solid; }

.legal-section strong { color: var(--navy); font-weight: 600; }

@media (prefers-color-scheme: dark) {
  .legal-section strong { color: var(--text); }
}

.legal-section table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal-section th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.legal-section td { padding: 10px 12px; border-top: 1px solid var(--border); }

/* Warning / caution section variant */
.legal-section-warning {
  background: var(--yellow-soft);
  border-color: #F5C842;
}
.legal-section-warning h2 { color: #8A5A00; }
.legal-section-warning h2::before { background: var(--yellow); }

@media (prefers-color-scheme: dark) {
  .legal-section-warning {
    background: rgba(255, 210, 63, 0.08);
    border-color: rgba(255, 210, 63, 0.3);
  }
  .legal-section-warning h2 { color: var(--yellow); }
}

.legal-crosslink {
  text-align: center;
  padding: 16px 0 8px;
  margin-bottom: 16px;
}
.legal-crosslink a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.legal-crosslink a:hover { text-decoration: underline; }

/* ── Support ────────────────────────────────────────────────────────── */

.support { padding: 8px 0 20px; }
.support h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
  color: var(--navy);
  line-height: 1.15;
}
@media (prefers-color-scheme: dark) {
  .support h1 { color: var(--text); }
}
.support-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

.support-channels {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.support-channel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.support-channel:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.support-channel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral) 0%, var(--yellow) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.9;
}
.support-channel h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  padding-top: 4px;
}
@media (prefers-color-scheme: dark) {
  .support-channel h2 { color: var(--text); }
}
.support-channel p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.55;
}
.support-email { font-size: 15px; }
.support-email a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted currentColor;
}
.support-email a:hover { border-bottom-style: solid; }

.support-response-time {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 12px 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── Back-link (above hero / page title) ────────────────────────────── */

.page-back { margin-bottom: 16px; font-size: 14px; }
.page-back a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.page-back a:hover { color: var(--accent); }

/* ── 404 ────────────────────────────────────────────────────────────── */

.notfound { text-align: center; padding: 60px 20px; }
.notfound h1 {
  font-size: 96px;
  color: var(--coral);
  opacity: 0.85;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -3px;
}
.notfound p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--coral);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;   /* touch target */
  line-height: 1.35;
}
.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer nav {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}
.site-footer nav a:hover { color: var(--accent); }
.site-footer-copy {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}
