/* SmackFart web — identical design-token vocabulary to the app's
   createAppStyles factory + src/themes.ts Classic palette. */

:root {
  --safeBg: #f7edd9;
  --headerBg: #f7edd9;
  --headerBorder: #d9c4a4;
  --cardBg: #fff8ec;
  --cardBorder: #d9c4a4;
  --title: #3b1f0c;
  --primaryText: #3b1f0c;
  --mutedText: #5f4633;
  --onAccentText: #fff8ec;
  --bigButtonBg: #8ab74b;
  --bigButtonBorder: #3b1f0c;
  --bigButtonText: #2d1908;
  --neonAccent: #22c55e;
  --toxicGreen: #79ff2e;
  --warningAccent: #f59e0b;
  --dangerAccent: #ef4444;
  --armedBadgeBg: rgba(216,105,53,0.2);
  --armedBadgeBorder: #d86935;
  --armedText: #d86935;
  --hudChipBg: rgba(59,31,12,0.85);
  --hudChipText: #fff8ec;
  --glassBg: rgba(255,248,236,0.72);
  --glassBorder: rgba(59,31,12,0.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--safeBg);
  color: var(--primaryText);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Sunny-yellow backdrop radial on hero */
.page-bg {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 50% -10%, #ffe38b 0%, transparent 60%),
    radial-gradient(700px 400px at 20% 40%, rgba(121,255,46,0.18) 0%, transparent 65%),
    var(--safeBg);
  overflow-x: hidden;
}

/* Drifting fart-cloud emojis, honoring prefers-reduced-motion. */
.cloud {
  position: absolute;
  font-size: 52px;
  opacity: 0.55;
  filter: blur(0.5px);
  animation: drift 14s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}
.cloud.c1 { top: 14%; left: 7%; animation-delay: -1s; }
.cloud.c2 { top: 28%; right: 9%; animation-delay: -4s; font-size: 44px; }
.cloud.c3 { top: 60%; left: 14%; animation-delay: -7s; font-size: 64px; }
.cloud.c4 { top: 72%; right: 17%; animation-delay: -10s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-18px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .cloud { animation: none; }
}

header.topbar {
  background: var(--headerBg);
  border-bottom: 1px solid var(--headerBorder);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--glassBg);
}
.brand {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--title);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-emoji { font-size: 24px; margin-right: 8px; }
.brand-mascot {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  /* Soft drop-shadow keeps the yellow glow in the icon readable against the
     cream header bar. Falls back gracefully when filter isn't supported. */
  filter: drop-shadow(0 2px 4px rgba(59,31,12,0.2));
}
nav a {
  color: var(--primaryText);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-left: 22px;
}
nav a:hover { color: var(--armedText); }

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

/* HERO */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  margin: 0 0 14px;
  color: var(--title);
  text-shadow: 0 2px 0 rgba(121,255,46,0.35);
}
.hero h1 .accent {
  color: var(--bigButtonBg);
  text-shadow:
    0 0 12px rgba(138,183,75,0.4),
    0 2px 0 rgba(59,31,12,0.15);
}
.hero p.tagline {
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--mutedText);
  max-width: 720px;
  margin: 0 auto 32px;
  font-weight: 500;
}

/* Big mascot between two puffs above the headline. He's the face of the
   brand — make sure he's sized generously and has a soft green glow so he
   pops off the cream background. */
.hero-mascot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: -10px 0 26px;
}
.hero-mascot {
  width: 180px;
  height: 180px;
  border-radius: 32px;
  display: block;
  filter:
    drop-shadow(0 0 24px rgba(121,255,46,0.45))
    drop-shadow(0 10px 18px rgba(59,31,12,0.25));
  animation: bob 3.6s ease-in-out infinite;
}
.hero-puff {
  font-size: 56px;
  opacity: 0.8;
  animation: drift 5.6s ease-in-out infinite;
}
.hero-puff.left {
  /* Base transform keeps the mirror even when the animation is disabled
     by prefers-reduced-motion. The keyframes re-assert scaleX(-1) so the
     mirror is preserved mid-animation too. */
  transform: scaleX(-1);
  animation: drift-flipped 5.6s ease-in-out infinite;
  animation-delay: -0.8s;
}
.hero-puff.right { animation-delay: -2.1s; }
@keyframes drift-flipped {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50%      { transform: scaleX(-1) translateY(-18px); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  /* Higher specificity than .hero-puff.left / .hero-puff.right so both
     puffs stop. The base transform: scaleX(-1) on .hero-puff.left keeps
     the mirror visible while static, so the pair stays symmetrical. */
  .hero-mascot,
  .hero-puff,
  .hero-puff.left,
  .hero-puff.right { animation: none; }
}
@media (max-width: 520px) {
  .hero-mascot { width: 140px; height: 140px; border-radius: 26px; }
  .hero-puff { font-size: 40px; }
  .hero-mascot-row { gap: 10px; }
}

.armed-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--armedBadgeBg);
  border: 2px solid var(--armedBadgeBorder);
  color: var(--armedText);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  margin-bottom: 22px;
  text-transform: uppercase;
}
.armed-pill::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--dangerAccent);
  animation: pulse 1.3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .armed-pill::before { animation: none; }
}

