:root {
  --chalk:#F8F6F1; --chalk2:#F0EBE3; --white:#FFFFFF;
  --navy:#1E1812; --navy2:#18130E;
  --crimson:#DC2626; --crimson-soft:#E84444;
  --blue:#2563EB; --blue-soft:#3B74F5;
  --emerald:#059669; --amber:#D97706;
  --ink:rgba(26,26,46,0.06); --ink2:rgba(26,26,46,0.1);
  --ink3:rgba(26,26,46,0.68);
  --ff:'Fraunces',Georgia,serif;
  --fb:'DM Sans',system-ui,sans-serif;
}

/* ── FOCUS VISIBLE ── */
:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 4px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 4px;
}

/* ── PAGE SCROLL ── */
html { overflow-y: auto; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
body { overflow-x: hidden; }
.snap-section {
  min-height: 100vh; min-height: 100dvh;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.snap-section > .section-content {
  position: relative; z-index: 10; width: 100%;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.16,1,.3,1);
}
.snap-section > .section-content.section-visible,
#hero > .section-content { opacity: 1; transform: translateY(0); }
.snap-footer {
  position: relative; z-index: 20;
}

/* ── RAIN LAYER ── */
#rain-layer {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
  opacity: 0.45;
}
.rain-card {
  position: absolute; left: 0; top: 0; border-radius: 11px; padding: 8px 12px;
  font-family: var(--fb);
  box-shadow: 0 2px 12px rgba(26,26,46,0.06);
  border: 1px solid rgba(26,26,46,0.04);
  contain: layout style paint;
  will-change: transform, opacity; pointer-events: none; opacity: 0.55;
}
.rain-card-stars { font-size: 10px; letter-spacing: 1px; margin-bottom: 3px; }
.rain-card-name { font-size: 10px; font-weight: 500; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rain-card-snippet { font-size: 9px; font-weight: 300; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rain-card-dot {
  position: absolute; top: 6px; right: 6px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--crimson);
}
.rain-card-replied {
  font-size: 7px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--emerald); margin-top: 2px;
}

/* ── HUD CONTROL PANEL ── */
#hud-panel {
  position: fixed; top: 16px; left: 16px; z-index: 999;
  background: rgba(30,24,18,0.75); backdrop-filter: blur(16px);
  border-radius: 14px; padding: 6px 10px;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#hud-panel.visible { opacity: 1; pointer-events: auto; }
.hud-control { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hud-label { font-family: var(--fb); font-size: 9px; font-weight: 500; color: rgba(255,255,255,0.5); }
#hud-replay {
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85);
  font-size: 14px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background 0.2s;
}
#hud-replay:hover { background: rgba(255,255,255,0.25); }
.hud-toggle {
  width: 32px; height: 16px; border-radius: 8px; border: none;
  background: rgba(255,255,255,0.2); position: relative; cursor: pointer;
  transition: background 0.3s;
}
.hud-toggle.on { background: var(--emerald); }
.hud-toggle-knob {
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  position: absolute; top: 2px; left: 2px; transition: left 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.hud-toggle.on .hud-toggle-knob { left: 18px; }

/* ── NAV DASHBOARD ── */
#nav-dashboard {
  position: fixed; top: 16px; right: 20px; z-index: 999;
  background: rgba(30,24,18,0.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 24px;
  padding: 8px 20px; font-family: var(--fb); font-size: 13px;
  font-weight: 500; color: #fff; cursor: pointer;
  transition: all 0.25s ease; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
#nav-dashboard:hover { background: var(--crimson); border-color: var(--crimson); }

/* ── Hero: fixed height & clip for rain animation ── */
#hero { background: var(--chalk); overflow: hidden; height: 100vh; height: 100dvh; }
#hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 500px; z-index: 8;
  background: linear-gradient(to top, var(--chalk) 30%, rgba(248,246,241,0.95) 65%, transparent 100%);
  opacity: 0; transition: opacity 0.8s ease; pointer-events: none;
}
#hero-content {
  position: relative; z-index: 10; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 24px; opacity: 0; pointer-events: none;
}
#hero-content.visible { opacity: 1; pointer-events: auto; }

