/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0c0a08;
  --bg-light: #1a1410;
  --bg-card: #1e1812;
  --primary: #C98A46;
  --primary-hover: #d9a060;
  --primary-glow: rgba(201, 138, 70, 0.15);
  --secondary: #412518;
  --secondary-alpha: rgba(65, 37, 24, 0.5);
  --text: #FFFFFF;
  --text-muted: #b0a89e;
  --sand: #d4a65a;
  --sand-dark: #8b5e34;
  --radius: 16px;
  --max-width: 800px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

/* ===== Starry Night Sky ===== */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* Big bright stars */
    radial-gradient(3px 3px at 8% 10%, #ffd98c, transparent),
    radial-gradient(3px 3px at 52% 5%, #ffe4a8, transparent),
    radial-gradient(3px 3px at 88% 15%, #ffd98c, transparent),
    radial-gradient(2.5px 2.5px at 30% 22%, #ffe4a8, transparent),
    radial-gradient(3px 3px at 72% 28%, #ffd98c, transparent),
    radial-gradient(2.5px 2.5px at 15% 38%, #ffe4a8, transparent),
    radial-gradient(3px 3px at 92% 42%, #ffd98c, transparent),
    radial-gradient(2.5px 2.5px at 45% 18%, #ffe4a8, transparent),
    /* Medium stars */
    radial-gradient(2px 2px at 20% 8%, #ffecc4, transparent),
    radial-gradient(2px 2px at 62% 14%, #ffecc4, transparent),
    radial-gradient(2px 2px at 38% 32%, #ffecc4, transparent),
    radial-gradient(2px 2px at 78% 6%, #ffecc4, transparent),
    radial-gradient(2px 2px at 5% 28%, #ffecc4, transparent),
    radial-gradient(2px 2px at 95% 35%, #ffecc4, transparent),
    radial-gradient(2px 2px at 55% 40%, #ffecc4, transparent),
    radial-gradient(2px 2px at 25% 48%, #ffecc4, transparent),
    radial-gradient(2px 2px at 82% 52%, #ffecc4, transparent),
    radial-gradient(2px 2px at 12% 58%, #ffecc4, transparent),
    radial-gradient(2px 2px at 68% 45%, #ffecc4, transparent),
    /* Small dim stars */
    radial-gradient(1.5px 1.5px at 42% 12%, rgba(255, 230, 180, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 85% 22%, rgba(255, 230, 180, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 33% 42%, rgba(255, 230, 180, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 58% 30%, rgba(255, 230, 180, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 10% 50%, rgba(255, 230, 180, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 75% 38%, rgba(255, 230, 180, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 48% 55%, rgba(255, 230, 180, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 48%, rgba(255, 230, 180, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 22% 60%, rgba(255, 230, 180, 0.5), transparent),
    radial-gradient(1px 1px at 65% 55%, rgba(255, 230, 180, 0.4), transparent),
    radial-gradient(1px 1px at 3% 18%, rgba(255, 230, 180, 0.4), transparent),
    radial-gradient(1px 1px at 97% 8%, rgba(255, 230, 180, 0.5), transparent);
}

/* Twinkling animation layer */
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2.5px 2.5px at 18% 15%, #ffd98c, transparent),
    radial-gradient(2px 2px at 65% 10%, #ffe4a8, transparent),
    radial-gradient(2.5px 2.5px at 82% 25%, #ffd98c, transparent),
    radial-gradient(2px 2px at 40% 35%, #ffe4a8, transparent),
    radial-gradient(2.5px 2.5px at 55% 22%, #ffd98c, transparent),
    radial-gradient(2px 2px at 28% 45%, #ffe4a8, transparent),
    radial-gradient(2px 2px at 75% 40%, #ffd98c, transparent),
    radial-gradient(2px 2px at 8% 32%, #ffe4a8, transparent),
    radial-gradient(2px 2px at 93% 18%, #ffd98c, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* ===== Crescent Moon ===== */
.moon {
  position: fixed;
  top: 60px;
  right: 10%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    inset -18px -2px 0 0 #ffd98c,
    0 0 30px 8px rgba(255, 217, 140, 0.15),
    0 0 80px 20px rgba(255, 217, 140, 0.08);
  z-index: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .moon {
    width: 80px;
    height: 80px;
    top: 80px;
    right: 15%;
    box-shadow:
      inset -22px -2px 0 0 #ffd98c,
      0 0 40px 10px rgba(255, 217, 140, 0.18),
      0 0 100px 30px rgba(255, 217, 140, 0.1);
  }
}

/* ===== Desert Dunes (fixed at bottom of hero area) ===== */
.desert-scene {
  position: relative;
  z-index: 1;
  pointer-events: none;
  margin-top: -20px;
}

.desert-scene svg {
  display: block;
  width: 100%;
}

/* ===== Header ===== */
header {
  position: relative;
  z-index: 1;
  padding: 20px 24px;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

#hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--sand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* Play Button */
#play-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: radial-gradient(circle at 40% 40%, var(--secondary), #1a0e08);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 60px rgba(201, 138, 70, 0.2), inset 0 0 30px rgba(201, 138, 70, 0.1);
}

#play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 80px rgba(201, 138, 70, 0.35), inset 0 0 30px rgba(201, 138, 70, 0.15);
}

#play-btn:active {
  transform: scale(0.96);
}

#play-btn svg {
  pointer-events: none;
}

/* Timer Display */
.timer {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-height: 1.4em;
}

/* ===== Desert Dunes Divider ===== */
.dunes-divider {
  position: relative;
  z-index: 1;
  height: 80px;
  margin: 0 -24px;
  overflow: hidden;
}

.dunes-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== Sections (shared) ===== */
section {
  position: relative;
  z-index: 1;
  padding: 56px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-align: center;
}

section p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

section p:last-child {
  margin-bottom: 0;
}

/* ===== App Screenshots Showcase ===== */
#app-showcase {
  padding: 56px 0;
  max-width: 100%;
  overflow: hidden;
}

#app-showcase h2 {
  padding: 0 24px;
}

#app-showcase p {
  text-align: center;
  padding: 0 24px;
}

.screenshots-scroll {
  display: flex;
  gap: 20px;
  padding: 32px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-card {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: center;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 138, 70, 0.15);
  transition: transform 0.3s;
}

.screenshot-card:hover {
  transform: translateY(-4px);
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .screenshots-scroll {
    justify-content: center;
  }

  .screenshot-card {
    width: 180px;
  }
}

/* ===== Feature Comparison ===== */
.comparison-table {
  background: var(--bg-card);
  border: 1px solid var(--secondary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.comparison-header {
  display: grid;
  grid-template-columns: 1fr 70px 70px;
  gap: 0;
  padding: 14px 16px;
  background: var(--secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr 70px 70px;
  gap: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--secondary-alpha);
  font-size: 0.9375rem;
  align-items: center;
}

.col-label, .feature-check, .feature-cross {
  text-align: center;
}

.col-label:first-child, .feature-name {
  text-align: left;
}

.col-app {
  color: var(--primary);
}

.feature-check {
  color: var(--primary);
  font-weight: 700;
}

.feature-cross {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.badge-free, .badge-premium {
  font-size: 0.625rem;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-free {
  background: var(--secondary-alpha);
  color: var(--text-muted);
}

.badge-premium {
  background: var(--primary);
  color: var(--bg);
}

.comparison-cta {
  padding: 20px 16px;
  text-align: center;
  border-top: 1px solid var(--secondary-alpha);
}

/* Buttons (shared) */
.btn-app, .btn-modal {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--sand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(201, 138, 70, 0.3);
}

.btn-app:hover, .btn-modal:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(201, 138, 70, 0.4);
}

/* ===== Content sections ===== */
#about, #benefits, #comparison {
  border-top: 1px solid var(--secondary-alpha);
}

section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--primary);
}

section h3:first-of-type {
  margin-top: 20px;
}

/* ===== FAQ ===== */
#faq {
  border-top: 1px solid var(--secondary-alpha);
}

#faq details {
  border: 1px solid var(--secondary);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

#faq details[open] {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(201, 138, 70, 0.1);
}

#faq summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 16px;
}

#faq details[open] summary::after {
  content: "\2212";
}

#faq summary:hover {
  background: var(--bg-light);
}

#faq details p {
  padding: 0 20px 16px;
}

/* ===== iOS Notice ===== */
.ios-notice {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
}

#ios {
  border-top: 1px solid var(--secondary-alpha);
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--secondary-alpha);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== Sticky Mobile Bar ===== */
#sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.95), rgba(12, 10, 8, 0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--primary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 768px) {
  #sticky-bar {
    display: none;
  }
}

.sticky-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.btn-sticky {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--sand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(201, 138, 70, 0.3);
}

.btn-sticky:hover {
  color: #fff;
  transform: scale(1.03);
}

/* ===== Session Modal ===== */
#session-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#session-modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--secondary);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 138, 70, 0.1);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text);
}

#modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 24px;
}

.btn-modal {
  font-size: 1rem;
  padding: 14px 32px;
}

/* ===== Ambient glow behind hero ===== */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 138, 70, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
