/* PoopAI Landing Page Styles */

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-light: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --shadow-card: 0 4px 15px 0 rgba(0, 0, 0, 0.1);
  --tp-card-width: 600px; /* unified width for hero + trained TP cards */
  --hero-card-width: var(
    --tp-card-width
  ); /* updated via JS to exact measured hero width */
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* prevent horizontal scroll on mobile root */
  scroll-snap-type: y mandatory;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: transparent;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body * {
  max-width: 100%;
}

/* toilet water background */
.water-bg {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  background: radial-gradient(
      circle at 50% 42%,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 255, 255, 0.22) 40%,
      rgba(0, 0, 0, 0.23) 95%
    ),
    radial-gradient(
      circle at 50% 55%,
      #c7f1ff 0%,
      #b1e5f6 35%,
      #8dcede 70%,
      #558ca2 100%
    );
  background-attachment: fixed; /* ensure static appearance */
  overflow: hidden;
}

/* Background overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(120, 119, 198, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(120, 119, 198, 0.2) 0%,
      transparent 50%
    );
  z-index: -1;
  pointer-events: none;
}

/* On small touch devices, avoid fixed attachment to reduce compositing darkening and lighten overlay */
@media (max-width: 850px) {
  .water-bg {
    background-attachment: scroll;
  }
  body::before {
    opacity: 0.7;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Allow FAQ container to show floating overflow */
#faq .container {
  overflow: visible;
  position: relative;
  padding-top: 2.25rem; /* extra headroom above floating question card */
}

/* Hero Section */
.hero {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  text-align: center;
  padding: 18vh 0 0;
  margin-top: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* External floating hero icon */
.hero-float-icon {
  position: absolute !important;
  top: 4rem !important;
  left: 50% !important;
  width: clamp(191px, 30vw, 293px);
  height: clamp(191px, 30vw, 293px);
  pointer-events: none;
  z-index: 2;
  animation: heroFloatSubtle 6s ease-in-out infinite;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  /* Ensure no background bleed-through during load */
  isolation: isolate;
  /* Start invisible to prevent gradient bleed-through during initial positioning */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Show hero icon after positioning is complete */
.hero-float-icon.positioned {
  opacity: 1;
}

/* Force all potential backgrounds to be transparent */
.hero-float-icon,
.hero-float-icon::before,
.hero-float-icon::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

.hero-float-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  outline: none !important;
  /* Prevent background bleed-through */
  position: relative;
  z-index: 1;
}
@keyframes heroFloatSubtle {
  0%,
  100% {
    transform: translateX(-50%) translateY(0px);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem) translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(1.5rem);
  }
}
/* Positioning handled by JS; provide a minimal fallback placing it near top-right */
@media (max-width: 900px) {
  .hero-float-icon {
    width: clamp(220px, 45vw, 350px);
    height: clamp(220px, 45vw, 350px);
  }
}

.hero-content {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.2rem 2.2rem 0.5rem;
  box-shadow: var(--shadow-light);
  max-width: var(--tp-card-width);
  animation: fadeInUp 0.8s ease-out;
  position: relative;
  transform: translateY(1.5rem);
}

.hero-icon {
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

.hero-logo {
  width: 8rem;
  height: 8rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Hero title at the top of the page */
.hero-title-top {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  padding: 0;
  opacity: 0.4;
  background: linear-gradient(
    135deg,
    #fceabb 0%,
    #f8dc85 15%,
    #f6ce55 32%,
    #f3bc30 52%,
    #eba410 74%,
    #d88900 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    135deg,
    #fceabb 0%,
    #f8dc85 15%,
    #f6ce55 32%,
    #f3bc30 52%,
    #eba410 74%,
    #d88900 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.hero-tagline-lower {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.hero-description {
  text-align: center;
  margin-bottom: 1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-description-main {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.hero-description-sub {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-light);
  letter-spacing: -0.02em;
}

/* Download Buttons */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Off-card larger floating buttons */
.download-buttons-offcard {
  margin-top: 0.5rem;
  margin-bottom: 0;
  position: relative;
  z-index: 3;
  animation: offCardFloat 9s ease-in-out infinite;
}
.download-buttons-offcard .app-store-btn img {
  height: 84px;
  width: auto;
}
.download-buttons-offcard .android-btn img {
  height: 108px;
}
@keyframes offCardFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@media (max-width: 700px) {
  .download-buttons-offcard .app-store-btn img {
    height: 68px;
  }
  .download-buttons-offcard .android-btn img {
    height: 90px;
  }
  .download-buttons-offcard {
    margin-top: 0.4rem;
  }
}

/* Short viewport height adjustment: move buttons closer to hero card */
@media (max-height: 700px) {
  .download-buttons-offcard {
    margin-top: 0.3rem !important;
  }
}

/* Download CTA above buttons */
.download-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 1.6rem;
  animation: ctaPulse 2s ease-in-out infinite;
}

.download-cta-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-cta-arrow {
  font-size: 1.5rem;
  color: var(--accent-color);
  animation: bounce 2s infinite;
}

.download-cta-arrow-left {
  animation: bounce 2s infinite;
}

.download-cta-arrow-right {
  animation: bounce 2s infinite reverse;
}

@keyframes ctaPulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.app-store-btn {
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.app-store-btn:hover {
  transform: translateY(-3px);
}

.app-store-btn img {
  height: 60px;
  width: 180px;
  object-fit: contain;
  display: block;
}

/* Specific sizing for Google Play badge to match App Store badge */
.android-btn img {
  height: 80px;
  object-fit: cover;
}

/* Learn More button */
.learn-more-fixed {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 50;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.25s ease;
  animation: learnMoreFloat 7s ease-in-out infinite;
}
.learn-more-fixed:hover {
  color: #111;
  text-decoration: none;
}
.learn-more-fixed:focus-visible {
  outline: 2px solid #f0c04c;
  outline-offset: 3px;
}

.learn-more-fixed.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes learnMoreFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

@media (max-height: 700px) {
  .learn-more-fixed {
    bottom: 0.5rem; /* tighter on small mobile screens */
    font-size: 0.95rem;
  }
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.faq {
  padding: 1.5rem 0 1.2rem;
  overflow: visible;
  margin-top: -0.3rem;
}

/* ===== FAQ (radio list + answers below) ===== */
.faq-stack {
  max-width: var(--hero-card-width, var(--tp-card-width, 600px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.1rem;
  position: relative;
  padding-top: 1.4rem;
  overflow: visible;
}

.faq-questions-card {
  position: relative;
  padding: 0 0 0.5rem;
  background: none;
  border: none;
  box-shadow: none;
  clip-path: none !important;
}

/* Reduce upward travel for floating sheets within FAQ to avoid clipping further */
#faq .tp-sheet.tp-float {
  animation: faqLocalFloat 9s ease-in-out infinite;
}
@keyframes faqLocalFloat {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tp-rot, 0deg));
  }
  50% {
    transform: translateY(-6px) rotate(calc(var(--tp-rot, 0deg) + 1deg));
  }
}
.faq-main-title {
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 1.05rem;
  color: #2a2a2a;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.faq-question-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}
.faq-q-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #2a2a2a;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.85rem 1rem 0.85rem 0.9rem;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  line-height: 1.3;
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.5s ease;
}
.faq-q-option:hover {
  background: rgba(255, 255, 255, 0.75);
}
.faq-q-option.is-active {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px -5px rgba(0, 40, 60, 0.25);
}
.faq-q-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.faq-q-option span {
  flex: 1;
}
.faq-q-option:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8),
    0 0 0 6px rgba(90, 160, 210, 0.4);
}

/* Moving indicator icon (re-parented into active label) */
.faq-active-indicator {
  position: absolute;
  left: -48px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}
.faq-active-indicator img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: faqIndicatorFloat 7s ease-in-out infinite;
}
@keyframes faqIndicatorFloat {
  0%,
  100% {
    transform: translateY(-3px);
  }
  50% {
    transform: translateY(5px);
  }
}
@media (max-width: 800px) {
  .faq-active-indicator {
    left: -44px;
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 600px) {
  .faq-active-indicator {
    left: -40px;
    width: 32px;
    height: 32px;
  }
}

/* poop icon static */
.faq-active-indicator img {
  animation: none !important;
  transform: none !important;
}

/* A little extra top space so the floating question card */
.faq-stack {
  padding-top: 0.75rem;
}

/* Answers block below */
.faq-answers-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-answers-carousel {
  position: relative;
}
.faq-answers-viewport {
  overflow: visible;
  width: 100%;
}
.faq-answers-track {
  display: flex;
  transition: transform 0.75s cubic-bezier(0.55, 0.1, 0.25, 1);
}
.faq-answer-card {
  flex: 0 0 100%;
  padding: 1.55rem 1.55rem 1.3rem;
  opacity: 0;
  transition: opacity 0.55s ease;
  display: flex;
  align-items: flex-start;
}
.faq-answer-card.is-active {
  opacity: 1;
}
.faq-answer-text {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.52;
  color: #1f1f1f;
  font-weight: 500;
}
@media (max-width: 600px) {
  .faq-answer-text {
    font-size: 1rem;
    line-height: 1.48;
  }
  .faq-answer-card {
    padding: 1.3rem 1.25rem 1.1rem;
  }
}

.faq-answers-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
}
.faq-answer-dot {
  --scale: 1;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.48) 45%,
    rgba(190, 230, 255, 0.28) 70%,
    rgba(140, 190, 240, 0.14) 100%
  );
  box-shadow: 0 3px 6px -3px rgba(0, 40, 70, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 3px 0 rgba(255, 255, 255, 0.65) inset,
    0 -2px 5px -3px rgba(140, 200, 255, 0.3) inset;
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.55s ease, box-shadow 0.7s ease, filter 0.7s ease,
    opacity 0.6s ease;
  animation: bubbleFloat 8s ease-in-out infinite;
}
.faq-answer-dot.is-active {
  --scale: 1.22;
  box-shadow: 0 5px 12px -4px rgba(0, 60, 110, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.7) inset,
    0 2px 5px 0 rgba(255, 255, 255, 0.8) inset,
    0 -3px 7px -3px rgba(120, 200, 255, 0.4) inset,
    0 0 14px -2px rgba(90, 180, 255, 0.5);
  filter: brightness(1.04) saturate(1.04);
}
.faq-answer-dot:hover {
  transform: scale(calc(var(--scale) * 1.08));
}
.faq-answer-dot:focus {
  outline: none;
}
.faq-answer-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Stagger FAQ answer dot floating so they don't move in unison */
.faq-answers-dots .faq-answer-dot:nth-child(1) {
  animation-duration: 7.6s;
  animation-delay: -1.2s;
}
.faq-answers-dots .faq-answer-dot:nth-child(2) {
  animation-duration: 8.4s;
  animation-delay: -2s;
}
.faq-answers-dots .faq-answer-dot:nth-child(3) {
  animation-duration: 7.9s;
  animation-delay: -0.6s;
}
.faq-answers-dots .faq-answer-dot:nth-child(4) {
  animation-duration: 8.6s;
  animation-delay: -2.8s;
}

