/* public/css/landing.css — landing-page styles and iMessage demo */

/* ── Header (landing only) ────────────────────────────────────────────────── */

.landing-body .site-header {
  padding: 0.875rem 1.5rem;
  display: flex;
  justify-content: space-between;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header__cta {
  background: #fff;
  color: #1a1a2e;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
}

.site-header__cta:hover { opacity: 0.9; }

/* ── Page shell overrides (landing only) ──────────────────────────────────── */

.landing-body .page-main {
  display: block;
  padding: 0;
}

.landing-page {
  max-width: none;
  width: 100%;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

/* Shared max-width wrapper used inside each section */
.landing-page .features,
.landing-page .usecases,
.landing-page .early-access,
.landing-page .already-have-access,
.landing-page .faq,
.landing-page .page-footer,
.landing-page .site-footer {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(180deg, #eef1ff 0%, #f4f6f9 100%);
  padding: 3rem 1.5rem 2.5rem;
}

.hero__inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero__copy {
  flex: 1 1 380px;
  text-align: left;
  min-width: 0;
}

.hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #4a6cf7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1a1a2e;
  margin: 0;
}

.hero__subtitle {
  font-size: 1.0625rem;
  color: #4b5060;
  line-height: 1.55;
  margin: 1rem 0 0;
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

/* Specificity (0,2,0) beats onboarding.css's .btn-primary (0,1,0) regardless
   of stylesheet load order, so the hero buttons don't stretch full-width. */
.hero__actions .btn {
  width: auto;
}

.hero__inner .pricing-chips {
  justify-content: flex-start;
  margin: 1.5rem 0 0;
}

/* ── Feature cards ────────────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-top: 2.5rem;
  padding-bottom: 0.5rem;
  max-width: 980px;
}

.feature-card {
  background: #fff;
  border: 1px solid #e9ebf3;
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.feature-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #eef1ff;
  border-radius: 10px;
  margin: 0 auto 0.875rem;
}

.feature-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 0.375rem;
}

.feature-card__desc {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* ── Section heading ──────────────────────────────────────────────────────── */

.section-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  margin: 0 0 1rem;
}

/* ── Use-case chips ───────────────────────────────────────────────────────── */

.usecases {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.usecase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.usecase-chip {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── Pricing chips ────────────────────────────────────────────────────────── */

.pricing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pricing-chip {
  background: #fff;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.3rem 0.625rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── Demo wrapper ─────────────────────────────────────────────────────────── */

.demo-wrapper {
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  /* overflow: visible so the phone's box-shadow is not clipped by the wrapper */
  overflow: visible;
}

/* ── Phone shell ──────────────────────────────────────────────────────────── */

.demo-phone {
  position: relative;
  width: 228px;
  background: linear-gradient(160deg, #252528 0%, #1a1a1e 50%, #141416 100%);
  border-radius: 46px;
  padding: 10px 12px 14px;
  box-shadow:
    0 0 0 1.5px #3a3a3c,
    0 8px 20px rgba(0, 0, 0, 0.35),
    0 32px 72px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Left side buttons (volume up / volume down) */
.demo-phone::before {
  content: '';
  position: absolute;
  top: 82px;
  left: -3.5px;
  width: 3.5px;
  height: 26px;
  background: #3a3a3c;
  border-radius: 2px 0 0 2px;
  /* box-shadow stacks a second button below the first */
  box-shadow: 0 38px 0 #3a3a3c;
}

/* Right side button (power) */
.demo-phone::after {
  content: '';
  position: absolute;
  top: 102px;
  right: -3.5px;
  width: 3.5px;
  height: 52px;
  background: #3a3a3c;
  border-radius: 0 2px 2px 0;
}

/* ── Dynamic Island notch ─────────────────────────────────────────────────── */

.demo-notch {
  width: 54px;
  height: 10px;
  background: #1a1a1e;
  border-radius: 7px;
  margin: 0 auto 4px;
}

/* ── Screen ───────────────────────────────────────────────────────────────── */

.demo-screen {
  background: #f2f2f7;
  border-radius: 34px;
  height: 418px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Match the iOS system font stack */
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

/* ── Status bar ───────────────────────────────────────────────────────────── */

.demo-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 16px 2px;
  font-size: 10px;
  font-weight: 600;
  color: #1c1c1e;
  flex-shrink: 0;
}

.demo-statusbar__icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Contact header ───────────────────────────────────────────────────────── */

.demo-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px 7px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.demo-contact__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #007aff;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
}

.demo-contact__name {
  font-size: 10px;
  font-weight: 600;
  color: #1c1c1e;
}

/* ── Messages area ────────────────────────────────────────────────────────── */

.demo-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  /* Hide the scrollbar — scrolling is decorative */
  scrollbar-width: none;
}

.demo-messages::-webkit-scrollbar {
  display: none;
}

/* ── Message bubbles ──────────────────────────────────────────────────────── */

.demo-bubble {
  max-width: 78%;
  padding: 7px 11px;
  border-radius: 17px;
  font-size: 8px;
  line-height: 1.4;
  text-align: left;
  word-break: break-word;
  /* Preserve \n line breaks in textContent */
  white-space: pre-wrap;
}

/* Received (LowSignalMail → user) */
.demo-bubble--system {
  background: #e5e5ea;
  color: #1c1c1e;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

/* Sent (user → LowSignalMail) */
.demo-bubble--user {
  background: #007aff;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

@keyframes demo-bubble-in {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .demo-bubble {
    animation: demo-bubble-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  }
}

/* ── Input bar ────────────────────────────────────────────────────────────── */

.demo-inputbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 8px;
  background: #f2f2f7;
  border-top: 0.5px solid rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
}

.demo-inputbar__field {
  flex: 1;
  background: #fff;
  border: 0.75px solid #c7c7cc;
  border-radius: 18px;
  padding: 5px 11px;
  font-size: 10px;
  line-height: 1.3;
  text-align: left;
  color: #8e8e93;
  font-family: inherit;
  user-select: none;
}

.demo-inputbar__btn {
  width: 24px;
  height: 24px;
  background: #007aff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

/* ── Early access form ────────────────────────────────────────────────────── */

.early-access {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  margin: 1.5rem auto 1rem;
  text-align: center;
  scroll-margin-top: 1.5rem;
}

.early-access__heading {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.375rem;
}

.early-access__desc {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.875rem;
}

.early-access__form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.early-access__input {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  padding: 0.6rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #fff;
  outline: none;
}

.early-access__input:focus {
  border-color: #4a6cf7;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.14);
}

.early-access__btn {
  white-space: nowrap;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

.early-access__success {
  color: #166534;
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0;
}

/* ── Already-have-access note ─────────────────────────────────────────────── */

.already-have-access {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  margin: 0 auto 2rem;
}

.already-have-access a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.already-have-access a:hover {
  text-decoration: underline;
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */

.faq {
  margin: 0 auto 2.5rem;
  text-align: left;
}

.faq__heading {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem;
  text-align: center;
}

.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item__q {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

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

.faq-item__q::after {
  content: '+';
  font-size: 1.125rem;
  color: #9ca3af;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

details[open] .faq-item__q::after {
  content: '\2212';
}

.faq-item__a {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.5rem 0 0.125rem;
  line-height: 1.6;
}

/* ── Page footer (landing) ────────────────────────────────────────────────── */

.landing-page .page-footer {
  margin-top: 0;
  padding-bottom: 0.5rem;
}

.landing-page .site-footer {
  margin-top: 0.5rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero__inner {
    flex-direction: column;
    gap: 2rem;
  }

  .hero__copy {
    text-align: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions,
  .hero__inner .pricing-chips {
    justify-content: center;
  }

  .features {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.25rem 1rem 2rem;
  }

  .hero__title {
    font-size: 1.875rem;
  }

  .hero__actions .btn {
    width: 100%;
  }
}
