/* ==========================================================================
   Layout — Mobile-first responsive landing page
   Base = mobile (< 768px), stacked single column
   md  = 768px+  (wider spacing, still single column)
   lg  = 1024px+ (two-column hero)
   xl  = 1440px+ (max-width cap)
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   HERO — Full viewport on desktop, natural flow on mobile
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: var(--space-32) clamp(20px, 5vw, 80px) var(--space-16);
  box-sizing: border-box;
  overflow-x: clip;
  overflow-y: auto;
}

/* --- Logo watermark background --- */

.hero__watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 198vmin;
  height: 198vmin;
  max-width: 1980px;
  max-height: 1980px;
  background-image: url('/assets/logo-mark-white.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

/* --- Layout container --- */

.hero__layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  max-width: 1280px;
  width: 100%;
  margin-inline: auto;
  min-height: 0;
}

/* --- Left column: logo + headline + form --- */

.hero__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-16);
  z-index: 1;
}

/* --- Hero intro (fades out when step 2/3 active) --- */

.hero__intro {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  text-align: inherit;
  gap: var(--space-16);
  transition: opacity 400ms var(--ease-out);
}

.hero__intro--exit {
  opacity: 0;
}


.hero__logo {
  width: 72px;
  height: auto;
}

/* --- Headline --- */

.hero__title {
  display: inline;
  font-size: clamp(28px, 5vw + 0.5rem, 46px);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-primary);
}

.hero__title-line {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: var(--text-primary);
}

.hero__title-line--muted {
  color: var(--text-secondary);
}

/* --- Descriptor line --- */

.hero__descriptor {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

/* --- Right column: screenshots + subtitle --- */

.hero__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  z-index: 1;
  margin-inline: calc(-1 * clamp(20px, 5vw, 80px));
}

.hero__screenshots {
  width: 130%;
  max-width: 130%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* --- Subtitle --- */

.hero__subtitle {
  text-align: center;
  font-size: var(--font-size-small);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
  margin-top: var(--space-8);
}

/* ==========================================================================
   WAITLIST
   ========================================================================== */

.waitlist {
  width: 100%;
  max-width: 380px;
  position: relative;
  min-height: 280px;
}

.waitlist__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  width: 100%;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.waitlist__step--active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
  transition: opacity 500ms var(--ease-out);
}

.waitlist__step--exit {
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-out);
}

/* --- Email field --- */

.waitlist__field {
  width: 100%;
}

.waitlist__input {
  min-height: 48px;
  font-size: 16px; /* prevent iOS zoom on focus */
  text-align: left;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

/* --- Step 2: Heading --- */

.waitlist__heading {
  font-size: clamp(28px, 5vw + 0.5rem, 46px);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  letter-spacing: var(--letter-spacing-tight);
  text-align: center;
}

.waitlist__subheading {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  padding-bottom: 6px;
  text-align: center;
}

/* --- Step 2: Option cards --- */

.waitlist__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  width: 100%;
}

.waitlist__option {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  display: block;
  width: 100%;
}

