/* ── App Download Landing — aurora glass at midnight ────────────────
   Space-navy ground, drifting aurora ribbons (teal/violet/magenta),
   frosted glass cards, tilted CSS phone mockup, glass store badges,
   QR tray, backlit teal CTA, starfield dots. */

:root {
  --space: #0a0e24;
  --space-deep: #060818;
  --teal: #35e0c8;
  --teal-deep: #1fb8a3;
  --violet: #8b6cf0;
  --magenta: #e05ac8;
  --white: #f4f6ff;
  --dim: #9aa1c4;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-line: rgba(255, 255, 255, 0.16);
  --err: #ff7d70;
  --sans: 'Sora', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--space), var(--space-deep));
  background-attachment: fixed;
  min-height: 100vh;
}

.night { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* ── Aurora ───────────────────────────────────────────────────────── */
.aurora { position: fixed; inset: 0; pointer-events: none; filter: blur(70px); opacity: 0.5; }

.aurora span { position: absolute; border-radius: 50%; }

.a1 {
  width: 60vw; height: 40vh;
  left: -10vw; top: 5vh;
  background: var(--teal);
  animation: auroraDrift 16s ease-in-out infinite;
}

.a2 {
  width: 50vw; height: 36vh;
  right: -12vw; top: 22vh;
  background: var(--violet);
  animation: auroraDrift 20s ease-in-out -6s infinite;
}

.a3 {
  width: 44vw; height: 30vh;
  left: 22vw; bottom: -8vh;
  background: var(--magenta);
  opacity: 0.7;
  animation: auroraDrift 24s ease-in-out -12s infinite;
}

@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -3vh) scale(1.12); }
}

/* ── Stars ────────────────────────────────────────────────────────── */
.stars { position: fixed; inset: 0; pointer-events: none; }

.stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.6;
  animation: twinkle 3.4s ease-in-out infinite;
}

.stars i:nth-child(1) { left: 12%; top: 18%; }
.stars i:nth-child(2) { left: 82%; top: 12%; animation-delay: -1s; }
.stars i:nth-child(3) { left: 28%; top: 42%; animation-delay: -2s; }
.stars i:nth-child(4) { left: 68%; top: 36%; animation-delay: -0.5s; }
.stars i:nth-child(5) { left: 8%; top: 68%; animation-delay: -1.6s; }
.stars i:nth-child(6) { left: 90%; top: 62%; animation-delay: -2.4s; }
.stars i:nth-child(7) { left: 46%; top: 8%; animation-delay: -3s; }
.stars i:nth-child(8) { left: 58%; top: 78%; animation-delay: -1.2s; }

@keyframes twinkle { 50% { opacity: 0.12; } }

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 24px 56px;
  flex: 1 0 auto;
}

/* ── Glass ────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(6, 8, 24, 0.5);
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 54px 10px 6px; }

.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(53, 224, 200, 0.4);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 18px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(2.6rem, 11vw, 4rem);
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--white), var(--teal) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline { color: var(--dim); font-weight: 500; max-width: 400px; margin: 12px auto 0; }

/* ── Phone ────────────────────────────────────────────────────────── */
.phone-stage { display: flex; justify-content: center; padding: 34px 0 10px; }

.phone {
  position: relative;
  width: 220px;
  border-radius: 34px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px;
  transform: rotate(-4deg);
  box-shadow: 0 24px 50px rgba(6, 8, 24, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-10px); }
}

.notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 14px;
  border-radius: 999px;
  background: var(--space-deep);
  z-index: 2;
}

.screen {
  border-radius: 26px;
  background: linear-gradient(175deg, #131a3e, #0b0f2c 70%);
  padding: 44px 20px 26px;
  text-align: center;
  min-height: 300px;
}

.app-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--space-deep);
  background: linear-gradient(135deg, var(--teal), var(--violet));
  box-shadow: 0 0 26px rgba(53, 224, 200, 0.55);
}

.screen-greet { font-weight: 700; font-size: 1.05rem; margin-top: 18px; }

.screen-sub { color: var(--dim); font-size: 0.74rem; margin-top: 8px; line-height: 1.5; }

.screen-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  overflow: hidden;
}

.screen-bar span {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--violet));
}

/* ── Download ─────────────────────────────────────────────────────── */
.get {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  margin-top: 26px;
}

.badges { display: flex; flex-direction: column; gap: 10px; flex: 1; }

.store-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 10px 18px;
  transition: all 0.15s ease;
}

.store-badge:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }

.badge-glyph { font-size: 1.25rem; }

.badge-text { display: flex; flex-direction: column; font-weight: 700; font-size: 0.88rem; line-height: 1.2; }

.badge-text small { font-weight: 500; font-size: 0.62rem; color: var(--dim); }

.qr-tray {
  flex: 0 0 auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 12px 12px 8px;
}

.qr-tray img {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 8px;
  background: #fff;
  padding: 5px;
}

.qr-cap {
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 7px;
}

/* ── Benefits ─────────────────────────────────────────────────────── */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.benefit { padding: 18px 16px; text-align: center; }

.b-icon { font-size: 1.5rem; }

.benefit h3 { font-weight: 700; font-size: 0.84rem; margin-top: 10px; }

.benefit p { color: var(--dim); font-size: 0.74rem; line-height: 1.5; margin-top: 6px; }

/* ── Mail me ──────────────────────────────────────────────────────── */
.mailme { padding: 26px 26px 24px; margin-top: 22px; text-align: center; }

.mailme h2 { font-weight: 800; font-size: 1.3rem; }

.mail-sub { color: var(--dim); font-size: 0.88rem; margin-top: 6px; }

.mail-row { display: flex; gap: 10px; margin-top: 18px; }

input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--white);
  background: rgba(6, 8, 24, 0.6);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 14px rgba(53, 224, 200, 0.25); }
input.error { border-color: var(--err); }
input::placeholder { color: #5d6390; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.86rem;
  color: var(--space-deep);
  background: linear-gradient(180deg, #5ff0da, var(--teal-deep));
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 0 24px rgba(53, 224, 200, 0.45);
}

.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 34px rgba(53, 224, 200, 0.65); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

.form-error { color: var(--err); font-weight: 700; font-size: 0.85rem; margin-top: 12px; }

.mail-done { padding: 6px 0; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2.5px solid rgba(6, 8, 24, 0.3);
  border-top-color: var(--space-deep);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 20px;
  color: var(--dim);
  font-size: 0.78rem;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .get { flex-direction: column; }
  .badges { width: 100%; }
  .benefits { grid-template-columns: 1fr; }
  .mail-row { flex-direction: column; }
}
