/* OpenTribes landing — mobile-first, neon concert-stage K-pop style,
   Apple-style type hierarchy: one huge idea per section, minimal copy.
   Brand orange from the app's tailwind.config.js, plus neon stage accents. */
:root {
  --orange: #F36019;
  --orange-soft: #ff8a4d;
  --pink: #ff4fa3;
  --violet: #8b5cf6;
  --cyan: #4fd8ff;
  --stage: #0a0818;
  --indigo: #2D264B;
  --indigo-deep: #1d1834;
  --indigo-card: #372f5c;
  --text: #f5f2ff;
  --text-dim: #b8b0d6;
  --radius: 18px;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--stage);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; }

img { max-width: 100%; display: block; }

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

.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem;
  text-shadow: 0 0 18px rgba(79, 216, 255, 0.6);
}

.glow-text {
  font-style: normal;
  background: linear-gradient(120deg, var(--orange-soft), var(--pink) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 79, 163, 0.45));
}

/* ── Scroll reveals ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--stage) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--text); text-decoration: none;
}
.nav-logo { height: 28px; width: auto; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--orange-soft), var(--orange) 55%, var(--pink));
  background-size: 180% 180%;
  color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 0.95rem; text-decoration: none;
  border: none; border-radius: 999px; padding: 0.85rem 1.75rem;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 24px rgba(243, 96, 25, 0.4), 0 0 40px rgba(255, 79, 163, 0.18);
  animation: btn-sheen 5s ease-in-out infinite;
}
@keyframes btn-sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(243, 96, 25, 0.55), 0 0 55px rgba(255, 79, 163, 0.35);
}
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-small { padding: 0.5rem 1.1rem; font-size: 0.78rem; }

/* ── Hero: the stage ── */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 4.5rem 1.25rem 5.5rem;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(139, 92, 246, 0.28), transparent),
    radial-gradient(ellipse 45% 40% at 12% 30%, rgba(255, 79, 163, 0.12), transparent),
    radial-gradient(ellipse 45% 40% at 88% 26%, rgba(79, 216, 255, 0.10), transparent),
    var(--stage);
}
.hero-inner { position: relative; z-index: 3; max-width: 780px; margin: 0 auto; }

/* stage light beams */
.stage-lights { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.beam {
  position: absolute; top: -12%;
  width: 32vw; min-width: 190px; height: 130%;
  opacity: 0.5;
  transform-origin: top center;
  filter: blur(6px);
}
.beam-1 {
  left: 4%;
  background: linear-gradient(178deg, rgba(255, 79, 163, 0.35), transparent 68%);
  animation: sway 9s ease-in-out infinite;
}
.beam-2 {
  left: 50%; margin-left: -16vw;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.32), transparent 70%);
  animation: sway 11s ease-in-out -3s infinite reverse;
}
.beam-3 {
  right: 4%;
  background: linear-gradient(182deg, rgba(79, 216, 255, 0.3), transparent 68%);
  animation: sway 10s ease-in-out -6s infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

/* twinkling sparkles */
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles span {
  position: absolute; width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: twinkle 3.4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 0.9; transform: scale(1); }
}
.sparkles span:nth-child(1)  { top: 12%; left: 8%;  animation-delay: 0s; }
.sparkles span:nth-child(2)  { top: 24%; left: 82%; animation-delay: 0.5s; }
.sparkles span:nth-child(3)  { top: 62%; left: 12%; animation-delay: 1s; }
.sparkles span:nth-child(4)  { top: 18%; left: 46%; animation-delay: 1.4s; }
.sparkles span:nth-child(5)  { top: 74%; left: 88%; animation-delay: 1.9s; }
.sparkles span:nth-child(6)  { top: 42%; left: 94%; animation-delay: 2.3s; }
.sparkles span:nth-child(7)  { top: 84%; left: 34%; animation-delay: 2.7s; }
.sparkles span:nth-child(8)  { top: 8%;  left: 68%; animation-delay: 3s; }
.sparkles span:nth-child(9)  { top: 52%; left: 4%;  animation-delay: 0.8s; }
.sparkles span:nth-child(10) { top: 68%; left: 60%; animation-delay: 1.7s; }