/* FAQ answer cards gentle float; question container static */
.faq-answer-card.tp-sheet {
  animation: tpFloat 9s ease-in-out infinite;
}
.faq-answer-card.tp-sheet:hover {
  transform: translateY(0) rotate(var(--tp-rot, 0deg));
  box-shadow: none;
}

/* Narrow layout adjustments */
@media (max-width: 700px) {
  .faq-questions-card {
    padding: 2rem 1.6rem 2rem;
  }
  .faq-main-title {
    margin-bottom: 1rem;
  }
  .faq-q-option {
    font-size: 0.95rem;
    padding: 0.75rem 0.85rem 0.75rem 0.75rem;
  }
}
@media (max-width: 480px) {
  .faq-stack {
    gap: 1.4rem;
  }
  .final-cta-inline {
    flex-direction: row;
    gap: 0.45rem;
  }
  .faq-main-title {
    font-size: 1.4rem;
  }
  .faq-q-option {
    border-radius: 12px;
  }
  /* Slightly vertical breathing w/ narrow sides */
  .final-cta-card.tp-sheet.tp-hero {
    padding: 0.62rem 0.5rem 0.67rem !important;
  }
  .final-cta-card .final-cta-inline {
    gap: 0.45rem;
  }
}

/* Footer */
.footer {
  background: transparent;
  backdrop-filter: none;
  padding: 3rem 0 1rem;
  color: white;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-brand p {
  font-size: 1.5rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
  background: transparent;
  backdrop-filter: none;
}

.social-link:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.12);
}

