:root {
  --page-bg-image: url("/bg.jpg");
  --page-bg-color: #7f8ea6;
  --white-60: rgba(255, 255, 255, 0.6);
  --white-50: rgba(255, 255, 255, 0.5);
}

html,
body {
  height: 100%;
}

html {
  background-image: url("/bg.jpg");
  background-image: var(--page-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--white-60);
  background-color: transparent;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

/* Full-bleed background layer (more reliable on iOS Safari safe-area/overscroll) */
body::before {
  content: "";
  position: fixed;
  top: -50px;
  left: 0;
  right: 0;
  bottom: -50px;
  background-image: url("/bg.jpg");
  background-image: var(--page-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -1;
  transform: translateZ(0);
}

.noscript {
  position: sticky;
  top: 0;
  z-index: 300;
  padding: 10px 14px;
  text-align: center;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: rgba(44, 44, 44, 0.9);
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.landing {
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding-top: calc(env(safe-area-inset-top, 0px) + 24px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seo {
  width: 100%;
  padding: 28px 16px 120px;
  box-sizing: border-box;
}

.seo-inner {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 18px 22px;
  background: rgba(217, 217, 217, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.seo-title {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 900;
  color: rgba(44, 44, 44, 0.82);
  letter-spacing: -0.02em;
}

.seo-lead {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(44, 44, 44, 0.72);
  line-height: 1.6;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 6px;
}

.seo-card {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.seo-card-title {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 900;
  color: rgba(44, 44, 44, 0.82);
  letter-spacing: -0.01em;
}

.seo-card-text {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(44, 44, 44, 0.7);
  line-height: 1.55;
}

.faq {
  margin-top: 18px;
}

.faq-q {
  margin: 14px 0 6px 0;
  font-size: 13px;
  font-weight: 900;
  color: rgba(44, 44, 44, 0.82);
}

.faq-a {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(44, 44, 44, 0.7);
  line-height: 1.6;
}

.title {
  margin: 24px 0 12px 0;
  font-size: 56px;
  font-weight: 900; /* Nunito Black */
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white-50);
  text-align: center;
}

.subtitle {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600; /* Nunito SemiBold */
  letter-spacing: -0.01em;
  color: var(--white-50);
  text-align: center;
  padding: 0 24px;
}

/* Chat Wrapper (contains chat + navigation) */
.chat-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin-top: 42px;
}

/* Navigation Arrows */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.25);
  color: rgba(44, 44, 44, 0.7);
  cursor: pointer;
  transition: background-color 0.2s ease;
  z-index: 100;
}

.nav-arrow.left {
  left: calc(env(safe-area-inset-left, 0px) + 24px);
}

.nav-arrow.right {
  right: calc(env(safe-area-inset-right, 0px) + 24px);
}

.nav-arrow:hover {
  background-color: rgba(255, 255, 255, 0.45);
}

.nav-arrow:active {
  background-color: rgba(255, 255, 255, 0.55);
}

.nav-arrow:focus-visible,
.waitlist-btn:focus-visible,
.waitlist-input:focus-visible,
.waitlist-send:focus-visible,
.explore-text:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

.nav-arrow svg {
  width: 24px;
  height: 24px;
}

/* Chat Mockup Container */
.chat-mockup {
  position: relative;
  width: 90%;
  max-width: 1400px;
  background-color: rgba(217, 217, 217, 0.6);
  border-radius: 25px;
  padding: 16px;
  box-sizing: border-box;
}

.close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 14px;
  height: 14px;
  background-color: #ff5f57;
  border-radius: 50%;
  cursor: pointer;
}

.chat-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.avatar {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.message-text {
  margin: 0;
  font-size: 12px;
  font-weight: 800; /* Nunito ExtraBold */
  color: rgba(44, 44, 44, 0.8);
  line-height: 1.5;
}

/* Leading icon for final AI messages (Safari-safe vs emoji in shimmer text) */
.ai-leading-icon {
  display: none;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(30, 140, 70, 0.95);
}

.ai-leading-icon.visible {
  display: inline-flex;
}

.ai-leading-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Gradient text for brand names */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* Shimmer / loading sweep animation on text */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(44, 44, 44, 0.8) 0%,
    rgba(44, 44, 44, 0.8) 40%,
    rgba(120, 120, 120, 0.9) 50%,
    rgba(44, 44, 44, 0.8) 60%,
    rgba(44, 44, 44, 0.8) 100%
  );
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: shimmer-text 0.8s ease-in-out infinite;
}

@keyframes shimmer-text {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* Results Section */
.results-section {
  display: none;
  padding-top: 24px;
  padding-bottom: 48px;
  gap: 48px;
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
  width: 100%;
}

.results-section.visible {
  display: flex;
}

.results-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.group-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 500; /* Nunito Medium */
  color: rgba(44, 44, 44, 0.7);
  text-align: center;
  min-height: 18px;
  letter-spacing: -0.01em;
}

.group-images {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.screen-container {
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  flex-shrink: 0;
  margin-bottom: 40px;
}

.screen-container.visible {
  opacity: 1;
}

.result-img {
  height: 320px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

/* FigJam-style Sticky Notes */
.sticky-note {
  position: absolute;
  bottom: -32px;
  left: 8px;
  background-color: #FEF445;
  padding: 8px 12px;
  border-radius: 2px;
  transform: rotate(-1deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  min-width: 80px;
  max-width: 130px;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.sticky-note.visible {
  opacity: 1;
}

.sticky-text {
  margin: 0 0 4px 0;
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.sticky-author {
  margin: 0;
  font-size: 9px;
  font-weight: 400;
  color: #555;
}

/* Explore CTA */
.explore-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.explore-cta.visible {
  opacity: 1;
}

.explore-text {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(44, 44, 44, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  letter-spacing: -0.01em;
}

/* Waitlist CTA */
.waitlist-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 180;
}

body.waitlist-open .waitlist-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* While waitlist is open, pause shimmering text and prevent nav interactions */
body.waitlist-open .shimmer {
  animation-play-state: paused;
}

body.waitlist-open .nav-arrow {
  pointer-events: none;
}

.waitlist-cta {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0;
}

.waitlist-btn {
  padding: 14px 24px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.waitlist-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.waitlist-cta.active .waitlist-btn {
  display: none;
}

.waitlist-form {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  background-color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 50px;
  animation: slideIn 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.waitlist-cta.active .waitlist-form {
  display: flex;
}

.waitlist-input {
  width: 200px;
  padding: 8px 12px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(44, 44, 44, 0.9);
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 20px;
  outline: none;
  transition: background-color 0.2s ease;
}

.waitlist-input::placeholder {
  color: rgba(44, 44, 44, 0.5);
}

.waitlist-input:focus {
  background-color: white;
}

.waitlist-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: white;
  flex-shrink: 0;
}

.waitlist-send:hover {
  transform: scale(1.08);
}

.waitlist-send:active {
  transform: scale(0.95);
}

.waitlist-send svg {
  width: 18px;
  height: 18px;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%;
  right: auto;
  padding: 14px 24px;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 200;
}

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

.toast.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
}

/* Responsive: Large screens */
@media (max-width: 1200px) {
  .result-img {
    height: 260px;
  }

  .results-section {
    gap: 32px;
  }

  .group-images {
    gap: 16px;
  }

  .nav-arrow {
    width: 40px;
    height: 40px;
  }

  .nav-arrow.left {
    left: calc(env(safe-area-inset-left, 0px) + 16px);
  }

  .nav-arrow.right {
    right: calc(env(safe-area-inset-right, 0px) + 16px);
  }

  .nav-arrow svg {
    width: 20px;
    height: 20px;
  }
}

/* Responsive: Medium screens */
@media (max-width: 900px) {
  .results-section {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .results-group {
    width: 100%;
  }

  .result-img {
    height: 200px;
  }

  .group-images {
    gap: 12px;
  }

  .sticky-note {
    max-width: 120px;
    padding: 6px 10px;
    bottom: -28px;
  }

  .sticky-text {
    font-size: 9px;
  }

  .sticky-author {
    font-size: 7px;
  }

  .screen-container {
    margin-bottom: 36px;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive: Small screens / Mobile */
@media (max-width: 600px) {
  .landing {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }

  .seo {
    padding: 16px 12px 120px;
  }

  .seo-inner {
    padding: 14px 14px 18px;
  }

  .seo-title {
    font-size: 18px;
  }

  .title {
    font-size: 36px;
    margin-top: 12px; /* move title up by 12px on phones */
  }

  .subtitle {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Hide close button on mobile */
  .close-btn {
    display: none;
  }

  .chat-wrapper {
    margin-top: 12px; /* tighter subtitle -> chat spacing on phones */
  }

  .chat-mockup {
    width: 96%;
    padding: 10px;
  }

  .chat-message {
    padding: 6px;
    gap: 8px;
  }

  /* Results layout - allow groups to sit side-by-side when space permits */
  .results-section {
    gap: 12px;
    padding: 12px 4px 20px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .results-group {
    width: auto;
  }

  /* Images with breathing room */
  .result-img {
    height: 180px;
  }

  .group-images {
    gap: 12px;
    justify-content: center;
  }

  /* Keep absolute positioning like desktop for compactness */
  .screen-container {
    margin-bottom: 28px;
  }

  /* Sticky notes - absolute like desktop, compact sizing */
  .sticky-note {
    bottom: -22px;
    left: 4px;
    min-width: 70px;
    max-width: 100px;
    padding: 5px 8px;
  }

  .sticky-text {
    font-size: 8px;
    margin-bottom: 2px;
  }

  .sticky-author {
    font-size: 6px;
  }

  .group-title {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .avatar {
    width: 28px;
    height: 28px;
  }

  .message-text {
    font-size: 10px;
  }

  /* Explore CTA at bottom */
  .explore-cta {
    width: 100%;
    margin-top: 4px;
  }

  .explore-text {
    font-size: 11px;
  }

  .nav-arrow {
    width: 36px;
    height: 36px;
  }

  .nav-arrow.left {
    left: calc(env(safe-area-inset-left, 0px) + 8px);
  }

  .nav-arrow.right {
    right: calc(env(safe-area-inset-right, 0px) + 8px);
  }

  .nav-arrow svg {
    width: 18px;
    height: 18px;
  }

  /* Waitlist CTA - mobile: bottom center */
  .waitlist-cta {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    left: 0;
    right: 0;
    justify-content: center;
    transform: none;
  }

  /* Toast - mobile: bottom center */
  .toast {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-size: 13px;
    padding: 12px 20px;
  }

  .toast.visible {
    transform: translateX(-50%) translateY(0);
  }

  .toast.fade-out {
    transform: translateX(-50%) translateY(10px);
  }

  /* When expanded, give a full-width target area (prevents accidental dismiss) */
  .waitlist-cta.active {
    padding: 0 16px;
  }

  .waitlist-btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .waitlist-form {
    width: 100%;
    padding: 6px 6px 6px 12px;
  }

  .waitlist-input {
    flex: 1;
    min-width: 0;
    width: auto;
    font-size: 12px;
    padding: 8px 10px;
  }

  .waitlist-send {
    width: 36px;
    height: 36px;
  }

  .waitlist-send svg {
    width: 16px;
    height: 16px;
  }
}

/* Responsive: Extra small screens */
@media (max-width: 480px) {
  .result-img {
    height: 150px;
  }

  .group-images {
    gap: 8px;
  }

  .screen-container {
    margin-bottom: 24px;
  }

  .sticky-note {
    bottom: -18px;
    min-width: 60px;
    max-width: 90px;
    padding: 4px 6px;
  }

  .sticky-text {
    font-size: 7px;
  }

  .sticky-author {
    font-size: 5px;
  }

  .avatar {
    width: 24px;
    height: 24px;
  }

  .message-text {
    font-size: 9px;
  }
}
