/* ============================================================
   DOSEDWISE LANDING — styles.css
   Mobile-first, dark mode only, no external dependencies
   ============================================================ */

/* =====================
   1. DESIGN TOKENS
   ===================== */
:root {
  /* Colors */
  --bg-primary:    #0A0A0A;
  --bg-secondary:  #141414;
  --bg-card:       #111111;
  --accent:        #00C853;
  --accent-hover:  #00B34A;
  --accent-dim:    rgba(0, 200, 83, 0.12);
  --text-primary:  #FFFFFF;
  --text-secondary:#A1A1AA;
  --border:        #27272A;

  /* Typography */
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-xs:         0.75rem;
  --fs-sm:         0.875rem;
  --fs-base:       1rem;
  --fs-lg:         1.125rem;
  --fs-xl:         1.25rem;
  --fs-2xl:        1.5rem;
  --fs-3xl:        1.875rem;
  --fs-4xl:        2.25rem;
  --fs-5xl:        3rem;
  --fs-6xl:        3.75rem;

  /* Spacing (4px base) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Radii */
  --r-sm:   0.25rem;
  --r-md:   0.5rem;
  --r-lg:   0.75rem;
  --r-xl:   1rem;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-glow: 0 0 60px rgba(0,200,83,0.08);

  /* Layout */
  --max-w:  1200px;
  --px:     1.25rem;
  --section-py: 5rem;
}

/* =====================
   2. RESET / BASE
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, button {
  outline: none;
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* =====================
   3. LAYOUT
   ===================== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}

.section {
  padding-block: var(--section-py);
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
}

/* =====================
   4. TYPOGRAPHY HELPERS
   ===================== */
.break-lg { display: none; }

/* =====================
   5. BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #000000;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.3);
  background-color: rgba(255,255,255,0.04);
}

/* Loading spinner on button */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================
   6. NAVIGATION
   ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: var(--sp-4);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
}
.nav-brand {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-cta {
  padding: 0.5rem 1.125rem;
  font-size: var(--fs-sm);
}

/* =====================
   7. HERO SECTION
   ===================== */
.hero {
  position: relative;
  padding-block: var(--sp-20) var(--sp-24);
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 140vw);
  height: 500px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,200,83,0.1) 0%, transparent 65%);
  pointer-events: none;
  will-change: opacity;
}

.hero-glow--cta {
  top: -80px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4) var(--sp-1) var(--sp-3);
  background: rgba(0,200,83,0.08);
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero-headline {
  font-size: var(--fs-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--sp-5);
}

.hero-subheadline {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
  line-height: 1.65;
}

/* =====================
   8. FORM
   ===================== */
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
}

.form-input {
  width: 100%;
  padding: 0.8125rem 1.125rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: var(--fs-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}
.form-input:focus {
  border-color: rgba(0,200,83,0.5);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1);
  outline: none;
}

.form-btn {
  width: 100%;
  padding: 0.8125rem 1.5rem;
  font-size: var(--fs-base);
}

/* Form states */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-8);
  background: rgba(0,200,83,0.08);
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: var(--r-xl);
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-weight: 500;
  max-width: 480px;
  margin-inline: auto;
  text-align: center;
}

.success-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  font-weight: 700;
  flex-shrink: 0;
}

.form-error {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--r-md);
  color: #fca5a5;
  font-size: var(--fs-sm);
  text-align: center;
  max-width: 480px;
  margin-inline: auto;
}
.form-error p { margin: 0; }

.retry-btn {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

/* =====================
   9. TRUST LIST
   ===================== */
.trust-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.check-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* =====================
   10. STATS / PROBLEM
   ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
  border-color: rgba(0,200,83,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-4);
}

.stat-description {
  font-size: var(--fs-base);
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--sp-3);
  line-height: 1.5;
}

.stat-source {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  font-style: italic;
}

/* =====================
   11. HOW IT WORKS
   ===================== */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  position: relative;
}

.step-connector {
  display: none;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  position: relative;
}

.step-number {
  font-size: var(--fs-4xl);
  font-weight: 800;
  color: rgba(0,200,83,0.2);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--sp-4);
  font-feature-settings: 'tnum';
}