.social-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  display: block;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

/* Legal Pages Styles */
.legal-page {
  min-height: 100vh;
  padding: 2rem 0;
}

.legal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--shadow-light);
  max-width: 800px;
  margin: 0 auto;
}

.back-link {
  margin-bottom: 2rem;
}

.back-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  display: inline-block;
}

.back-link a:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.last-updated {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-style: italic;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.legal-section p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.disclaimer {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.legal-note {
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.legal-note p {
  color: var(--text-light);
  font-size: 0.9rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
  }
  66% {
    transform: translateY(-10px) rotate(240deg);
  }
}

/* Medium screens (between tablet and desktop) */
@media (min-width: 769px) and (max-width: 900px) {
  .hero-float-icon {
    width: clamp(150px, 25vw, 220px) !important;
    height: clamp(150px, 25vw, 220px) !important;
  }
}

/* Desktop specific styles */
@media (min-width: 901px) {
  .hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin-top: 0 !important;
    min-height: 100vh !important;
    height: 100vh !important;
    padding-top: 8vh !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .download-cta {
    margin-top: 3.5rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title-top {
    position: absolute;
    top: 1vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(4rem, 12vw, 8rem);
    margin: 0;
    padding: 0;
  }

  .hero-description-main {
    font-size: clamp(2.1rem, 6vw, 2.7rem);
    margin-bottom: 0.2rem;
  }

  .hero-description-sub {
    font-size: clamp(1.6rem, 4.5vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 100vh !important;
    height: 100vh !important;
    margin-top: 0 !important;
    padding: 36vh 2rem 4rem 2rem !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-tagline {
    font-size: 1.2rem;
  }

  .hero-content {
    max-width: var(--tp-card-width);
  }

  .download-cta {
    margin-top: 1.5rem;
    margin-bottom: 1.6rem;
  }

  .download-cta-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0rem;
  }

  .download-cta-arrow {
    font-size: 1.3rem;
  }

  .app-store-btn img {
    height: 50px;
    width: 150px;
    object-fit: contain;
  }

  /* Mobile-specific sizing for Google Play badge */
  .android-btn img {
    height: 50px;
    width: 170px;
    object-fit: cover;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 100%;
  }

  .faq-accordion {
    margin: 0 1rem;
  }

  .faq-question {
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
  }

  .faq-answer.open {
    padding: 0 1.5rem 1.25rem;
  }

  /* Smaller cards on mobile */
  .feature-card {
    padding: 1.5rem 1rem;
  }

  .feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .feature-card p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .how-it-works {
    flex-direction: column;
    gap: 3rem;
  }

  .step-arrow {
    transform: rotate(90deg);
    margin: 0;
  }

  .step-card {
    max-width: 100%;
    margin: 0 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-title-top {
    position: absolute;
    top: 1vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(5rem, 15vw, 10rem);
    margin: 0;
    padding: 0;
  }

  .hero-description-main {
    font-size: clamp(1.8rem, 5vw, 2.1rem);
    margin-bottom: 0.15rem;
  }

  .hero-description-sub {
    font-size: clamp(1.4rem, 4vw, 1.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 100vh !important;
    height: 100vh !important;
    margin-top: 0 !important;
    padding: 35vh 1rem 4rem 1rem !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-title {
    font-size: 4rem;
  }
  .hero-logo {
    width: 4rem;
    height: 4rem;
  }

  .feature-card,
  .faq-item {
    padding: 1.5rem;
  }

  .download-cta {
    margin-top: 1rem;
    margin-bottom: 1.6rem;
  }

  .hero-content {
    max-width: var(--tp-card-width);
  }

  /* Firefox mobile specific fixes */
  @supports (-moz-appearance: none) {
    .hero {
      min-height: 100dvh !important;
      height: 100dvh !important;
      padding-top: 0.5rem !important;
    }

    .hero-content {
      transform: translateY(1.5rem) !important;
    }
  }
}

/* Very small mobile screens */
@media (max-height: 669px) {
  .hero-float-icon {
    width: clamp(180px, 35vw, 280px) !important;
    height: clamp(180px, 35vw, 280px) !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.9);
    --text-light: #333;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .footer-social {
    display: none;
  }

  body {
    background: white;
  }

  .hero-content,
  .feature-card,
  .faq-item {
    background: white;
    border: 1px solid #ccc;
  }
}

/* ============================= */
/* Toilet Paper Sheet Components */
/* ============================= */
.tp-sheet {
  --tp-base: #fffefa;
  --tp-shadow: rgba(0, 60, 90, 0.08);
  --tp-edge: rgba(0, 0, 0, 0.08);
  --tp-gloss: rgba(255, 255, 255, 0.9);
  background: linear-gradient(
      180deg,
      var(--tp-gloss) 0%,
      rgba(255, 255, 255, 0.85) 10%,
      var(--tp-base) 58%,
      #f8f8f4 75%,
      #ebeae5 100%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.65) 0 14px,
      rgba(250, 250, 250, 0.55) 14px 28px
    ),
    radial-gradient(
      circle at 30% 25%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0) 60%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0) 60%
    );
  border: 1px solid var(--tp-edge) !important;
  border-radius: 22px 22px 30px 30px;
  box-shadow: 0 4px 10px -2px var(--tp-shadow),
    0 14px 32px -6px rgba(0, 40, 60, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 2px rgba(0, 0, 0, 0.08) inset, 0 0 30px -8px rgba(140, 210, 230, 0.45);
  position: relative;
  overflow: hidden;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  z-index: 0;
}

/* Hero specific enhancements */
.tp-sheet.tp-hero {
  border-radius: 26px 26px 34px 34px;
  padding: 2.2rem 2.5rem;
  max-width: var(--tp-card-width);
  background: linear-gradient(
      180deg,
      #ffffff 0%,
      #fffefb 55%,
      #f5f4ef 82%,
      #ecebe6 100%
    ),
    radial-gradient(
      circle at 78% 22%,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0) 55%
    ),
    radial-gradient(
      circle at 25% 68%,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0) 60%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.7) 0 16px,
      rgba(248, 248, 248, 0.6) 16px 32px
    );
  position: relative;
  isolation: isolate;
}

.tp-sheet.tp-hero::before {
  top: 18px;
}
.tp-sheet.tp-hero::after {
  opacity: 0.35;
}

/* Torn / perforated edge variant (hero) */
.tp-sheet.tp-hero.tp-tear {
  border-radius: 0;
  overflow: hidden;
  position: relative;
  /* Initial static fallback (slight micro tear); will be overridden by JS-generated wave + teeth clip-path */
  clip-path: polygon(
    0% 1.2%,
    2% 0.6%,
    4% 1.3%,
    6% 0.5%,
    8% 1.25%,
    10% 0.55%,
    12% 1.28%,
    14% 0.52%,
    16% 1.3%,
    18% 0.5%,
    20% 1.25%,
    22% 0.55%,
    24% 1.28%,
    26% 0.52%,
    28% 1.3%,
    30% 0.5%,
    32% 1.25%,
    34% 0.55%,
    36% 1.28%,
    38% 0.52%,
    40% 1.3%,
    42% 0.5%,
    44% 1.25%,
    46% 0.55%,
    48% 1.28%,
    50% 0.52%,
    52% 1.3%,
    54% 0.5%,
    56% 1.25%,
    58% 0.55%,
    60% 1.28%,
    62% 0.52%,
    64% 1.3%,
    66% 0.5%,
    68% 1.25%,
    70% 0.55%,
    72% 1.28%,
    74% 0.52%,
    76% 1.3%,
    78% 0.5%,
    80% 1.25%,
    82% 0.55%,
    84% 1.28%,
    86% 0.52%,
    88% 1.3%,
    90% 0.5%,
    92% 1.25%,
    94% 0.55%,
    96% 1.28%,
    98% 0.52%,
    100% 1.2%,
    100% 98.8%,
    98% 99.4%,
    96% 98.7%,
    94% 99.5%,
    92% 98.75%,
    90% 99.45%,
    88% 98.72%,
    86% 99.48%,
    84% 98.7%,
    82% 99.5%,
    80% 98.75%,
    78% 99.45%,
    76% 98.72%,
    74% 99.48%,
    72% 98.7%,
    70% 99.5%,
    68% 98.75%,
    66% 99.45%,
    64% 98.72%,
    62% 99.48%,
    60% 98.7%,
    58% 99.5%,
    56% 98.75%,
    54% 99.45%,
    52% 98.72%,
    50% 99.48%,
    48% 98.7%,
    46% 99.5%,
    44% 98.75%,
    42% 99.45%,
    40% 98.72%,
    38% 99.48%,
    36% 98.7%,
    34% 99.5%,
    32% 98.75%,
    30% 99.45%,
    28% 98.72%,
    26% 99.48%,
    24% 98.7%,
    22% 99.5%,
    20% 98.75%,
    18% 99.45%,
    16% 98.72%,
    14% 99.48%,
    12% 98.7%,
    10% 99.5%,
    8% 98.75%,
    6% 99.45%,
    4% 98.72%,
    2% 99.48%,
    0% 98.8%
  );
}

/* Subtle emboss pattern */
.tp-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Radial quilt-like pattern */
  background-image: radial-gradient(
      circle at 100% 150%,
      rgba(255, 255, 255, 0.9) 18%,
      rgba(242, 242, 242, 0.55) 18%,
      rgba(242, 242, 242, 0.55) 22%,
      rgba(255, 255, 255, 0.9) 22%,
      rgba(255, 255, 255, 0.9) 30%,
      rgba(242, 242, 242, 0.55) 30%,
      rgba(242, 242, 242, 0.55) 33%,
      transparent 33%,
      transparent
    ),
    radial-gradient(
      circle at 0 150%,
      rgba(255, 255, 255, 0.9) 18%,
      rgba(242, 242, 242, 0.55) 18%,
      rgba(242, 242, 242, 0.55) 22%,
      rgba(255, 255, 255, 0.9) 22%,
      rgba(255, 255, 255, 0.9) 30%,
      rgba(242, 242, 242, 0.55) 30%,
      rgba(242, 242, 242, 0.55) 33%,
      transparent 33%,
      transparent
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(242, 242, 242, 0.55) 7%,
      rgba(255, 255, 255, 0.9) 7%,
      rgba(255, 255, 255, 0.9) 17%,
      rgba(242, 242, 242, 0.5) 17%,
      rgba(242, 242, 242, 0.5) 24%,
      rgba(255, 255, 255, 0.9) 24%,
      rgba(255, 255, 255, 0.9) 34%,
      rgba(242, 242, 242, 0.45) 34%,
      rgba(242, 242, 242, 0.45) 41%,
      rgba(255, 255, 255, 0.9) 41%,
      rgba(255, 255, 255, 0.9) 52%,
      rgba(242, 242, 242, 0.4) 52%,
      rgba(242, 242, 242, 0.4) 60%,
      transparent 60%,
      transparent
    ),
    radial-gradient(
      circle at 100% 50%,
      rgba(242, 242, 242, 0.5) 4%,
      rgba(255, 255, 255, 0.9) 4%,
      rgba(255, 255, 255, 0.9) 12%,
      rgba(242, 242, 242, 0.45) 12%,
      rgba(242, 242, 242, 0.45) 17%,
      rgba(255, 255, 255, 0.9) 17%,
      rgba(255, 255, 255, 0.9) 24%,
      rgba(242, 242, 242, 0.4) 24%,
      rgba(242, 242, 242, 0.4) 30%,
      rgba(255, 255, 255, 0.9) 30%,
      rgba(255, 255, 255, 0.9) 40%,
      rgba(242, 242, 242, 0.35) 40%,
      rgba(242, 242, 242, 0.35) 46%,
      transparent 46%,
      transparent
    ),
    radial-gradient(
      circle at 0 50%,
      rgba(242, 242, 242, 0.5) 4%,
      rgba(255, 255, 255, 0.9) 4%,
      rgba(255, 255, 255, 0.9) 12%,
      rgba(242, 242, 242, 0.45) 12%,
      rgba(242, 242, 242, 0.45) 17%,
      rgba(255, 255, 255, 0.9) 17%,
      rgba(255, 255, 255, 0.9) 24%,
      rgba(242, 242, 242, 0.4) 24%,
      rgba(242, 242, 242, 0.4) 30%,
      rgba(255, 255, 255, 0.9) 30%,
      rgba(255, 255, 255, 0.9) 40%,
      rgba(242, 242, 242, 0.35) 40%,
      rgba(242, 242, 242, 0.35) 46%,
      transparent 46%,
      transparent
    ),
    linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0) 45%
    ),
    linear-gradient(
      295deg,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 255, 255, 0) 60%
    );
  background-size: 80px 40px, 80px 40px, 80px 40px, 80px 40px, 80px 40px,
    100% 100%, 100% 100%;
  mix-blend-mode: normal;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

