*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #111111;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --card-bg: #f3f4f6;
  --card-bg-alt: #f7f7f7;
  --blue: #1754d8;
  --blue-hover: #1448bd;
  --star: #f5a623;
  --green: #22c55e;
  --lime: #84cc16;
  --yellow: #eab308;
  --red: #ef4444;
  --avatar-bg: #4b5563;
  --trust-bar-height: 28px;
  --sticky-cta-height: 92px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max-width: 430px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  scroll-padding-top: var(--trust-bar-height);
  scroll-padding-bottom: calc(var(--sticky-cta-height) + var(--safe-bottom));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ececec;
  color: var(--text);
  line-height: 1.4;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: clip;
}

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

button,
a,
input,
summary {
  touch-action: manipulation;
}

.app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app.sticky-visible .main {
  padding-bottom: calc(var(--sticky-cta-height) + var(--safe-bottom));
}

/* Site header — stays pinned while the page scrolls */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

/* Trust bar */
.trust-bar {
  min-height: var(--trust-bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 6px 12px;
  background: #ffffff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #888888;
}

.offer-countdown {
  gap: 8px;
}

.offer-countdown-discount {
  font-weight: 600;
  color: #111111;
}

.offer-countdown-label {
  color: #666666;
}

.offer-countdown-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #111111;
}

/* Hero */
.hero {
  background: var(--bg);
  padding: 0 12px;
}

.hero-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 732;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}

/* Product card */
.product-card {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 20px 20px 24px;
}

.product-eyebrow {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.product-tagline {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.product-highlights {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-highlights li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.product-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.cta-sub {
  margin: -8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
}

.product-card-bottom {
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rating-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.cta-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 15px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--blue);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta-btn:hover {
  background: var(--blue-hover);
}

.cta-inline {
  margin-bottom: 10px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.meta-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.meta-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.creator-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Description */
.description-section {
  padding: 0 20px 28px;
}

.description-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Stars */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stars-sm .star {
  width: 14px;
  height: 14px;
}

.stars-md .star {
  width: 18px;
  height: 18px;
}

.star {
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.star::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--star);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.star.empty::before {
  background: #e5e7eb;
}

.star.half::before {
  background: linear-gradient(90deg, var(--star) 50%, #e5e7eb 50%);
}

.star.partial-70::before {
  background: linear-gradient(90deg, var(--star) 70%, #e5e7eb 70%);
}

/* Reviews section */
.reviews-section {
  padding: 8px 20px 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 20px 24px;
  text-align: center;
}

.summary-score {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.summary-card .stars {
  justify-content: center;
  margin-bottom: 6px;
}

.summary-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Distribution bars */
.distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.dist-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
}

.dist-label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dist-star {
  display: inline-block;
  width: 10px;
  height: 10px;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.dist-star.green { background: var(--green); }
.dist-star.lime { background: var(--lime); }
.dist-star.yellow { background: var(--yellow); }
.dist-star.red { background: var(--red); }

.dist-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  min-width: 2px;
}

.dist-fill.green { background: var(--green); }
.dist-fill.lime { background: var(--lime); }
.dist-fill.yellow { background: var(--yellow); }
.dist-fill.red { background: var(--red); }

.dist-pct {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 72px;
  text-align: right;
}

/* What's included */
.includes-section {
  padding: 0 20px 28px;
}

.includes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.includes-list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

.includes-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

/* Who it's for */
.audience-section {
  padding: 0 20px 28px;
}

.audience-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audience-card {
  background: var(--card-bg-alt);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.audience-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.audience-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Top reviews */
.top-reviews-section {
  padding: 0 20px 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.see-all {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}

.see-all:hover {
  color: var(--text);
}

.review-card {
  background: var(--card-bg-alt);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
}

.review-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  flex-shrink: 0;
}

.review-avatar.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.review-avatar.photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.review-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.review-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.review-handle {
  font-size: 13px;
  color: var(--text-secondary);
}

.review-time {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}

.review-card .stars {
  margin-bottom: 8px;
}

.review-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

/* Legal footer */
.legal-notice {
  margin: 0 20px 12px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.legal-notice a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.legal-footer {
  margin-top: auto;
  padding: 8px 20px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
}

.legal-footer a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

.legal-dot {
  font-size: 12px;
  color: var(--text-muted);
  user-select: none;
}

/* FAQ */
.faq-section {
  padding: 0 20px 28px;
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  min-height: 48px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

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

.faq-question::after {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -4px;
}

.faq-item[open] .faq-question::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.faq-answer {
  padding: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Sticky footer */
.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-width);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sticky-footer.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-footer-inner {
  position: relative;
  z-index: 1;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    to top,
    #ffffff 0%,
    #ffffff 60%,
    rgba(255, 255, 255, 0.95) 80%,
    rgba(255, 255, 255, 0) 100%
  );
}

.sticky-footer .cta-btn {
  box-shadow:
    0 -2px 12px rgba(23, 84, 216, 0.12),
    0 4px 12px rgba(23, 84, 216, 0.28);
}

.cta-btn:disabled,
.cta-btn.is-loading {
  opacity: 0.75;
  cursor: wait;
}

.cta-btn.is-loading {
  pointer-events: none;
}

/* Thank you page */
.thank-you-app {
  height: auto;
  min-height: 100dvh;
}

.thank-you-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.thank-you-content {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.thank-you-loading,
.thank-you-success,
.thank-you-error {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.thank-you-loading p {
  font-size: 15px;
  color: var(--text-secondary);
}

.success-icon,
.error-icon {
  margin-bottom: 20px;
}

.thank-you-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.thank-you-subtitle {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.thank-you-email-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.download-btn {
  text-decoration: none;
}

.thank-you-error .cta-btn {
  margin-top: 8px;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 16px;
}

.access-label {
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.access-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: var(--surface);
}

.access-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.access-message.access-error {
  color: #ef4444;
}

.access-back {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.access-back:hover {
  text-decoration: underline;
}

/* Email capture popup */
html.email-popup-open,
body.email-popup-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.email-popup-open {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
}

.email-popup {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.email-popup[hidden] {
  display: none;
}

.email-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  border: none;
  cursor: pointer;
}

.email-popup-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 22px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  animation: email-popup-in 0.28s ease;
}

@keyframes email-popup-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.email-popup-close:hover {
  color: var(--text);
}

.email-popup-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.email-popup-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 8px;
  padding-right: 24px;
}

.email-popup-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.email-popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-popup-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.email-popup-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}

.email-popup-input:focus {
  outline: 2px solid rgba(23, 84, 216, 0.35);
  outline-offset: 1px;
  border-color: var(--blue);
}

.email-popup-error {
  font-size: 13px;
  color: var(--red);
  margin: 0;
}

.email-popup-legal {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.email-popup-legal a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.email-popup-skip {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.email-popup-skip:hover {
  color: var(--text-secondary);
}

.email-popup-success .email-popup-title {
  margin-top: 8px;
}

@media (max-width: 380px) {
  .product-title {
    font-size: 24px;
  }

  .product-card,
  .description-section,
  .faq-section,
  .reviews-section,
  .top-reviews-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 0 8px;
  }

  .meta-row {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .dist-pct {
    min-width: 56px;
    font-size: 11px;
  }

  .email-popup {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .email-popup-dialog {
    padding: 24px 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-footer,
  .email-popup-dialog {
    transition: none;
    animation: none;
  }
}

@media (min-width: 431px) {
  .email-popup {
    align-items: center;
  }

  .app {
    min-height: 100dvh;
  }

  .sticky-footer {
    bottom: 0;
  }
}