#hero-warning {
  font-family: var(--ff); font-weight: 900;
  font-size: clamp(32px, 7vw, 52px); color: var(--navy);
  opacity: 0; transform: scale(1.3);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(.16,1,.3,1);
}
#hero-warning.visible { opacity: 1; transform: scale(1); }
#hero-warning.exit { opacity: 0; transform: scale(0.88); transition: opacity 0.3s, transform 0.3s; }

#hero-brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; transition: opacity 0.6s ease;
}
#hero-brand.visible { opacity: 1; }
#hero-icon { width: 64px; height: 64px; animation: pulse-icon 2.5s ease-in-out infinite; }
@keyframes pulse-icon { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

#hero-title {
  font-family: var(--ff); font-weight: 900;
  font-size: clamp(64px, 16vw, 120px); letter-spacing: -0.04em;
  line-height: 1; color: var(--navy);
  text-shadow: 0 4px 12px rgba(30,24,18,0.08);
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.5s, transform 0.6s cubic-bezier(.34,1.56,.64,1);
}
#hero-title.visible { opacity: 1; transform: scale(1); }
#hero-title .buddy { color: var(--crimson); }

#hero-tagline {
  font-family: var(--ff); font-weight: 700; font-style: italic;
  font-size: clamp(16px, 3vw, 22px); color: var(--ink3);
  opacity: 0; transition: opacity 0.6s ease; margin-top: 16px;
}
#hero-tagline.visible { opacity: 0.7; }

/* ── HERO CTA GROUP ── */
.hero-cta-group {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 32px; width: 100%; max-width: 380px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s cubic-bezier(.16,1,.3,1);
}
.hero-cta-group.visible { opacity: 1; transform: translateY(0); }

.primary-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 18px 24px; text-align: center;
  background: var(--crimson); color: var(--white);
  font-family: var(--ff); font-weight: 700; font-size: 17px;
  letter-spacing: 0;
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(220,38,38,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, letter-spacing 0.2s;
  text-decoration: none;
  position: relative; overflow: hidden;
}
.primary-cta svg, .secondary-cta svg, .price-btn svg, .ps-see-pricing svg, #nav-dashboard svg, #return-top svg, .follow-btn svg { pointer-events: none; }
.primary-cta:hover { background: var(--crimson-soft); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(220,38,38,0.4), inset 0 1px 0 rgba(255,255,255,0.15); letter-spacing: 0.5px; }
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.primary-cta::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transform: translateX(-100%);
}
.primary-cta.shimmer::after { animation: shimmer 0.8s ease-out; }

.secondary-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--fb); font-weight: 500; font-size: 14px;
  color: rgba(26,26,46,0.5); cursor: pointer; background: none;
  border: 1.5px solid var(--ink2); border-radius: 10px; padding: 12px 24px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.secondary-cta:hover { color: var(--navy); border-color: rgba(26,26,46,0.25); background: var(--chalk); }