.waitlist__option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.waitlist__option-card {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1.5px solid transparent;
  transition:
    background-color var(--duration-normal) var(--ease-out),
    border-color var(--duration-normal) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.waitlist__option-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.waitlist__option input:checked + .waitlist__option-card {
  background-color: var(--bg-surface);
  border-color: var(--accent);
}

.waitlist__option-card:active {
  transform: scale(0.98);
}

.waitlist__option-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.waitlist__option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.waitlist__option-label {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.waitlist__option-desc {
  font-size: var(--font-size-caption);
  color: var(--text-secondary);
  line-height: var(--line-height-normal);
}

/* --- CTA Button --- */

.waitlist__cta {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--cta-bg);
  color: var(--cta-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  margin-top: var(--space-4);
  transition:
    opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.waitlist__cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.waitlist__cta:active {
  transform: translateY(0);
  opacity: 0.85;
}

.waitlist__cta:disabled {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  cursor: not-allowed;
  transform: none;
  opacity: 1;
}

/* --- Skip link (subtle escape hatch) --- */

.waitlist__skip {
  width: 100%;
  text-align: center;
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  opacity: 0.4;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-8);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.waitlist__skip:hover {
  opacity: 0.7;
}

/* --- Status --- */

.waitlist__status {
  text-align: left;
  font-size: var(--font-size-small);
  min-height: 20px;
}

.waitlist__status--success { color: var(--opal-teal); }
.waitlist__status--error { color: var(--opal-rose); }

/* --- Step 3: Confirmation --- */

.waitlist__confirm-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
  margin-bottom: var(--space-4);
}

.waitlist__confirm-logo {
  width: 72px;
  height: 72px;
}

.waitlist__confirm-heading {
  font-size: clamp(28px, 5vw + 0.5rem, 46px);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  letter-spacing: var(--letter-spacing-tight);
}

.waitlist__confirm-sub {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  text-align: center;
  max-width: 300px;
  margin-bottom: var(--space-4);
}

/* Social box (card style matching step 2 options) */
.waitlist__confirm-social-box {
  width: 100%;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  padding: var(--space-24) var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}

.waitlist__confirm-follow {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.waitlist__confirm-follow--muted {
  color: var(--text-secondary);
  font-weight: var(--font-weight-regular);
}

.waitlist__confirm-icons {
  display: flex;
  gap: var(--space-24);
}

/* Icon circles (matching step 2 emoji circles) */
.waitlist__confirm-icon-circle {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  color: #FFFFFF;
  transition:
    background-color var(--duration-fast) var(--ease-out);
}

.waitlist__confirm-icon-circle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

/* Learn more link */
.waitlist__confirm-about {
  display: inline-block;
  font-size: var(--font-size-small);
  color: var(--text-primary);
  opacity: 0.6;
  margin-top: var(--space-8);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.waitlist__confirm-about:hover {
  opacity: 1;
}

/* ==========================================================================
   APP PREVIEW (future)
   ========================================================================== */

.app-preview { display: none; }
.app-preview:not(:empty) { display: block; padding-block: var(--space-64); }

/* ==========================================================================
   FOOTER — flows naturally on mobile, absolute on desktop
   ========================================================================== */

.site-footer {
  padding: var(--space-16) clamp(20px, 5vw, 80px);
  background: none;
  z-index: 10;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-8);
  font-size: var(--font-size-small);
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.site-footer__socials {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.site-footer__social {
  color: var(--text-secondary);
  opacity: 0.5;
  padding: var(--space-8);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.site-footer__social:hover {
  opacity: 1;
}

.site-footer__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  opacity: 0.4;
}

.site-footer__link {
  color: var(--text-secondary);
  font-size: var(--font-size-small);
  opacity: 0.5;
  padding: var(--space-8); /* larger tap target */
  transition: opacity var(--duration-fast) var(--ease-out);
}

.site-footer__link:hover { opacity: 1; }

/* ==========================================================================
   TABLET — 768px+
   ========================================================================== */

@media (min-width: 768px) {
  .hero__layout {
    gap: var(--space-48);
  }

  .hero__screenshots {
    max-height: 420px;
  }

  .hero__logo {
    width: 88px;
  }
}

/* ==========================================================================
   DESKTOP — 1024px+ (two-column layout)
   ========================================================================== */

@media (min-width: 1024px) {
  html {
    height: 100dvh;
    overflow: hidden;
    scroll-behavior: auto;
  }

  body {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .hero {
    flex: 1;
    min-height: 0;
    overflow-x: clip;
    overflow-y: clip;
    padding-bottom: 0;
  }

  .hero__layout {
    flex-direction: row;
    align-items: center;
    gap: var(--space-48);
    flex: 1;
    min-height: 0;
  }

  .hero__left {
    flex: 0 0 380px;
    gap: var(--space-16);
    align-items: flex-start;
    text-align: left;
    min-height: 0;
    overflow: hidden;
    padding: 2px;
  }

  .waitlist {
    min-height: 0;
    flex: 0;
  }

  .hero__title {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .hero__title-line {
    display: block;
  }

  .hero__logo {
    width: 100px;
  }

  .hero__right {
    flex: 1;
  }

  .hero__screenshots {
    max-height: calc((100dvh - 120px) * 0.77);
  }

  .site-footer {
    flex-shrink: 0;
  }

  .waitlist {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .site-footer__inner {
    justify-content: space-between;
  }
}

/* ==========================================================================
   LARGE DESKTOP — 1440px+
   ========================================================================== */

@media (min-width: 1440px) {
  .hero__left {
    flex: 0 0 420px;
  }
}
