*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --myle-bg: #0a2a1c;
  --myle-bg-mid: #0c3121;
  --myle-bg-deep: #061912;
  --myle-accent: #8bbc37;
  --myle-accent-light: #a4d04a;
  --myle-accent-hover: #9acb42;
  --myle-accent-glow: rgba(139, 188, 55, 0.35);
  --myle-text: #ffffff;
  --myle-text-muted: rgba(255, 255, 255, 0.72);
  --myle-card-bg: rgba(255, 255, 255, 0.07);
  --myle-card-border: rgba(255, 255, 255, 0.14);
  --myle-store-bg: #0d0d0d;
  --myle-store-border: rgba(255, 255, 255, 0.18);
  --font-fallback: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', var(--font-fallback);
  --font-display: 'Outfit', var(--font-fallback);
  --radius-card: 24px;
  --radius-btn: 14px;
  --shadow-card: 0 32px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--myle-text);
  background: var(--myle-bg-deep);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding:
    max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(139, 188, 55, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(15, 61, 40, 0.6) 0%, transparent 50%),
    linear-gradient(165deg, #0f3d28 0%, var(--myle-bg-mid) 42%, var(--myle-bg-deep) 100%);
}

.page__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.5;
}

.page__glow--1 {
  width: min(320px, 70vw);
  height: min(320px, 70vw);
  top: 8%;
  left: -10%;
  background: rgba(139, 188, 55, 0.15);
}

.page__glow--2 {
  width: min(280px, 60vw);
  height: min(280px, 60vw);
  bottom: 5%;
  right: -8%;
  background: rgba(46, 125, 82, 0.2);
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: clamp(28px, 6vw, 40px) clamp(20px, 5vw, 32px);
  background: var(--myle-card-bg);
  border: 1px solid var(--myle-card-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.headline {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 5.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.88) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  margin: 0 0 16px;
  font-size: clamp(0.875rem, 3.5vw, 0.975rem);
  font-weight: 500;
  color: var(--myle-text-muted);
  letter-spacing: 0.01em;
}

.subtitle {
  margin: 0 0 clamp(20px, 4vw, 28px);
  font-size: clamp(0.9375rem, 3.8vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--myle-text-muted);
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

.subtitle--warning {
  color: #f0c674;
}

/* Primary open-app CTA */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 16px 28px;
  margin: 0 0 clamp(20px, 4vw, 28px);
  border: none;
  border-radius: var(--radius-btn);
  background: linear-gradient(180deg, var(--myle-accent-light) 0%, var(--myle-accent) 100%);
  color: #0a2a1c;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 4vw, 1.0625rem);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 4px 0 #5a8520,
    0 8px 24px var(--myle-accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 5px 0 #5a8520,
    0 12px 28px var(--myle-accent-glow);
}

.cta:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #5a8520,
    0 4px 12px var(--myle-accent-glow);
}

.cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.cta.is-opening {
  pointer-events: none;
  opacity: 0.92;
}

.cta__arrow {
  font-size: 1.25em;
  line-height: 1;
  transition: transform 0.15s ease;
}

.cta:hover .cta__arrow {
  transform: translateX(3px);
}

.cta__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(10, 42, 28, 0.25);
  border-top-color: #0a2a1c;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.cta.is-opening .cta__spinner {
  display: block;
}

.cta.is-opening .cta__arrow {
  display: none;
}

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

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(16px, 3vw, 20px);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Store download buttons */
.store-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  background: var(--myle-store-bg);
  border: 1px solid var(--myle-store-border);
  color: #fff;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.store-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  background: #141414;
}

.store-btn:active {
  transform: translateY(0);
}

.store-btn:focus-visible {
  outline: 2px solid var(--myle-accent);
  outline-offset: 3px;
}

.store-btn__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.store-btn__icon--play {
  width: 26px;
  height: 26px;
}

.store-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.15;
}

.store-btn__label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.store-btn__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.store-btn--google .store-btn__icon {
  color: #fff;
}

/* Tablet+ — side-by-side store buttons when both shown */
@media (min-width: 400px) {
  .store-nav:has(.store-btn--apple + .store-btn--google) {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .store-nav:has(.store-btn--apple + .store-btn--google) .store-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 160px;
    max-width: 100%;
    padding: 10px 14px;
  }

  .store-nav:has(.store-btn--apple + .store-btn--google) .store-btn__name {
    font-size: 1rem;
  }
}

@media (min-width: 480px) {
  .card {
    padding: 40px 36px;
  }

  .logo-wrap {
    width: 112px;
    height: 112px;
  }

  .logo {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 359px) {
  .store-btn {
    padding: 10px 14px;
  }

  .store-btn__name {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .store-btn,
  .cta__arrow {
    transition: none;
  }

  .cta__spinner {
    animation: none;
  }
}
