/* =========================================
   STOCKSENSE — styles.css
   ========================================= */

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

:root {
  --black:   #0a0a0a;
  --off-black: #111111;
  --white:   #ffffff;
  --gray-50: #f9f9f9;
  --gray-100:#f0f0f0;
  --gray-200:#e0e0e0;
  --gray-400:#999;
  --gray-600:#555;
  --accent:  #1a6aff;
  --accent-light: #e8f0ff;
  --accent-dim: rgba(26,106,255,0.12);
  --warn:    #f97316;
  --warn-light: #fff4ed;
  --radius:  12px;
  --radius-lg: 20px;
  --shadow:  0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* CONTAINER */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  border: 1px solid var(--gray-200);
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover { background: var(--gray-50); border-color: var(--gray-400); }

/* SECTIONS */
.section { padding: 100px 0; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 24px;
  max-width: 640px;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  padding: 160px 0 100px;
  text-align: center;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--gray-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray-100) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 40%, transparent 100%);
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; }

.badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
  border: 1px solid rgba(26,106,255,0.2);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.1rem;
  color: var(--gray-600);
  line-height: 1.7;
  font-weight: 300;
}

/* CTA FORM */
.cta-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cta-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.cta-form button {
  padding: 14px 24px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.cta-form button:hover { background: #222; }
.cta-form button:active { transform: scale(0.98); }

.form-success {
  display: none;
  margin-top: 14px;
  font-size: 0.9rem;
  color: #16a34a;
  font-weight: 500;
}
.form-success.visible { display: block; }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: var(--gray-400);
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* =========================================
   PROBLEM
   ========================================= */
.problem { background: var(--gray-50); }
.problem h2 { max-width: 520px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-icon { font-size: 1.8rem; display: block; margin-bottom: 16px; }
.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--black);
}
.card p { font-size: 0.92rem; color: var(--gray-600); line-height: 1.65; }

/* =========================================
   SOLUTION
   ========================================= */
.solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.solution-text h2 { max-width: 100%; }
.solution-text > p {
  color: var(--gray-600);
  margin-bottom: 40px;
  font-size: 1rem;
  line-height: 1.7;
}

.steps { display: flex; flex-direction: column; gap: 28px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.step strong { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 0.88rem; color: var(--gray-600); line-height: 1.6; }

/* INSIGHT BOX */
.insight-box {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 88px;
}
.insight-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.insight-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0.1); }
}
.insight-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); }

.insight-product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.product-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
  flex-shrink: 0;
}
.product-info strong { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.sku { font-size: 0.75rem; color: var(--gray-400); }

.insight-stat {
  text-align: center;
  padding: 20px 0 16px;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 20px;
}
.insight-countdown {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--warn);
  line-height: 1;
  margin-bottom: 4px;
}
.insight-msg { font-size: 0.82rem; color: var(--gray-600); }

.insight-bar-wrap { margin-bottom: 20px; }
.insight-bar {
  height: 8px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.insight-bar-fill {
  height: 100%;
  width: 20%;
  background: var(--warn);
  border-radius: 99px;
  animation: fill-bar 1.2s ease-out forwards;
}
@keyframes fill-bar {
  from { width: 0%; }
  to   { width: 20%; }
}
.insight-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.insight-action {
  display: flex;
  align-items: center;
  gap: 14px;
}
.insight-btn {
  padding: 10px 18px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.insight-btn:hover { background: #155ced; }
.insight-sub { font-size: 0.78rem; color: var(--gray-400); }

/* =========================================
   BENEFITS
   ========================================= */
.benefits { background: var(--gray-50); }
.benefits h2 { max-width: 600px; }
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.benefit {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.benefit:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.benefit-icon { font-size: 1.5rem; margin-bottom: 12px; display: block; }
.benefit h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.benefit p  { font-size: 0.88rem; color: var(--gray-600); line-height: 1.65; }

/* =========================================
   FINAL CTA
   ========================================= */
.final-cta { padding: 100px 0; }
.cta-card {
  position: relative;
  background: var(--black);
  color: var(--white);
  border-radius: 24px;
  padding: 72px 48px;
  text-align: center;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, rgba(26,106,255,0.35), transparent 70%);
  pointer-events: none;
}
.cta-card h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: none;
  position: relative;
}
.cta-card p {
  color: rgba(255,255,255,0.6);
  max-width: 480px;
  margin: 0 auto 32px;
  font-size: 1rem;
  line-height: 1.7;
  position: relative;
}
.cta-card .cta-form { position: relative; }
.cta-card .cta-form input[type="email"] {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--white);
}
.cta-card .cta-form input[type="email"]::placeholder { color: rgba(255,255,255,0.3); }
.cta-card .cta-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,106,255,0.3);
}
.cta-card .cta-form button {
  background: var(--accent);
}
.cta-card .cta-form button:hover { background: #155ced; }
.cta-note {
  position: relative;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  margin-top: 16px;
}
.cta-card .form-success { color: #4ade80; }

/* =========================================
   FOOTER
   ========================================= */
.footer {
  border-top: 1px solid var(--gray-100);
  padding: 28px 0;
  background: var(--white);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 0.82rem; color: var(--gray-400); }

/* =========================================
   REVEAL ANIMATIONS
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .hero    { padding: 120px 0 80px; }

  .solution-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .insight-box { position: static; }

  .cta-card { padding: 48px 24px; }

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

  .cta-form { flex-direction: column; align-items: stretch; }
  .cta-form input[type="email"],
  .cta-form button { width: 100%; }
}