/* floating photocards */
.float-cards { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fcard {
  position: absolute; width: 74px; aspect-ratio: 5 / 7;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 79, 163, 0.25);
  opacity: 0.9;
}
.fcard-1 { top: 16%; left: -6px;  transform: rotate(-12deg); animation: card-float 7s ease-in-out infinite; }
.fcard-2 { top: 10%; right: 2%;   transform: rotate(10deg);  animation: card-float 8s ease-in-out -2.5s infinite; width: 60px; }
.fcard-3 { bottom: 14%; right: -8px; transform: rotate(-8deg); animation: card-float 9s ease-in-out -5s infinite; width: 66px; }
.fcard-4 { bottom: 10%; left: -2px; transform: rotate(9deg); animation: card-float 8.5s ease-in-out -1.5s infinite; width: 58px; }
@keyframes card-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(243, 96, 25, 0.12);
  border: 1px solid rgba(243, 96, 25, 0.45);
  color: var(--orange-soft);
  font-weight: 600; font-size: 0.8rem;
  border-radius: 999px; padding: 0.4rem 1rem; margin-bottom: 1.6rem;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 96, 25, 0.6); }
  50% { box-shadow: 0 0 0 7px rgba(243, 96, 25, 0); }
}

.hero h1 { font-size: clamp(2.4rem, 10.5vw, 4.6rem); font-weight: 800; margin-bottom: 1.4rem; letter-spacing: -0.01em; }
.hero-sub { color: var(--text-dim); font-size: clamp(1.05rem, 4.2vw, 1.35rem); line-height: 1.5; max-width: 560px; margin: 0 auto 2.5rem; }
.hero-note { color: var(--text-dim); font-size: 0.82rem; margin-top: 1rem; }

.scroll-hint {
  position: absolute; left: 0; right: 0; bottom: 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  color: var(--text-dim); z-index: 3;
}
.scroll-hint-label {
  font-family: var(--font-display); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.scroll-hint-arrow { font-size: 1.1rem; animation: hint-drop 1.8s ease-in-out infinite; }
@keyframes hint-drop {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ── Signup form ── */
.signup-form {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
  max-width: 480px; margin: 0 auto;
}
.signup-form input[type='email'] {
  flex: 1 1 220px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  font-size: 1rem;
  padding: 0.85rem 1.4rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.signup-form input[type='email']::placeholder { color: var(--text-dim); }
.signup-form input[type='email']:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 79, 163, 0.18);
}
.form-status { flex-basis: 100%; font-size: 0.9rem; min-height: 1.4em; font-weight: 600; }
.form-status.ok { color: #6fe3a1; }
.form-status.err { color: #ff9b7a; }

/* ── Ticker marquee ── */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 0;
}
.ticker-track { display: inline-flex; animation: ticker-scroll 26s linear infinite; }
.ticker-track span {
  font-family: var(--font-display); font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.18em;
  padding-right: 2rem;
  background: linear-gradient(90deg, var(--orange-soft), var(--pink), var(--violet), var(--cyan), var(--orange-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Promise: the safety statement ── */
.promise {
  text-align: center;
  padding: 5.5rem 0 4rem;
}
.promise .eyebrow, .promise h2, .promise-sub { padding-inline: 1.25rem; }
.promise h2 {
  font-size: clamp(1.9rem, 8.5vw, 3.4rem); font-weight: 800;
  max-width: 820px; margin: 0 auto 1.2rem;
}
.promise-sub {
  color: var(--text-dim); font-size: clamp(1rem, 4vw, 1.2rem);
  max-width: 520px; margin: 0 auto;
}

/* Horizontal snap rail (Apple-style card carousel on mobile) */
.rail {
  display: flex; gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2.75rem 1.25rem 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  flex: 0 0 min(66vw, 250px);
  scroll-snap-align: center;
  text-align: left;
  background: rgba(55, 47, 92, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.45rem;
}
.rail-ico { font-size: 1.6rem; display: block; margin-bottom: 0.8rem; }
.rail-card b { font-family: var(--font-display); font-size: 1rem; display: block; margin-bottom: 0.4rem; }
.rail-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

/* ── Flow sections: one idea + live prototype ── */
.flow {
  max-width: 1000px; margin: 0 auto;
  padding: 4.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 2.75rem;
  align-items: center; text-align: center;
}
.flow-copy { max-width: 560px; }
.flow-phone { display: flex; flex-direction: column; align-items: center; }
.flow h2 { font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 800; margin-bottom: 1.1rem; letter-spacing: -0.01em; }
.flow-sub { color: var(--text-dim); font-size: clamp(1rem, 4vw, 1.2rem); line-height: 1.55; max-width: 30em; margin: 0 auto; }
.flow-hint {
  margin-top: 1.4rem;
  font-family: var(--font-display); font-weight: 500; font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pink);
  text-shadow: 0 0 14px rgba(255, 79, 163, 0.5);
}
.flow-open {
  margin-top: 0.7rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-dim); text-decoration: none;
  border-bottom: 1px solid rgba(184, 176, 214, 0.4);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.flow-open:hover { color: var(--cyan); border-color: var(--cyan); }

/* phone frame */
.phone {
  width: min(330px, 86vw); aspect-ratio: 393 / 830;
  background: #0e0b1e;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 44px;
  padding: 10px;
  position: relative;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 55px rgba(139, 92, 246, 0.22);
}
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 18px; border-radius: 999px;
  background: #0e0b1e; z-index: 3;
  pointer-events: none;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 34px; overflow: hidden; position: relative;
  background: var(--indigo);
}
.phone-screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-screen > iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; background: #000;
}

/* click-to-load prototype: poster + play button until tapped */
.proto-play {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  z-index: 4;
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: linear-gradient(135deg, var(--orange-soft), var(--orange) 55%, var(--pink));
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  border: none; border-radius: 999px; padding: 0.8rem 1.5rem;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 24px rgba(243, 96, 25, 0.5), 0 0 40px rgba(255, 79, 163, 0.25);
  transition: transform 0.15s ease;
}
.proto-play:hover { transform: translateX(-50%) translateY(-2px); }
.proto-play-ico { font-size: 0.7rem; }
.phone-screen.proto-live > img,
.phone-screen.proto-live > .proto-play { display: none; }

/* loading overlay: covers the screen from tap until the embed is ready */
.proto-loading {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; text-align: center; padding: 1.5rem;
  background: var(--indigo-deep);
  color: var(--text);
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
}
.proto-loading small {
  font-family: var(--font-body); font-weight: 400; font-size: 0.78rem;
  color: var(--text-dim);
}
.proto-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--orange);
  animation: proto-spin 0.9s linear infinite;
}
@keyframes proto-spin { to { transform: rotate(360deg); } }
/* dim the poster slightly so the play button reads as the action */
.phone-screen:not(.proto-live)::after {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 8, 24, 0.55));
  pointer-events: none;
}