.secondary-cta:hover svg { animation: bob 1s ease-in-out; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ── SECTION 2: PROBLEM/SOLUTION ── */
#problems { background: var(--chalk); overflow: hidden; height: 100vh; height: 100dvh; }
.ps-frame {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 32px;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(.4,0,.2,1), transform 0.5s cubic-bezier(.4,0,.2,1);
  pointer-events: none; will-change: opacity, transform;
}
.ps-frame.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ps-headline {
  font-family: var(--ff); font-weight: 900;
  font-size: clamp(28px, 5vw, 48px); color: var(--navy);
  text-align: center; max-width: 720px; line-height: 1.2; margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(248,246,241,1), 0 0 60px rgba(248,246,241,0.8), 0 0 90px rgba(248,246,241,0.5);
  margin-top: 0;
}
.ps-headline .hl-crimson { color: var(--crimson); }
.ps-headline .hl-emerald { color: var(--emerald); }
.ps-sub {
  font-family: var(--fb); font-weight: 400; font-size: 16px;
  color: rgba(26,26,46,0.6); text-align: center; max-width: 540px; line-height: 1.7;
  text-shadow: 0 0 20px rgba(248,246,241,1), 0 0 40px rgba(248,246,241,0.7);
  margin: 0;
}
.ps-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 11; }
.ps-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(26,26,46,0.12);
  border: none; cursor: pointer; transition: all 0.3s;
}
.ps-dot.active { background: var(--crimson); transform: scale(1.4); }
.ps-arrows {
  position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between;
  padding: 0 24px; z-index: 11; pointer-events: none;
}
.ps-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink2);
  background: rgba(255,255,255,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; pointer-events: auto; transition: all 0.2s;
  color: var(--ink3); font-size: 18px;
}
.ps-arrow:hover { border-color: var(--crimson); color: var(--crimson); background: var(--white); }
.ps-see-pricing {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 24px;
  font-family: var(--ff); font-weight: 700; font-style: italic; font-size: 16px;
  color: var(--emerald); background: none; border: none; cursor: pointer;
  transition: transform 0.2s;
}
.ps-see-pricing:hover { transform: translateY(2px); }
.ps-see-pricing svg { pointer-events: none; }

/* ── TACTILE PRESS STATES ── */
.primary-cta:active, .price-btn:active {
  transform: translateY(1px) scale(0.98) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* ── SECTION 3: PRICING ── */
#pricing { background: var(--chalk); min-height: auto; padding: 80px 0; }
.pricing-header { text-align: center; margin-bottom: 48px; position: relative; z-index: 15; }
.pricing-header h2 { font-family: var(--ff); font-weight: 900; font-size: clamp(28px,5vw,42px); color: var(--navy); margin-bottom: 8px; text-shadow: 0 0 30px rgba(248,246,241,1), 0 0 60px rgba(248,246,241,0.8); }
.pricing-header p { font-family: var(--fb); font-weight: 400; font-size: 16px; color: rgba(26,26,46,0.6); }
.billing-toggle-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 40px; position: relative; z-index: 15; }
.billing-label { font-family: var(--fb); font-size: 14px; cursor: pointer; transition: all 0.2s; border: none; background: none; padding: 0; }
.billing-label:hover { opacity: 0.7; }
.billing-switch {
  width: 44px; height: 24px; background: var(--ink2); border-radius: 12px;
  position: relative; cursor: pointer; transition: background 0.3s; border: none;
}
.billing-switch[aria-checked="true"] { background: var(--emerald); }
.billing-knob {
  width: 20px; height: 20px; background: var(--white); border-radius: 50%;
  position: absolute; top: 2px; left: 2px; transition: left 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.annual-badge {
  font-family: var(--fb); font-size: 11px; font-weight: 600;
  color: var(--emerald); background: rgba(5,150,101,0.08);
  border-radius: 20px; padding: 3px 10px;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.4s, transform 0.4s;
}
.annual-badge.visible { opacity: 1; transform: translateX(0); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: center; max-width: 960px; margin: 0 auto; position: relative; z-index: 15; }

.price-card {
  background: var(--white); border: 1.5px solid var(--ink2);
  border-radius: 20px; overflow: hidden; position: relative; z-index: 16;
  transition: transform 0.3s, box-shadow 0.3s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(26,26,46,0.08); }
.price-card.featured {
  border-color: var(--crimson); transform: scale(1.05);
  box-shadow: 0 20px 60px rgba(220,38,38,0.12);
  background: linear-gradient(180deg, rgba(220,38,38,0.015) 0%, white 30%);
}
.price-card.featured:hover { transform: scale(1.05) translateY(-4px); box-shadow: 0 24px 64px rgba(220,38,38,0.18); }
.price-card-bar { height: 4px; }
.price-card-inner { padding: 24px; display: flex; flex-direction: column; }
.price-card-badge {
  display: inline-block; font-family: var(--fb); font-size: 10px;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
}
.price-card-name { font-family: var(--ff); font-weight: 900; font-size: 22px; color: var(--navy); margin-bottom: 4px; }
.price-card-price {
  font-family: var(--ff); font-weight: 900; font-size: 44px; color: var(--navy); margin-bottom: 4px;
  transition: opacity 0.3s, transform 0.3s;
  min-height: 56px; display: flex; align-items: baseline;
}
.price-card-price span { font-family: var(--fb); font-weight: 300; font-size: 14px; color: var(--ink3); }
.price-card-price.changing { opacity: 0; transform: scale(0.9); }
.price-card-save { font-family: var(--fb); font-size: 12px; font-weight: 600; color: var(--emerald); margin-bottom: 8px; display: none; }
.price-card-features { list-style: none; padding: 0; margin: 20px 0; }
.price-card-features li {
  font-family: var(--fb); font-size: 13px; font-weight: 400;
  color: var(--navy); padding: 3px 0; display: flex; align-items: flex-start; gap: 8px;
}
.price-card-features li .check { color: var(--emerald); font-weight: 700; flex-shrink: 0; font-size: 14px; }
.price-card-features li .dash { color: var(--ink3); flex-shrink: 0; font-size: 14px; opacity: 0.5; }
.price-card-features li.greyed { color: var(--ink3); opacity: 0.5; }

.price-btn {
  display: block; width: 100%; padding: 14px; text-align: center;
  font-family: var(--ff); font-weight: 700; font-size: 15px;
  border: none; border-radius: 10px; cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.price-btn-primary {
  background: var(--crimson); color: var(--white);
  box-shadow: 0 6px 20px rgba(220,38,38,0.25);
}
.price-btn-primary:hover { background: var(--crimson-soft); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(220,38,38,0.35); }
.price-btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--ink2); }
.price-btn-ghost:hover { border-color: rgba(26,26,46,0.25); background: var(--chalk); }
.price-btn-muted { background: rgba(26,26,46,0.04); color: var(--ink3); }

