:root {
  --color-primary: #1773FC;
  --color-bg: #0b0e14;
  --color-surface: #121722;
  --color-text: #e9eef7;
  --color-muted: #a9b4c6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #0b0e14 0%, #0e1420 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { max-width: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; }

.container {
  width: 100%;
  max-width: var(--container);
  padding: 0 20px;
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: linear-gradient(180deg, rgba(18,23,34,0.75), rgba(18,23,34,0.2));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header.scrolled { background: rgba(18,23,34,0.9); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-logo { width: 28px; height: 28px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.12); background: #0b0e14; object-fit: cover; }
.brand-name { font-weight: 800; }
.nav { display: flex; gap: 10px; align-items: center; }
.nav-link {
  color: var(--color-muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
}
.nav-link:hover { color: var(--color-text); background: rgba(255,255,255,0.06); }
.cta {
  display: inline-block;
  color: #0b0e14;
  background: var(--color-primary);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.cta:hover { filter: brightness(1.05); }

/* Sections */
.section { padding: 72px 0; }
.section-title { margin: 0 0 12px; font-size: 28px; }
.section-text { margin: 0; color: var(--color-muted); }
/* Reduce render cost below fold */
.section-preview, .section-features, .section-features-brief, .section-stores, .section-subscribe, .section-social, .section-placeholder { content-visibility: auto; contain-intrinsic-size: 600px; }

/* Hero */
.section-hero {
  position: relative;
  overflow: hidden;
}
.section-hero .hero-mandala {
  position: absolute;
  inset: 0;
  background-image: url('./assets/mandala_bg.svg');
  background-repeat: repeat;
  background-size: 320px 320px;
  background-position: center;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}
.section-hero .hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 80% 10%, rgba(90,171,254,0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 80%, rgba(90,171,254,0.12), transparent 60%),
    linear-gradient(180deg, rgba(90,171,254,0.05), rgba(255,255,255,0));
  filter: saturate(120%);
  animation: bgShift 16s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.marquee {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 56px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.marquee-track {
  display: flex;
  gap: 28px;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 22s linear infinite;
}
.marquee span { color: var(--color-text); font-weight: 700; letter-spacing: 0.5px; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes bgShift {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.05) translateY(-6px); }
}
.hero-inner {
  display: grid;
  gap: 18px;
  place-items: center;
  text-align: center;
  min-height: calc(100dvh - 64px);
  position: relative;
  z-index: 1;
}
.hero-title { font-size: clamp(28px, 5vw, 56px); margin: 0; }
.hero-subtitle { color: var(--color-muted); margin: 0; max-width: 60ch; }
.hero-note { color: var(--color-muted); margin: 6px 0 0; font-size: 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-illustration { max-width: min(900px, 90%); width: 100%; height: auto; animation: floaty 10s ease-in-out infinite; }

/* Hero entrance animations */
.section-hero .hero-title { animation: heroFadeSlide 700ms ease both; }
.section-hero .hero-subtitle { animation: heroFadeSlide 800ms 80ms ease both; }
/* store-badges entrance animation removed */

@keyframes heroFadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Responsive tweaks */
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .header-inner { min-height: 56px; }
  .nav-link { display: none; }
  .hero-title { font-size: clamp(26px, 8vw, 42px); }
  .features-grid { grid-template-columns: 1fr; }
}

/* Store badges */
.store-badges { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.store-badge { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.store-badge img { height: 46px; width: auto; display: block; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35)); transition: transform 160ms ease, filter 160ms ease; }
/* Play badge pulse animation removed */
.store-badge:hover img { transform: translateY(-1px); filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45)); }
.store-badge[aria-disabled="true"] img { opacity: 0.55; filter: grayscale(20%); }
.store-badge[aria-disabled="true"] { cursor: not-allowed; pointer-events: none; }

@media (max-width: 640px) {
  .store-badge img { height: 40px; }
}

/* ctaPulse keyframes removed */

.button {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.button.primary { background: var(--color-primary); color: #0b0e14; box-shadow: var(--shadow); }
.button.primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.button.install { background: #01875F; color: #ffffff; box-shadow: var(--shadow); }
.button.install:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Placeholders */
.section-placeholder {
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Features */
.section-features { position: relative; }
.keywords-marquee {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  margin: 10px 0 22px;
  height: 40px;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.keywords-track {
  display: inline-flex;
  gap: 24px;
  padding: 0 16px;
  align-items: center;
  white-space: nowrap;
  color: var(--color-text);
  opacity: 0.75;
  animation: marquee 26s linear infinite;
}
.keywords-track span { font-weight: 700; letter-spacing: 0.3px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 140px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.feature-card:hover { transform: translateY(-2px); border-color: rgba(90,171,254,0.45); }
.feature-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(90,171,254,0.9), rgba(90,171,254,0.6));
  color: #0b0e14;
  box-shadow: 0 6px 18px rgba(90,171,254,0.35);
  font-size: 16px;
}
.feature-title { margin: 0; font-size: 18px; }
.feature-desc { margin: 0; color: var(--color-muted); line-height: 1.7; }

/* Preview (icon + screenshots) */
.section-preview { position: relative; }
.preview-inner { display: grid; gap: 12px; }
.app-icon { width: 96px; height: 96px; border-radius: 20%; box-shadow: 0 10px 30px rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08); background: #0b0e14; object-fit: cover; }

.screenshots-wrap { position: relative; overflow: hidden; }
.store-head { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 10px 8px 0; }
.store-head-icon { width: 96px; height: 96px; border-radius: 22%; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 20px rgba(0,0,0,0.35); background: #0b0e14; object-fit: cover; }
.store-head-body { display: grid; gap: 8px; }
.store-head-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.store-head-titles { display: grid; gap: 4px; }
.store-app-name { margin: 0; font-size: 22px; }
.store-dev { margin: 0; }
.store-dev .dev-name { color: #01875F; font-weight: 700; }
.store-stats { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--color-muted); }
.store-stats .stat { display: inline-flex; gap: 6px; align-items: center; }
.store-stats .stat i { color: #ffd166; }
.store-stats .divider { width: 1px; height: 14px; background: rgba(255,255,255,0.12); display: inline-block; }
.store-head-action { min-width: 140px; text-align: center; }
.swiper { padding: 4px 4px 10px; overflow: hidden; }
.swiper-slide { display: flex; align-items: center; justify-content: center; }
.shot-img { width: auto; max-width: 100%; height: clamp(360px, 68vh, 680px); display: block; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 40px rgba(0,0,0,0.35); object-fit: contain; }
.swiper-button-next, .swiper-button-prev { color: var(--color-text); filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45)); }
.swiper-pagination-bullet { background: rgba(255,255,255,0.7); opacity: 1; }
.swiper-pagination-bullet-active { background: var(--color-primary); }
.edge-fade { position: absolute; top: 0; bottom: 0; width: 24px; pointer-events: none; }
.edge-fade.left { left: 0; background: linear-gradient(90deg, rgba(11,14,20,0.9), rgba(11,14,20,0)); }
.edge-fade.right { right: 0; background: linear-gradient(270deg, rgba(11,14,20,0.9), rgba(11,14,20,0)); }

@media (max-width: 640px) {
  .app-icon { width: 80px; height: 80px; }
  .shot-img { height: clamp(260px, 52vh, 520px); }
  .store-head { grid-template-columns: 72px 1fr; }
  .store-head-icon { width: 72px; height: 72px; }
  .store-head-action { width: 100%; }
}

/* Why choose */
.section-why { position: relative; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 12px; }

/* Features brief */
.section-features-brief { background: rgba(255,255,255,0.03); border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
.brief-list { margin: 10px 0 0; padding-inline-start: 20px; line-height: 1.9; color: var(--color-text); }

/* Stores secondary */
.section-stores { text-align: center; }

/* Subscribe */
.subscribe-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 560px; margin: 10px auto 0; }
.subscribe-form input[type="email"] { width: 100%; border-radius: 14px; padding: 14px 16px; border: 1px solid rgba(255,255,255,0.12); background: #0b0e14; color: var(--color-text); }
.subscribe-form input[type="email"]::placeholder { color: var(--color-muted); }
.subscribe-status { min-height: 20px; font-size: 14px; color: var(--color-muted); grid-column: 1 / -1; }
.privacy-note { color: var(--color-muted); text-align: center; margin-top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 1px); white-space: nowrap; border: 0; }

/* Social */
.section-social { text-align: center; }
.social-links { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.social-link { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; text-decoration: none; color: var(--color-text); background: rgba(255,255,255,0.06); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.social-link:hover { background: rgba(255,255,255,0.1); }
.social-link i { font-size: 20px; line-height: 1; }

/* Footer */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(18,23,34,0.8);
}
.footer-inner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer-links { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.footer-link { color: var(--color-muted); text-decoration: none; }
.footer-link:hover { color: var(--color-text); }

/* Accessibility */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -40px; background: var(--color-primary); color: #0b0e14; padding: 8px 12px; border-radius: 10px; text-decoration: none; transition: top 120ms ease; z-index: 100; }
.skip-link:focus { top: 8px; }

/* Minimal animations base (will extend later) */
@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.about-card {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease;
}
.about-card:hover { transform: translateY(-2px); border-color: rgba(90,171,254,0.45); }
.about-name { margin: 0 0 4px; font-size: 18px; }
.about-role { margin: 0 0 8px; color: var(--color-muted); }
.about-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.about-links a, .about-contact a { color: var(--color-text); text-decoration: none; }
.about-links a:hover, .about-contact a:hover { text-decoration: underline; }
.about-note { color: var(--color-muted); margin-top: 14px; }