/* ── Finale ── */
.finale {
  position: relative; overflow: hidden;
  text-align: center;
  padding: 6.5rem 1.25rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 115%, rgba(243, 96, 25, 0.25), transparent),
    radial-gradient(ellipse 55% 45% at 50% -10%, rgba(139, 92, 246, 0.2), transparent),
    var(--indigo-deep);
}
.finale h2 { font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 800; margin-bottom: 1rem; position: relative; z-index: 2; }
.finale-sub { color: var(--text-dim); font-size: clamp(1rem, 4vw, 1.15rem); margin-bottom: 2.25rem; position: relative; z-index: 2; }
.finale .eyebrow, .finale .signup-form { position: relative; z-index: 2; }

/* ── FAQ ── */
.faq { max-width: 720px; margin: 0 auto; padding: 4.5rem 1.25rem; }
.faq h2 { text-align: center; font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: 2.25rem; }
.faq details {
  background: rgba(55, 47, 92, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: rgba(255, 79, 163, 0.4); }
.faq summary {
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--pink); font-size: 1.3rem; flex-shrink: 0; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--text-dim); padding-top: 0.75rem; font-size: 0.95rem; }

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 1.25rem 2.5rem;
  text-align: center;
}
.footer-logo { height: 42px; width: auto; margin: 0 auto 1.25rem; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.5rem; }
.socials a {
  color: var(--text-dim); text-decoration: none; font-size: 0.9rem; font-weight: 600;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.socials a:hover { color: var(--pink); text-shadow: 0 0 14px rgba(255, 79, 163, 0.6); }
.copyright { color: var(--text-dim); font-size: 0.8rem; }

/* ── Tablet / desktop: flows become alternating two-column ── */
@media (min-width: 760px) {
  .fcard { width: 110px; }
  .fcard-1 { left: 4%; }
  .fcard-2 { right: 7%; width: 88px; }
  .fcard-3 { right: 5%; }
  .fcard-4 { left: 6%; width: 84px; }

  .rail {
    max-width: 1080px; margin: 0 auto;
    justify-content: center;
    overflow-x: visible; flex-wrap: wrap;
  }
  .rail-card { flex: 0 1 240px; }

  .flow {
    flex-direction: row; justify-content: space-between;
    text-align: left; gap: 3rem;
    padding: 5.5rem 2rem;
  }
  .flow-flip { flex-direction: row-reverse; }
  .flow-copy { flex: 1; }
  .flow-sub { margin: 0; }
  .flow-phone { flex-shrink: 0; }
  .flow .phone { width: 340px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .beam, .sparkles span, .fcard, .btn,
  .ticker-track, .scroll-hint-arrow, .badge-dot {
    animation: none !important;
  }
  .sparkles span { opacity: 0.5; }
}