/* Gentle floating animation */
.tp-sheet.tp-float {
  animation: tpFloat 9s ease-in-out infinite;
}

@keyframes tpFloat {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tp-rot, 0deg));
  }
  50% {
    transform: translateY(-10px) rotate(calc(var(--tp-rot, 0deg) + 1.5deg));
  }
}

/* Hover lift */
.tp-sheet:hover {
  transform: translateY(-8px) rotate(calc(var(--tp-rot, 0deg) + 1deg));
  box-shadow: 0 10px 18px -6px var(--tp-shadow),
    0 22px 44px -8px rgba(0, 40, 60, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 34px -4px rgba(160, 220, 240, 0.6);
}

/* Make sure text stays legible */
.tp-sheet h3,
.tp-sheet p,
.tp-sheet span,
.tp-sheet button {
  position: relative;
  z-index: 1;
}

/* Adjust existing specific cards to square-ish proportions */
.features-grid .feature-card.tp-sheet,
.how-it-works .step-card.tp-sheet,
.faq-accordion .faq-item.tp-sheet {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Trained On Section */
.trained {
  padding: 2rem 0 0.5rem;
  text-align: center;
}

/* Second scroll section wrapper */
.trained,
.app-preview {
  scroll-snap-align: none;
}

/* Group the trained and app preview sections as one scroll snap section */
.trained {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.trained .tp-sheet.tp-hero {
  margin: 0 auto;
  max-width: var(--tp-card-width);
  width: 100%;
  padding: 1.4rem 1.4rem 1.1rem;
}

.tp-sheet.tp-trained {
  max-width: var(--hero-card-width) !important;
}
.trained-title {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 400;
  color: var(--text-light);
  margin: 0 0 0.65rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0;
  text-transform: none;
}
.trained-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.38rem 0.5rem;
  max-width: 340px;
  width: 100%;
  margin: 0.4rem auto 0.8rem;
  padding: 0 0.5rem;
  list-style: none;
}
.trained-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 55px;
  filter: none;
  opacity: 1;
}
.trained-logo img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: none;
  opacity: 1;
}
.trained-logo .brand {
  font-size: clamp(0.85rem, 1.9vw, 1.05rem);
  font-weight: 700;
  color: rgba(20, 20, 20, 0.85);
}
.trained-more {
  margin-top: 0.2rem;
  color: var(--text-light);
  font-weight: 600;
}