/* ── SECTION 4: FAQ ── */
#faq { background: var(--chalk); min-height: auto; padding: 80px 0; }
.faq-header { text-align: center; margin-bottom: 48px; position: relative; z-index: 15; }
.faq-header h2 { font-family: var(--ff); font-weight: 900; font-size: clamp(28px,5vw,42px); color: var(--navy); text-shadow: 0 0 30px rgba(248,246,241,1), 0 0 60px rgba(248,246,241,0.8); }
.faq-list { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; width: 100%; position: relative; z-index: 15; }
.faq-item {
  background: var(--white); border: 1px solid var(--ink2);
  border-radius: 16px; overflow: hidden; transition: border-color 0.2s;
  position: relative; z-index: 16;
}
.faq-item:hover { border-color: var(--crimson); }
.faq-q {
  width: 100%; padding: 20px 24px; display: flex; align-items: center;
  justify-content: space-between; background: none; border: none;
  font-family: var(--ff); font-weight: 700; font-size: 17px;
  color: var(--navy); cursor: pointer; text-align: left;
}
.faq-q::after {
  content: '+'; font-family: var(--fb); font-size: 20px; font-weight: 300;
  color: var(--ink3); transition: transform 0.3s; flex-shrink: 0; margin-left: 16px;
}
.faq-item.active .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  font-family: var(--fb); font-weight: 400; font-size: 15px;
  color: rgba(26,26,46,0.6); line-height: 1.7; padding: 0 24px;
}
.faq-item.active .faq-a { max-height: 300px; padding: 0 24px 24px; }

