/* ReadFlow – minimal, light theme only */
:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --border: #e5e5e5;
  --accent: #059669;
  --accent-hover: #047857;
  --card-bg: #fff;
  --radius: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 960px; /* Increased from 720px for wider images */
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 960px; /* Increased to match container */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}

.nav-logo-img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-lang {
  position: relative;
}

.nav-lang select {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

/* Hero */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: linear-gradient(to bottom, #fff, #fafafa);
}

.hero-logo {
  display: block;
  margin: 0 auto 24px;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.hero h1 {
  font-size: 3.5rem;
  margin: 0 0 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.5rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fg);
  color: #fff;
  padding: 12px 28px;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.1s, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-google-play {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border: none;
}

.btn-google-play:hover {
  background: linear-gradient(135deg, #047857, #036045);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Module Sections */
.module {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.module:last-of-type {
  border-bottom: none;
}

.module-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 60px; /* Space between text and image */
}

/* Reverse layout for alternating sections */
.module--reverse .module-inner {
  flex-direction: row-reverse;
}

.module-content {
  flex: 1;
  min-width: 300px;
}

.module-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Images */
.module-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

.module-visual-placeholder {
  width: 100%;
  height: 300px;
  background: var(--card-bg);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--border);
  border: 2px dashed var(--border);
}

/* Typography */
.module-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 12px;
}

.module-headline {
  font-size: 2.8rem;
  margin: 0 0 20px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.module-desc {
  font-size: 1.3rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.module-desc strong {
  color: var(--accent);
  font-weight: 600;
}

/* Features List (Legacy support if needed, mostly replaced by paragraph) */
.module-features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 16px;
}

.module-feature {
  display: flex;
  gap: 12px;
}

.module-feature-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.module-feature-text p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

/* Download Page */
.page {
  padding: 40px 0 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.download-intro {
  margin-bottom: 40px;
}

.download-intro h1 {
  font-size: 2.5rem;
  margin: 0 0 8px;
}

.download-intro p {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 24px;
}

.platform-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.platform-card h3 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}

.platform-card p {
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 1.1rem;
  flex: 1;
}

.platform-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-actions .btn {
  flex: 1;
  font-size: 1rem;
  padding: 14px 24px;
  white-space: nowrap;
}

/* Footer */
.footer {
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: var(--card-bg);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

.footer p {
  color: #999;
  font-size: 0.85rem;
  margin: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.modal h3 {
  margin-top: 0;
}

.modal button {
  margin-top: 20px;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 40px;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 2010;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Make images clickable */
.module-img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.module-img:hover {
  transform: scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
  .module-inner {
    flex-direction: column; /* Stack vertically on mobile */
    text-align: center;
    gap: 40px;
  }
  
  .module--reverse .module-inner {
    flex-direction: column; /* Maintain image-first order or stack consistently */
  }

  /* Make image always appear after text on mobile, or before? 
     Let's put visual first for visual impact */
  .module-inner > .module-visual {
    order: -1;
  }
  
  .module-headline {
    font-size: 1.75rem;
  }
  
  .nav-inner {
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}
