/* =========================
   Base reset + variables
   ========================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Reserve space for fixed navbar (fallback + mobile tweak) */
:root { --nav-h: 72px; }
@media (max-width: 768px) {
  :root { --nav-h: 64px; }
}
body { padding-top: var(--nav-h); }
section[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* Theme variables */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;

  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;

  --background-light: #f8fafc;
  --background-white: #ffffff;
  --border-color: #e5e7eb;

  --success-color: #10b981;

  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Fluid type scale */
  --fs-sm: clamp(.95rem, .9rem + .2vw, 1rem);
  --fs-base: clamp(1rem, .98rem + .3vw, 1.075rem);
  --fs-lg: clamp(1.125rem, 1.05rem + .5vw, 1.25rem);
  --fs-xl: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.35rem + 2vw, 2.25rem);
  --fs-3xl: clamp(2.25rem, 1.6rem + 3vw, 3rem);
}

/* =========================
   Base typography + body
   ========================= */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================
   Navigation
   ========================= */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 0;
  transition: background .3s ease, box-shadow .3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.logo-placeholder img { width: 100%; height: 100%; object-fit: cover; }

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color .3s ease;
  position: relative;
}
.nav-links a:hover { color: var(--primary-color); }
.nav-links a.cta-nav {
  background: var(--gradient-secondary);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: .5rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.nav-links a.cta-nav:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* =========================
   Hero
   ========================= */
.hero {
  background: var(--gradient-primary);
  color: #fff;
  padding: 8rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,50 1000,100 0,100"/></svg>') no-repeat center/cover;
  opacity: .1;
}
.hero-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: var(--fs-3xl);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.hero-subtitle {
  font-size: var(--fs-lg);
  margin: 0 auto 2rem;
  opacity: .9;
  max-width: 600px;
}
.cta-button {
  display: inline-block;
  background: #fff;
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: .75rem;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: var(--shadow-lg);
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* =========================
   Sections + containers
   ========================= */
.section { padding: 5rem 0; }
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: var(--fs-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .75rem;
  letter-spacing: -0.01em;
}
.section-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* =========================
   Story / content blocks
   ========================= */
.story-section { background: var(--background-light); }
.story-content {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 2.25rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}
.story-intro {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}
.story-content p {
  margin: 0 0 1rem;
  font-size: var(--fs-base);
  line-height: 1.7;
}
.highlight { color: var(--primary-color); font-weight: 600; }
.author-signature {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-style: italic;
  color: var(--text-secondary);
}

/* =========================
   Features grid / cards
   ========================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.feature-card {
  background: #fff;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 3rem; height: 3rem;
  border-radius: .75rem;
  background: var(--gradient-secondary);
  display: grid; place-items: center;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  color: #fff;
}
.feature-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text-primary);
}
.feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =========================
   Video
   ========================= */
.video-section { text-align: center; }
.video-container {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.responsive-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* =========================
   Screenshots
   ========================= */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.screenshot-item {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}
.screenshot-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}
.screenshot-item img { width: 100%; height: auto; display: block; }

/* =========================
   Testimonials
   ========================= */
.testimonial-section { background: var(--background-light); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.testimonial-card {
  background: #fff;
  padding: 1.75rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}
.testimonial-content {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.testimonial-author {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}
.stars { color: #fbbf24; margin-bottom: .5rem; }

/* =========================
   Download section
   ========================= */
.download-section {
  background: var(--gradient-primary);
  color: #fff;
  text-align: center;
}
.download-buttons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.download-button {
  border-radius: .5rem;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.download-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.download-button img { height: 60px; width: auto; }

/* =========================
   Footer
   ========================= */
.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 3rem 0 2rem;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: #d1d5db;
  transition: color .2s ease;
  text-decoration: none;
}
.footer-links a:hover { color: #fff; }
.footer-contact { margin-bottom: 1rem; }
.footer-contact a { color: var(--accent-color); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-copyright {
  color: var(--text-light);
  font-size: .9rem;
}

/* =========================
   Mobile nav + responsive
   ========================= */
.mobile-nav { display: none; }
.mobile-cta {
  background: var(--gradient-secondary);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: .375rem;
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.mobile-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-nav { display: block; }
  .hero h1 { font-size: var(--fs-2xl); }
  .hero-subtitle { font-size: var(--fs-sm); }
  .section { padding: 3rem 0; }
  .section-title { font-size: var(--fs-xl); }
  .story-content { padding: 1.75rem; }
  .download-buttons { flex-direction: column; align-items: center; }
}

/* =========================
   Animations + Modal
   ========================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp .6s ease-out; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-xl);
}
.modal-content h2 { color: var(--text-primary); margin-bottom: .75rem; }
.modal-content p { color: var(--text-secondary); margin-bottom: 1rem; }
.modal-input {
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.modal-button {
  padding: .75rem 1.5rem;
  border: 0;
  border-radius: .5rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.modal-button.primary { background: var(--primary-color); color: #fff; }
.modal-button.secondary { background: var(--border-color); color: var(--text-secondary); }
.modal-button:hover { transform: translateY(-1px); }
/* Apply to all article pages */
.article-hero { padding-top: calc(var(--nav-h) + 6.5rem); }
@media (max-width: 768px) {
  .article-hero { padding-top: calc(var(--nav-h) + 4.5rem); }
}
.article-hero {
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* centers vertically */
  text-align: center;
  min-height: calc(60vh - var(--nav-h)); /* adjust 60vh to control hero height */
  padding-top: var(--nav-h); /* ensures space below navbar */
  padding-bottom: 3rem;
}

.article-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: var(--fs-3xl);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.article-hero .article-meta {
  opacity: 0.95;
  font-size: var(--fs-sm);
}

/* On smaller screens, reduce the height a bit for balance */
@media (max-width: 768px) {
  .article-hero {
    min-height: calc(50vh - var(--nav-h));
    padding-top: var(--nav-h);
  }
  .article-hero h1 {
    font-size: var(--fs-2xl);
  }
}