/* ============================================================
   StockMaster Pro — Promotional Site Styles
   ============================================================ */

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

:root {
  /* Colors */
  --color-bg-dark:      #0b1420;
  --color-bg-dark-2:    #0f1e30;
  --color-bg-light:     #f8fafc;
  --color-bg-light-2:   #ffffff;
  --color-accent:       #22c55e;
  --color-accent-hover: #16a34a;
  --color-accent-glow:  rgba(34, 197, 94, 0.25);
  --color-text-dark:    #0f172a;
  --color-text-light:   #f1f5f9;
  --color-text-muted:   #94a3b8;
  --color-border-dark:  rgba(255,255,255,0.08);
  --color-border-light: rgba(0,0,0,0.08);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;

  /* Spacing */
  --section-padding-y: 6rem;
  --container-width: 1200px;
  --container-padding: 1.5rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 48px;

  /* Phone frame */
  --phone-width: 280px;
  --phone-radius: 40px;
  --phone-border: 8px;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}


/* --- Utilities ------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}


/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--color-accent-glow);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-xl);
}

.btn .store-badge {
  height: 22px;
  display: inline-block;
}

.btn .btn-fallback {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-play {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}


/* --- Badge ----------------------------------------------- */
.badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-xl);
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}


/* --- Navbar ---------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.navbar--scrolled {
  background: rgba(11, 20, 32, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border-dark);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: -0.01em;
}

.nav-cta {
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
}


/* --- Hero Section ---------------------------------------- */
.hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 0;
  background: linear-gradient(165deg, #0b1420 0%, #0d1f35 60%, #0b1420 100%);
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,197,94,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,197,94,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-bottom: 4rem;
}

.hero-content {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-headline {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
}

.hero-headline em {
  font-style: normal;
  color: var(--color-accent);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.hero-device.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-glow {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Stats bar ------------------------------------------- */
.hero-stats {
  background: rgba(255,255,255,0.03);
  border-top: 1px solid var(--color-border-dark);
  padding: 1.5rem 0;
}

.stats-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border-dark);
}


/* --- Screenshot Images (pre-framed) ---------------------- */
.screenshot-img {
  max-width: 240px;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 56px rgba(0, 0, 0, 0.55));
}

.screenshot-img--hero {
  max-width: 280px;
}


/* --- Phone Frame ----------------------------------------- */
.phone-frame {
  position: relative;
  z-index: 1;
  width: var(--phone-width);
  background: #0d1b2a;
  border-radius: var(--phone-radius);
  border: var(--phone-border) solid #1e2d3d;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
}

.phone-frame--sm {
  --phone-width: 240px;
  --phone-radius: 34px;
}

/* Notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 22px;
  background: #0d1b2a;
  border-radius: 0 0 14px 14px;
  z-index: 10;
}

.phone-screen {
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder shown when image is missing or errors */
.screen-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #0d1b2a;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.screen-placeholder svg {
  width: 72px;
  height: 72px;
}

/* Show placeholder when image is hidden/missing */
.phone-screen.no-image img {
  display: none;
}

.phone-screen.no-image .screen-placeholder {
  display: flex;
}

/* Always show placeholder as fallback (will be hidden by real image) */
.phone-screen--placeholder .screen-placeholder {
  display: flex;
}

.phone-screen--placeholder img {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.phone-screen--placeholder img[data-missing] {
  display: none;
}


/* --- Feature Sections ------------------------------------ */
.feature {
  padding: var(--section-padding-y) 0;
}

.feature--light {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
}

.feature--dark {
  background: var(--color-bg-dark-2);
  color: var(--color-text-light);
}

.feature-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.feature-inner--left .feature-device {
  order: 1;
}
.feature-inner--left .feature-content {
  order: 2;
}

.feature-inner--right .feature-device {
  order: 2;
}
.feature-inner--right .feature-content {
  order: 1;
}

.feature-device {
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-inner--right .feature-device {
  transform: translateX(24px);
}

.feature-device.visible {
  opacity: 1;
  transform: translateX(0);
}

.feature-content {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.feature-inner--right .feature-content {
  transform: translateX(-24px);
}

.feature-content.visible {
  opacity: 1;
  transform: translateX(0);
}

.feature-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.feature--light .feature-tag {
  color: var(--color-accent-hover);
}

.feature-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}

.feature--light .feature-title {
  color: var(--color-text-dark);
}

.feature-desc {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 480px;
}

.feature--light .feature-desc {
  color: #475569;
}

.feature--dark .feature-desc {
  color: #94a3b8;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.feature--light .feature-list li {
  color: #334155;
}

.feature--dark .feature-list li {
  color: #cbd5e1;
}

.check-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 1px;
}

.feature--light .check-icon {
  background: var(--color-accent-hover);
}


/* --- CTA Section ----------------------------------------- */
.cta-section {
  position: relative;
  padding: calc(var(--section-padding-y) * 1.2) 0;
  background: var(--color-bg-dark);
  text-align: center;
  overflow: hidden;
}

.cta-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(34,197,94,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.cta-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.cta-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}


/* --- Footer ---------------------------------------------- */
.footer {
  background: #070e18;
  border-top: 1px solid var(--color-border-dark);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-legal {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.6;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 900px) {
  :root {
    --section-padding-y: 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 3rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-device {
    order: 2;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-glow {
    bottom: -80px;
  }

  .feature-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .feature-inner--left .feature-device,
  .feature-inner--right .feature-device {
    order: 1;
  }

  .feature-inner--left .feature-content,
  .feature-inner--right .feature-content {
    order: 2;
  }

  .feature-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .feature-list {
    align-items: flex-start;
    display: inline-flex;
    text-align: left;
  }

  .stat-divider {
    display: none;
  }

  .stats-inner {
    gap: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 580px) {
  :root {
    --container-padding: 1.25rem;
    --section-padding-y: 3rem;
  }

  .navbar {
    padding: 0.85rem 0;
  }

  .nav-cta {
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
  }

  .hero {
    padding-top: 6rem;
  }

  .hero-headline {
    font-size: 2.2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .feature-inner {
    gap: 2rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
}