@media (max-width: 700px) {
  .trained-logo {
    height: 50px;
  }
  .trained-logos {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .trained-logos {
    max-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trained .tp-sheet {
    animation: none !important;
  }
}

/* FAQ items need internal padding preserved while forcing aspect ratio only on wider screens */
@media (max-width: 820px) {
  .faq-accordion .faq-item.tp-sheet {
    aspect-ratio: auto;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .tp-sheet.tp-float {
    animation: none;
  }
}

/* Corner curl element */
.tp-corner {
  position: absolute;
  width: 70px;
  height: 70px;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(240, 240, 240, 0.5) 55%,
    rgba(200, 200, 200, 0.2) 100%
  );
  border-top-left-radius: 60% 60%;
  box-shadow: -6px -6px 10px -6px rgba(0, 0, 0, 0.1) inset,
    0 2px 4px rgba(0, 0, 0, 0.08);
  transform-origin: bottom right;
  transform: rotate(-8deg) translate(18px, 18px) skewX(-8deg);
  opacity: 0.9;
  pointer-events: none;
}
@media (max-width: 600px) {
  .tp-corner {
    width: 50px;
    height: 50px;
  }
}

/* Paper fibers subtle overlay (hero only refinement) */
.tp-sheet.tp-hero::after {
  background-image: radial-gradient(
      circle at 100% 150%,
      rgba(255, 255, 255, 0.95) 16%,
      rgba(242, 242, 242, 0.5) 16%,
      rgba(242, 242, 242, 0.5) 20%,
      rgba(255, 255, 255, 0.95) 20%,
      rgba(255, 255, 255, 0.95) 28%,
      rgba(242, 242, 242, 0.5) 28%,
      rgba(242, 242, 242, 0.5) 31%,
      transparent 31%,
      transparent
    ),
    radial-gradient(
      circle at 0 150%,
      rgba(255, 255, 255, 0.95) 16%,
      rgba(242, 242, 242, 0.5) 16%,
      rgba(242, 242, 242, 0.5) 20%,
      rgba(255, 255, 255, 0.95) 20%,
      rgba(255, 255, 255, 0.95) 28%,
      rgba(242, 242, 242, 0.5) 28%,
      rgba(242, 242, 242, 0.5) 31%,
      transparent 31%,
      transparent
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(242, 242, 242, 0.55) 6%,
      rgba(255, 255, 255, 0.95) 6%,
      rgba(255, 255, 255, 0.95) 15%,
      rgba(242, 242, 242, 0.5) 15%,
      rgba(242, 242, 242, 0.5) 22%,
      rgba(255, 255, 255, 0.95) 22%,
      rgba(255, 255, 255, 0.95) 32%,
      rgba(242, 242, 242, 0.45) 32%,
      rgba(242, 242, 242, 0.45) 39%,
      rgba(255, 255, 255, 0.95) 39%,
      rgba(255, 255, 255, 0.95) 50%,
      rgba(242, 242, 242, 0.4) 50%,
      rgba(242, 242, 242, 0.4) 58%,
      transparent 58%,
      transparent
    ),
    radial-gradient(
      circle at 100% 50%,
      rgba(242, 242, 242, 0.5) 3.5%,
      rgba(255, 255, 255, 0.95) 3.5%,
      rgba(255, 255, 255, 0.95) 11%,
      rgba(242, 242, 242, 0.45) 11%,
      rgba(242, 242, 242, 0.45) 16%,
      rgba(255, 255, 255, 0.95) 16%,
      rgba(255, 255, 255, 0.95) 23%,
      rgba(242, 242, 242, 0.4) 23%,
      rgba(242, 242, 242, 0.4) 28%,
      rgba(255, 255, 255, 0.95) 28%,
      rgba(255, 255, 255, 0.95) 38%,
      rgba(242, 242, 242, 0.35) 38%,
      rgba(242, 242, 242, 0.35) 44%,
      transparent 44%,
      transparent
    ),
    radial-gradient(
      circle at 0 50%,
      rgba(242, 242, 242, 0.5) 3.5%,
      rgba(255, 255, 255, 0.95) 3.5%,
      rgba(255, 255, 255, 0.95) 11%,
      rgba(242, 242, 242, 0.45) 11%,
      rgba(242, 242, 242, 0.45) 16%,
      rgba(255, 255, 255, 0.95) 16%,
      rgba(255, 255, 255, 0.95) 23%,
      rgba(242, 242, 242, 0.4) 23%,
      rgba(242, 242, 242, 0.4) 28%,
      rgba(255, 255, 255, 0.95) 28%,
      rgba(255, 255, 255, 0.95) 38%,
      rgba(242, 242, 242, 0.35) 38%,
      rgba(242, 242, 242, 0.35) 44%,
      transparent 44%,
      transparent
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.01) 0 2px,
      transparent 2px 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.008) 0 3px,
      transparent 3px 6px
    ),
    linear-gradient(120deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  background-size: 80px 40px, 80px 40px, 80px 40px, 80px 40px, 80px 40px,
    100% 100%, 100% 100%, 100% 100%;
}

/* Ensure content layers above background pattern */
.tp-sheet > * {
  position: relative;
  z-index: 2;
}
.tp-corner {
  z-index: 3;
}

/* ================== APP PREVIEW SECTION ================== */
section.app-preview {
  padding: 0 0 0.5rem;
  text-align: center;
}
@media (max-width: 600px) {
  section.app-preview {
    padding: 0 0 1.2rem;
  }
}
.app-preview-wrapper {
  max-width: var(--hero-card-width, var(--tp-card-width, 600px));
  margin: 0 auto;
  position: relative;
  padding: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  overflow: visible;
}
@media (prefers-reduced-motion: no-preference) {
  .app-preview-wrapper {
    animation: appPreviewFloat 18s ease-in-out infinite;
  }
}
.app-preview-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
@media (max-width: 480px) {
  .app-preview-wrapper {
    padding: 0;
  }
  .app-preview-img {
    border-radius: 0;
  }
}
/* ================== END APP PREVIEW SECTION ================== */

/* ================== TESTIMONIALS CAROUSEL ================== */
.testimonials {
  padding: 1rem 0 0.85rem;
  position: relative;
}
@media (max-width: 600px) {
  .testimonials {
    padding: 0.65rem 0 0.7rem;
  }
}
.testimonials-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  /* Gentle overall float */
  animation: testimonialFloat 12s ease-in-out infinite;
  will-change: transform;
}
.carousel-viewport {
  overflow: hidden;
  width: 100%;
  max-width: var(--hero-card-width, var(--tp-card-width, 600px));
}
.carousel-track {
  display: flex;
  transition: transform 1.05s cubic-bezier(0.6, 0.15, 0.25, 1);
  touch-action: pan-y;
}
.testimonial-card {
  flex: 0 0 100%;
  padding: 1.45rem 1.6rem 0.55rem;
  box-sizing: border-box;
  position: relative;
  opacity: 0;
  transition: opacity 0.55s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.testimonial-card.is-active {
  opacity: 1;
}
.testimonial-card.is-fading-out {
  opacity: 0;
}
.testimonial-quote {
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 600;
  margin: 0;
  color: #1f1f1f;
  font-style: italic;
}
.testimonial-author {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-light);
  margin: 0;
  margin-top: auto;
  align-self: flex-start;
  line-height: 1.2;
}
@media (max-width: 600px) {
  .testimonial-quote {
    font-size: 1.12rem;
  }
  .testimonial-card {
    padding: 1.3rem 1.25rem 1.4rem;
  }
  /* Prevent mobile webkit from hiding slides during transitions */
  .testimonial-card.is-active {
    opacity: 1 !important;
    transform: translateZ(0); /* Force GPU acceleration */
    will-change: opacity, transform;
  }

  /* Additional mobile webkit fixes */
  .testimonial-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .carousel-track {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  position: relative;
}
.carousel-dot {
  --scale: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 255, 255, 0.75),
    rgba(255, 255, 255, 0.48) 45%,
    rgba(190, 230, 255, 0.28) 70%,
    rgba(140, 190, 240, 0.14) 100%
  );
  box-shadow: 0 3px 6px -3px rgba(0, 40, 70, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 3px 0 rgba(255, 255, 255, 0.65) inset,
    0 -2px 5px -3px rgba(140, 200, 255, 0.3) inset;
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0.82;
  transition: transform 0.55s ease, box-shadow 0.7s ease, filter 0.7s ease,
    opacity 0.6s ease;
  animation: bubbleFloat 8s ease-in-out infinite;
  will-change: transform;
}
.carousel-dot.is-active {
  --scale: 1.22;
  box-shadow: 0 5px 12px -4px rgba(0, 60, 110, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.7) inset,
    0 2px 5px 0 rgba(255, 255, 255, 0.8) inset,
    0 -3px 7px -3px rgba(120, 200, 255, 0.4) inset,
    0 0 14px -2px rgba(90, 180, 255, 0.5);
  filter: brightness(1.04) saturate(1.04);
  opacity: 0.9;
}
.carousel-dot:focus,
.carousel-dot:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55),
    0 0 0 6px rgba(120, 190, 255, 0.35), 0 5px 12px -4px rgba(0, 60, 110, 0.25);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
  .carousel-dot {
    transition: none;
    animation: none;
  }
  .testimonials-carousel {
    animation: none;
  }
}