.step-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}

.step-description {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =====================
   12. WHY DIFFERENT
   ===================== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.feature-card:hover {
  border-color: rgba(0,200,83,0.25);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
}

.feature-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}

.feature-description {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =====================
   13. PRODUCT MOCKUP
   ===================== */
.mockup-wrapper {
  max-width: 520px;
  margin-inline: auto;
}

.mockup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card), 0 20px 40px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}
.mockup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 0%, rgba(0,200,83,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.mockup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.mockup-category {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.mockup-product-name {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.mockup-ede {
  text-align: right;
  flex-shrink: 0;
}

.ede-label {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: var(--sp-1);
  white-space: nowrap;
}

.ede-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.ede-max {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Score bars */
.mockup-scores {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.score-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.score-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-name {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.score-val {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-feature-settings: 'tnum';
}

.score-bar {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--r-full);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #33d97b);
  border-radius: var(--r-full);
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-bar-fill.animated {
  width: var(--target-width);
}

/* Mockup footer */
.mockup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.mockup-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.detail-item {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

.detail-label {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.detail-value {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.detail-green {
  color: var(--accent);
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(0,200,83,0.12);
  border: 1px solid rgba(0,200,83,0.25);
  border-radius: var(--r-full);
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =====================
   14. CTA SECTION
   ===================== */
.section-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-inline: auto;
}

.cta-footnote {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

/* =====================
   15. FOOTER
   ===================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-12) var(--sp-8);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
}

.footer-logo img {
  height: 32px;
  width: auto;
}

/* Fallback text if logo image is missing */
.footer-logo {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.social-link:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}

.footer-mid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-contact {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.footer-contact:hover {
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-link {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--text-primary);
}

.footer-sep {
  color: var(--border);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.footer-disclaimers {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-disclaimer {
  font-size: var(--fs-xs);
  color: rgba(161,161,170,0.6);
  line-height: 1.6;
}

/* =====================
   16. SCROLL ANIMATIONS
   ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease var(--delay, 0s),
    transform 0.55s ease var(--delay, 0s);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .score-bar-fill {
    transition: none;
  }
  .badge-dot {
    animation: none;
  }
  .btn.loading::after {
    animation: none;
  }
}

/* =====================
   17. RESPONSIVE — 640px
   ===================== */
@media (min-width: 640px) {
  :root {
    --px: 1.5rem;
    --section-py: 6rem;
  }

  .hero-headline {
    font-size: var(--fs-5xl);
  }

  .form-row {
    flex-direction: row;
    align-items: stretch;
  }

  .form-input {
    flex: 1;
    min-width: 0;
  }

  .form-btn {
    width: auto;
    flex-shrink: 0;
  }

  .trust-list {
    flex-direction: row;
    justify-content: center;
    gap: var(--sp-5);
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-mid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .footer-disclaimers {
    text-align: right;
    max-width: 440px;
  }
}

/* =====================
   18. RESPONSIVE — 768px
   ===================== */
@media (min-width: 768px) {
  :root {
    --px: 2rem;
  }

  .section-title {
    font-size: var(--fs-4xl);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mockup-card {
    padding: var(--sp-8);
  }
}

/* =====================
   19. RESPONSIVE — 1024px
   ===================== */
@media (min-width: 1024px) {
  :root {
    --px: 2.5rem;
  }

  .break-lg {
    display: inline;
  }

  .hero-headline {
    font-size: var(--fs-6xl);
  }

  .hero-subheadline {
    font-size: var(--fs-xl);
  }

  .steps-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: start;
    gap: 0;
  }

  .step-connector {
    display: block;
    width: 48px;
    height: 1px;
    background: var(--border);
    margin-top: 2.25rem;
    flex-shrink: 0;
    position: relative;
    top: 1.5rem;
  }

  .step-card {
    height: 100%;
  }
}

/* =====================
   20. RESPONSIVE — 1280px
   ===================== */
@media (min-width: 1280px) {
  :root {
    --px: 3rem;
  }
}
