/* ═══════════════════════════════════════════
   MileStory Landing Page — Global Styles
   ═══════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --accent: #B1CBF3;
  --accent-dim: rgba(177, 203, 243, 0.10);
  --accent-border: rgba(177, 203, 243, 0.15);
  --accent-glow: rgba(177, 203, 243, 0.25);
  --accent-hover: rgba(177, 203, 243, 0.06);

  --bg: #000000;
  --bg-card: #0A0A0A;
  --bg-card-hover: #0F0F0F;
  --bg-elevated: #111111;

  --text-primary: #FFFFFF;
  --text-secondary: #999999;
  --text-muted: #666666;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font-body: 'Poppins', 'Segoe UI', sans-serif;
  --font-display: 'Tajawal', 'Poppins', sans-serif;

  --max-width: 1200px;
  --section-padding: 120px 24px;
  --section-padding-mobile: 80px 16px;
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  text-decoration: none;
  color: inherit;
}

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


/* ── ANIMATIONS ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-left {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-in-right {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}


/* ── NOISE OVERLAY ── */
.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ── REVEAL ANIMATION (controlled by JS) ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.16, 1, .3, 1),
              transform 0.7s cubic-bezier(.16, 1, .3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.from-left {
  transform: translateX(40px);
}
.reveal.from-left.visible {
  transform: translateX(0);
}
.reveal.from-right {
  transform: translateX(-40px);
}
.reveal.from-right.visible {
  transform: translateX(0);
}


/* ── NAVIGATION ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  padding: 0 24px;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}
.site-nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  border-bottom-color: var(--accent-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 400;
  font-family: 'Tajawal', sans-serif;
  letter-spacing: -0.02em;
}
.nav-logo-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--bg);
  font-size: 15px;
  font-family: var(--font-display);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* mobile menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 998;
}
.mobile-menu {
  position: fixed;
  top: 72px; right: 0; bottom: 0;
  width: 280px;
  background: #0A0A0A;
  z-index: 999;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}


/* ── SECTION SHARED STYLES ── */
.section {
  padding: var(--section-padding);
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-family: var(--font-body);
}
.section-title .accent {
  color: var(--accent);
}
.section-desc {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 20px;
}


/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  background: radial-gradient(ellipse 80% 50% at 50% 40%, rgba(177, 203, 243, 0.06) 0%, transparent 70%);
}
.hero-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  pointer-events: none;
}
.hero-ring-1 {
  width: 500px; height: 500px;
  animation: pulse-ring 5s ease-in-out infinite;
}
.hero-ring-2 {
  width: 340px; height: 340px;
  animation: pulse-ring 5s ease-in-out 1.2s infinite;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 28px;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 750px;
}
.hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 540px;
  margin-top: 22px;
  font-weight: 300;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: float 3s ease-in-out infinite;
}


/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 14.5px;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border);
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14.5px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-hover);
}


/* ── TWO-COLUMN LAYOUT ── */
.two-col {
  display: flex;
  gap: 72px;
  align-items: center;
}
.two-col.reversed {
  flex-direction: row-reverse;
}
.two-col-text {
  flex: 1;
  min-width: 0;
}
.two-col-visual {
  flex: 1;
  min-width: 0;
}
/* Reveal wrapper inside two-col needs to stretch */
.two-col > .reveal {
  flex: 1;
  min-width: 0;
}


/* ── IMAGE PLACEHOLDERS ── */
.img-placeholder {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  overflow: hidden;
  position: relative;
}
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* phone mockup container */
.phone-mockup {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-end;
}
.phone-frame {
  width: 180px;
  border-radius: 24px;
  overflow: hidden;
  border: none;
  background: transparent;
  flex-shrink: 0;
}
.phone-frame img {
  width: 100%;
  display: block;
}
/* wide screenshot frame */
.screenshot-frame {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--accent-border);
  background: var(--bg-card);
}
.screenshot-frame img {
  width: 100%;
  display: block;
}


/* ── STEPS ROW ── */
.steps-row {
  display: flex;
  gap: 24px;
  margin-top: 56px;
}
.step-card {
  flex: 1;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  transition: transform 0.35s ease, background 0.35s ease;
}
.step-card:hover {
  transform: scale(1.02);
  background: var(--bg-card-hover);
}
.step-num {
  font-size: 40px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
}
.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-top: 14px;
}
.step-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 10px;
  font-weight: 300;
}


/* ── FEATURES GRID ── */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.feature-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  transition: transform 0.4s cubic-bezier(.16, 1, .3, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  /* EQUAL HEIGHT — handled by grid automatically */
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(177, 203, 243, 0.06);
  border-color: var(--accent);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
  flex-shrink: 0;
}
.feature-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
  flex: 1; /* push content to fill equally */
}


/* ── CREATOR SECTION ── */
.creator-box {
  border-radius: var(--radius-xl);
  border: 1px solid var(--accent-border);
  background: var(--bg-card);
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}
.creator-item {
  flex: 1 1 240px;
  max-width: 300px;
  text-align: center;
}
.creator-item-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin: 0 auto 14px;
}
.creator-item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.creator-item-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-weight: 300;
}

/* creator screenshots row */
.creator-screenshots {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}
.creator-screenshots .screenshot-frame {
  flex: 1;
}


/* ── FOUNDER ── */
.founder-row {
  display: flex;
  gap: 72px;
  align-items: center;
}
.founder-photo {
  width: 200px; height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: none;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.founder-photo-ring {
  display: none;
}
/* fix Reveal wrapper inside founder-row */
.founder-row > .reveal {
  flex-shrink: 0;
}


/* ── STATUS PILLS ── */
.status-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.status-pill {
  padding: 14px 24px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-pill.done {
  border-color: var(--accent);
}
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-pill.done .status-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.status-label {
  font-size: 14px;
  font-weight: 600;
}
.status-value {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.status-pill.done .status-value {
  color: var(--accent);
}


/* ── CTA / CONTACT ── */
.cta-section {
  background: linear-gradient(180deg, transparent, var(--accent-dim));
}


/* ── FOOTER ── */
.site-footer {
  padding: 36px 24px;
  border-top: 1px solid var(--accent-border);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 400;
  font-family: 'Tajawal', sans-serif;
}
.footer-logo-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--bg);
  font-size: 12px;
  font-family: var(--font-display);
}
.footer-copy {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 300;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--accent);
}


/* ── GRADIENT SECTIONS ── */
.bg-gradient-soft {
  background: linear-gradient(180deg, transparent, var(--accent-dim), transparent);
}
.bg-gradient-bottom {
  background: linear-gradient(180deg, transparent, rgba(177, 203, 243, 0.04), transparent);
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex !important; }

  .hero-title { font-size: 2.8rem !important; }
  .section-title { font-size: 2rem !important; }
  .section { padding: var(--section-padding-mobile); }

  .two-col,
  .two-col.reversed {
    flex-direction: column !important;
    gap: 40px;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
  }

  .steps-row {
    flex-direction: column !important;
  }

  .founder-row {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .phone-mockup {
    gap: 12px;
  }
  .phone-frame {
    width: 140px;
  }

  .creator-box {
    padding: 28px 20px;
  }

  .creator-screenshots {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem !important; }
  .hero-subtitle { font-size: 15px; }
  .phone-frame { width: 120px; }
}