/* Floating animations */
@keyframes testimonialFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes bubbleFloat {
  0%,
  100% {
    transform: translateY(0) scale(var(--scale));
  }
  50% {
    transform: translateY(-3px) scale(var(--scale));
  }
}

/* Stagger individual bubble timings */
.carousel-dot:nth-child(1) {
  animation-duration: 7.6s;
  animation-delay: -1.2s;
}
.carousel-dot:nth-child(2) {
  animation-duration: 8.4s;
  animation-delay: -2s;
}
.carousel-dot:nth-child(3) {
  animation-duration: 7.9s;
  animation-delay: -0.6s;
}
.carousel-dot:nth-child(4) {
  animation-duration: 8.6s;
  animation-delay: -2.8s;
}
.carousel-dot:nth-child(5) {
  animation-duration: 7.4s;
  animation-delay: -1.6s;
}

/* Hover subtle lift/glow */
.carousel-dot:hover {
  transform: scale(calc(var(--scale) * 1.1));
}
.carousel-dot.is-active:hover {
  transform: scale(calc(var(--scale) * 1.08));
}

/* ================== END TESTIMONIALS CAROUSEL ================== */

/* Override generic tp-sheet hover for testimonial cards: keep flat */
.testimonial-card.tp-sheet:hover {
  transform: none !important;
  box-shadow: 0 4px 10px -2px var(--tp-shadow),
    0 14px 32px -6px rgba(0, 40, 60, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 1px 2px rgba(0, 0, 0, 0.08) inset, 0 0 30px -8px rgba(140, 210, 230, 0.45);
}
.testimonial-card {
  cursor: grab;
}
.testimonial-card:active {
  cursor: grabbing;
}
.testimonial-card *,
.testimonial-card {
  user-select: none;
  -webkit-user-select: none;
}
/* Remove corner embellishment inside testimonials (not needed, was causing extra visual/bottom space) */
.testimonial-card .tp-corner {
  display: none !important;
}

/* Subtle float specifically for app preview (smaller amplitude, no rotate) */
@keyframes appPreviewFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* ================== FINAL CTA SECTION ================== */
.final-cta {
  margin-top: 0.6rem;
  margin-bottom: 3.8rem;
  position: relative;
}
.final-cta-inner {
  padding: 2.8rem 2.4rem 2.4rem;
  overflow: hidden;
  max-width: var(--tp-card-width);
  margin-left: auto;
  margin-right: auto;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}
.final-cta-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem; /* card + buttons spacing */
}
.final-cta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
.final-cta-card {
  padding: 0.82rem 0.55rem 0.9rem;
  position: relative;
  max-width: none; /* let .tp-sheet.tp-trained control width */
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}
.final-cta-card.tp-sheet.tp-hero {
  /* override hero default padding */
  padding: 0.82rem 0.55rem 0.9rem !important;
}
.final-cta-card .final-cta-inline {
  gap: 0.35rem;
}
.final-cta-card .final-cta-lead {
  justify-content: flex-end;
}
.final-cta-inline .final-cta-lead {
  flex: 1 1 50%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  line-height: 1.32;
}
.final-cta-inline .final-cta-visual {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.final-cta-inline .final-cta-visual-placeholder.is-small {
  margin-left: 0;
}
.final-cta-copy {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.final-cta-title {
  font-size: 1.95rem;
  line-height: 1.12;
  margin: 0 0 0.45rem;
  background: linear-gradient(92deg, #2b3845, #0d202c 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  width: 100%;
}
.final-cta-lead {
  font-size: 1.34rem;
  line-height: 1.46;
  margin: 0;
  color: #1d2d35;
  font-weight: 500;
}
.final-cta-benefits {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: #1f2d35;
  font-weight: 500;
}
.final-cta-benefits li::before {
  content: "✔";
  color: #2f82ff;
  font-weight: 600;
  margin-right: 0.5rem;
}

.final-cta-buttons {
  display: flex;
  flex-direction: row;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  margin: 0.65rem 0 0;
  flex-wrap: nowrap;
}
/* smaller badge sizes inside final cta */
.final-cta-buttons .app-store-btn img {
  height: 53px;
  width: auto;
}
.final-cta-buttons .android-btn img {
  height: 77px;
}
/* slight horizontal nudge: move Apple badge a bit right */
.final-cta-buttons .ios-btn {
  margin-left: 0.4rem;
}
@media (max-width: 520px) {
  .final-cta-buttons .ios-btn {
    margin-left: 0.3rem;
  }
}
/* prevent badge cropping */
.final-cta-buttons .app-store-btn,
.final-cta-buttons .android-btn {
  flex-shrink: 0;
  overflow: visible;
}
@media (max-width: 520px) {
  .final-cta-buttons {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  .final-cta-buttons .app-store-btn img {
    height: 48px;
  }
  .final-cta-buttons .android-btn img {
    height: 68px;
  }
}
.final-cta-visual {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  position: relative;
}
.final-cta-visual-placeholder {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9 / 16;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.75),
    rgba(210, 235, 255, 0.65)
  );
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #32627a;
  box-shadow: 0 8px 26px -6px rgba(0, 50, 80, 0.25),
    0 2px 4px rgba(255, 255, 255, 0.6) inset;
  position: relative;
  animation: appPreviewFloat 9s ease-in-out infinite;
}
.final-cta-visual-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
      circle at 30% 18%,
      rgba(255, 255, 255, 0.6),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.final-cta-visual-placeholder.is-small {
  max-width: 128px;
  aspect-ratio: 9 / 15;
  border-radius: 20px;
  font-size: 0.7rem;
  padding: 0.35rem;
}
.final-cta-visual-img.is-small {
  max-width: 200px;
  width: 100%;
  display: block;
  height: auto;
  object-fit: contain;
}
@media (max-width: 640px) {
  .final-cta-inline {
    flex-direction: row;
  }
  .final-cta-visual-placeholder.is-small {
    max-width: 110px;
    aspect-ratio: 9 / 14;
  }
  .final-cta-visual-img.is-small {
    max-width: 172px;
  }
}
@media (max-width: 480px) {
  .final-cta-inline {
    flex-direction: row;
    gap: 0.28rem;
  }
  .final-cta-visual-placeholder.is-small {
    max-width: 95px;
    aspect-ratio: 9 / 13;
  }
  .final-cta-inline .final-cta-lead {
    flex: 1 1 42%;
  }
  .final-cta-inline .final-cta-visual {
    flex: 0 0 58%;
  }
  .final-cta-visual-img.is-small {
    max-width: 205px;
  }
  .final-cta-card.tp-sheet.tp-hero {
    padding: 0.95rem 0.5rem 1.05rem !important;
  }
  .final-cta-card .final-cta-inline {
    gap: 0.28rem;
  }
  .final-cta-lead {
    font-size: 1.12rem;
    line-height: 1.46;
  }
}
@media (max-width: 900px) {
  .final-cta-content {
    flex-direction: column;
  }
  .final-cta-copy {
    width: 100%;
  }
  .final-cta-visual {
    width: 100%;
  }
  .final-cta-inner {
    padding: 2.4rem 1.9rem 2.2rem;
  }
  .final-cta-title {
    font-size: 1.9rem;
  }
}
@media (max-width: 520px) {
  .final-cta-title {
    font-size: 1.7rem;
  }
  .final-cta-lead {
    font-size: 1.08rem;
  }
  .final-cta-benefits {
    font-size: 0.9rem;
  }
  .final-cta-tagline {
    font-size: 0.8rem;
  }
  .final-cta-buttons {
    gap: 0.8rem;
  }
  .final-cta-inner {
    padding: 2.1rem 1.5rem 2rem;
  }
}
/* ================== END FINAL CTA SECTION ================== */