/* CTA buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bigButtonBg);
  color: var(--bigButtonText);
  border: 3px solid var(--bigButtonBorder);
  padding: 16px 26px;
  border-radius: 18px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--bigButtonBorder), 0 10px 22px rgba(59,31,12,0.18);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--bigButtonBorder), 0 14px 28px rgba(59,31,12,0.22); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--bigButtonBorder); }
.btn.secondary {
  background: var(--hudChipBg);
  color: var(--hudChipText);
  border-color: var(--neonAccent);
  box-shadow: 0 6px 0 #3b1f0c, 0 10px 22px rgba(59,31,12,0.18);
}
.btn.secondary .url { color: var(--toxicGreen); }
.btn-sub {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.85;
}

.hero-note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--mutedText);
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Feature cards */
.features {
  padding: 60px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature {
  background: var(--cardBg);
  border: 2px solid var(--cardBorder);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 4px 0 var(--cardBorder);
}
.feature .icon { font-size: 32px; line-height: 1; margin-bottom: 8px; }
.feature h3 {
  margin: 6px 0 6px;
  font-size: 18px;
  font-weight: 900;
  color: var(--title);
}
.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--mutedText);
  line-height: 1.5;
}

/* Split section — Power user Mac */
.split {
  margin: 40px auto 60px;
  max-width: 1100px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }
.split .card {
  background: var(--cardBg);
  border: 2px solid var(--cardBorder);
  border-radius: 20px;
  padding: 28px;
}
.split .card.appstore {
  background: linear-gradient(180deg, var(--cardBg) 0%, rgba(138,183,75,0.18) 100%);
  border-color: var(--bigButtonBg);
}
.split .card.powermac {
  background: var(--cardBg);
  border-color: var(--armedBadgeBorder);
}
.split h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  color: var(--title);
  letter-spacing: 0.2px;
}
.split .price {
  font-size: 36px;
  font-weight: 900;
  color: var(--bigButtonBg);
  margin: 12px 0 6px;
  letter-spacing: -0.5px;
}
.split .price.alt { color: var(--armedText); }
.split ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 22px;
}
.split ul li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--mutedText);
  font-size: 14px;
  line-height: 1.4;
}
.split ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--neonAccent);
  font-weight: 900;
}
.split ul li.dim::before { content: "—"; color: var(--mutedText); }
.split .tag {
  display: inline-block;
  background: var(--armedBadgeBg);
  color: var(--armedText);
  border: 1.5px solid var(--armedBadgeBorder);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Footer */
footer {
  background: var(--hudChipBg);
  color: var(--hudChipText);
  padding: 40px 24px 28px;
  margin-top: 40px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}
footer a {
  color: var(--toxicGreen);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin-right: 18px;
}
footer a:hover { text-decoration: underline; }
footer small {
  color: var(--hudChipText);
  opacity: 0.65;
  font-size: 12px;
}

/* Content pages (privacy / support / terms) */
.doc {
  max-width: 760px;
  margin: 60px auto 80px;
  padding: 0 24px;
}
.doc h1 {
  font-size: 36px;
  font-weight: 900;
  margin: 0 0 4px;
  color: var(--title);
}
.doc .updated {
  color: var(--mutedText);
  font-size: 13px;
  margin-bottom: 28px;
}
.doc h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--title);
  margin: 32px 0 6px;
}
.doc p, .doc li {
  color: var(--primaryText);
  font-size: 16px;
  line-height: 1.65;
}
.doc ul { padding-left: 22px; }
.doc code {
  background: var(--cardBg);
  border: 1px solid var(--cardBorder);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
}