/* ── SECTION 5: SOCIAL ── */
#social { background: var(--chalk); min-height: auto; padding: 80px 0; }
.social-header { text-align: center; margin-bottom: 40px; position: relative; z-index: 15; }
.social-header h2 { font-family: var(--ff); font-weight: 900; font-size: clamp(28px,5vw,42px); color: var(--navy); margin-bottom: 8px; text-shadow: 0 0 30px rgba(248,246,241,1), 0 0 60px rgba(248,246,241,0.8); }
.social-header p { font-family: var(--fb); font-weight: 400; font-size: 16px; color: rgba(26,26,46,0.6); max-width: 560px; margin: 0 auto; text-shadow: 0 0 20px rgba(248,246,241,1), 0 0 40px rgba(248,246,241,0.7); }
.twitter-wrap {
  max-width: 520px; margin: 0 auto 32px; background: var(--white);
  border: 1px solid var(--ink2); border-radius: 20px; overflow: hidden; padding: 16px;
  position: relative; z-index: 15;
}
.social-badges { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; position: relative; z-index: 15; }
.social-badge-card {
  background: var(--white); border: 1px solid var(--ink2);
  border-radius: 12px; padding: 12px 18px; display: flex; align-items: center; gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.social-badge-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,26,46,0.06); }
/* Foreground element lift — "sticker on glass" */
.price-card, .faq-item, .twitter-wrap, .social-badge-card {
  box-shadow: 0 2px 8px rgba(26,26,46,0.04), 0 8px 24px rgba(26,26,46,0.06);
}
.follow-btn {
  font-family: var(--fb); font-size: 12px; font-weight: 600;
  color: var(--white); background: var(--navy); border-radius: 20px;
  padding: 6px 14px; display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.builder-note {
  max-width: 480px; margin: 0 auto; text-align: center;
  font-family: var(--fb); font-weight: 300; font-style: italic;
  font-size: 14px; color: var(--ink3); line-height: 1.7;
  position: relative; z-index: 15;
  text-shadow: 0 0 20px rgba(248,246,241,1), 0 0 40px rgba(248,246,241,0.7);
}

/* ── FOOTER ── */
.wave-divider { width: 100%; height: 80px; display: block; position: relative; z-index: 20; }
footer {
  background: var(--navy2); padding: 60px 0 40px; color: rgba(255,255,255,0.6);
  font-family: var(--fb); font-size: 13px;
  scroll-snap-align: start; min-height: auto;
  position: relative; z-index: 20;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 32px;
}
.footer-logo-top {
  font-family: var(--ff); font-weight: 700; font-size: 20px;
  color: var(--white); letter-spacing: -0.025em;
}
.footer-logo-top .rb { color: var(--crimson); }
.footer-logo-div {
  width: 100%; height: 1px; margin: 2px 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.footer-logo-bot {
  font-family: var(--ff); font-weight: 700; font-size: 11px;
  color: rgba(255,255,255,0.3); letter-spacing: -0.01em;
}
.footer-logo-bot .rp { color: var(--blue); }
.f-link {
  display: block; font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 10px; transition: color 0.2s; text-decoration: none;
}
.f-link:hover { color: rgba(255,255,255,0.85); }
.footer-badge-img { opacity: 0.7; transition: opacity 0.2s; }
.footer-badge-img:hover { opacity: 1; }

/* ── RETURN TO TOP ── */
#return-top {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(30,24,18,0.75); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1); color: #fff;
  font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, background 0.2s;
}
#return-top.visible { opacity: 1; pointer-events: auto; }
#return-top:hover { background: var(--crimson); border-color: var(--crimson); }
#return-top svg { pointer-events: none; }

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ══════════════════════════════════════════════ */

@media(max-width:900px) {
  /* ── Rain: drastically reduce on mobile ── */
  .rain-card { opacity: 0.25 !important; }
  /* Hide rain layer on non-hero sections so cards don't cover pricing/social text */
  #rain-layer { opacity: 0.3; }

  /* ── Hero mobile ── */
  #hero-content { padding: 0 16px; }
  #hero-title { font-size: clamp(48px, 14vw, 80px); }
  #hero-tagline { font-size: clamp(14px, 3.5vw, 18px); margin-top: 12px; }
  .hero-cta-group { margin-top: 24px; max-width: 320px; gap: 12px; }
  .primary-cta { padding: 16px 20px; font-size: 15px; }
  .secondary-cta { padding: 10px 20px; font-size: 13px; }

  /* ── Pricing mobile: show Assistant first ── */
  .pricing-grid {
    grid-template-columns: 1fr; max-width: 360px; gap: 16px;
  }
  .pricing-header { margin-bottom: 24px; }
  .billing-toggle-wrap { margin-bottom: 24px; }
  .price-card.featured {
    transform: none !important;
    order: -1;
    border-width: 2px;
  }
  .price-card.featured:hover { transform: translateY(-4px) !important; }
  .price-card-inner { padding: 20px; }
  .price-card-price { font-size: 36px; min-height: 44px; }
  .price-card-features li { font-size: 12px; padding: 2px 0; }
  .price-card-badge { font-size: 9px; }

  /* ── Problem/solution mobile: ensure vertical centering ── */
  .ps-frame { padding: 0 48px; }
  .ps-arrow { width: 44px; height: 44px; font-size: 18px; }
  .ps-dot { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; background: none !important; transform: none !important; }
  .ps-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(26,26,46,0.12); transition: all 0.3s; }
  .ps-dot.active::after { background: var(--crimson); transform: scale(1.4); }
  .ps-headline { font-size: clamp(22px, 6vw, 36px) !important; line-height: 1.25; padding: 0 8px; }
  .ps-sub { font-size: 14px; padding: 0 8px; }
  /* Force PS section content to use dvh for proper centering on mobile browser */
  #problems .section-content { height: 100dvh; }

  /* ── Footer mobile ── */
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .social-badges { flex-direction: column; align-items: center; }

  /* ── Nav ── */
  #nav-dashboard { right: 12px; top: 12px; padding: 6px 14px; font-size: 12px; }
  .container { padding: 0 24px; }

  /* ── Section padding on mobile ── */
  #pricing, #faq, #social { padding: 40px 0; }

  /* ── FAQ mobile ── */
  .faq-q { padding: 16px 20px; font-size: 15px; }
  .faq-a { font-size: 14px; padding: 0 20px; }
  .faq-item.active .faq-a { padding: 0 20px 20px; }
  .faq-header { margin-bottom: 24px; }

  /* ── Twitter fallback styling ── */
  .twitter-wrap { min-height: 80px; display: flex; align-items: center; justify-content: center; }

  #scroll-top-btn, #return-top { bottom: 20px; right: 12px; width: 44px; height: 44px; }

  /* ── Better tap feedback on mobile ── */
  .primary-cta:active { transform: scale(0.97) !important; }
  .secondary-cta:active { transform: scale(0.97) !important; background: rgba(26,26,46,0.04); }
  .faq-q:active { background: rgba(26,26,46,0.02); }
  .price-btn:active { transform: scale(0.97) !important; }

  /* ── Prevent horizontal overflow on small screens ── */
  #main-content { overflow-x: hidden; }
}

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

  /* ── Hero small mobile ── */
  #hero-icon { width: 48px; height: 48px; }
  #hero-title { font-size: clamp(40px, 13vw, 64px); }
  #hero-tagline { font-size: 14px; }
  .hero-cta-group { max-width: 280px; }
  .primary-cta { padding: 14px 16px; font-size: 14px; border-radius: 12px; }
  .secondary-cta { padding: 10px 16px; font-size: 12px; }

  /* ── Pricing small mobile ── */
  .pricing-grid { max-width: 300px; }
  .price-card-price { font-size: 32px; }
  .price-card-name { font-size: 18px; }
  .pricing-header h2 { font-size: clamp(22px, 6vw, 32px); }
  .pricing-header p { font-size: 14px; }
}

@media(max-width:500px) {
  #hud-panel { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; right: auto; transform: translateX(-50%); }
  .footer-grid { text-align: center; }
  .f-link { text-align: center; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
