/* ============================================
   Text to Speech Blog — main.css
   ============================================ */

/* ---- Variables ---- */
:root {
  --accent: #b97ef8;
  --accent-dark: #a855f7;
  --text: #f0e8ff;
  --text-muted: #c9a9e5;
  --bg: #352654;
  --bg-soft: #4a3668;
  --bg-dark: #2d2240;
  --border: #5d4a8a;
  --radius: 8px;
  --radius-lg: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --prose-width: 720px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(45,34,64,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.logo-icon { font-size: 1.4rem; line-height: 1; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-nav {
  display: inline-block;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}
.btn-nav:hover { opacity: 0.9; }

/* ---- App Store Badge ---- */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  transition: opacity 0.2s, transform 0.1s;
}
.appstore-badge:hover { opacity: 0.9; transform: translateY(-1px); }
.badge-icon { font-size: 1.2rem; line-height: 1; }
.badge-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.badge-subtitle { font-size: 0.6rem; letter-spacing: 0.02em; }
.badge-title { font-size: 0.95rem; font-weight: 700; }

/* ---- Hero ---- */
.hero {
  padding: 80px 0 60px;
  overflow: hidden;
  background: linear-gradient(135deg, #352654 0%, #4a3668 50%, #5d4a8a 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(168,85,247,0.2);
  color: #dcc0f3;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  border: 1px solid rgba(168,85,247,0.3);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #fff;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.hero-price { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Logo icon ---- */
.logo-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

/* ---- Screenshots display ---- */
@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-screenshot {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: hero-bounce 3s ease-in-out infinite;
}

/* ---- Features ---- */
.features {
  padding: 80px 0;
  background: #352654;
}
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: #fff;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 720px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); border-color: var(--accent); }
.feature-icon { font-size: 1.8rem; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: rgba(185,126,248,0.15); border: 1px solid rgba(185,126,248,0.25); border-radius: 12px; margin: 0 auto 18px; color: var(--accent); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ---- Ways to Log ---- */
.ways {
  padding: 80px 0;
  background: #4a3668;
}
.ways-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.way-card {
  text-align: center;
  padding: 36px 24px;
  background: #3a2856;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.way-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); border-color: var(--accent); }
.way-icon { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; background: rgba(185,126,248,0.15); border: 1px solid rgba(185,126,248,0.25); border-radius: 16px; margin: 0 auto 20px; color: var(--accent); }
.way-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.way-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ---- Trust / Reviews ---- */
.trust {
  padding: 60px 0;
  background: #3a2856;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-title { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 800; color: #fff; text-align: center; margin-bottom: 8px; letter-spacing: -0.02em; }
.trust-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.7); text-align: center; margin-bottom: 32px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}
.review-stars { color: #e8c84a; font-size: 0.9rem; margin-bottom: 10px; letter-spacing: 2px; }
.review-card p { font-size: 0.9rem; color: #fff; font-style: italic; line-height: 1.6; margin-bottom: 12px; }
.review-author { font-size: 0.8rem; font-weight: 700; color: #fff; }

/* ---- Bottom CTA ---- */
.bottom-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #4a3668 0%, #5d4a8a 50%, #7558a3 100%);
  color: #fff;
}
.bottom-cta-inner { text-align: center; }
.bottom-cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 16px; letter-spacing: -0.02em; color: #fff; }
.bottom-cta p { font-size: 1rem; color: #dcc0f3; margin-bottom: 32px; }

/* ---- Blog Preview (on landing) ---- */
.blog-preview { padding: 80px 0; background: #4a3668; }
.blog-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.blog-preview-header h2 { font-size: 1.5rem; font-weight: 800; color: #fff; }
.link-more { color: #dcc0f3; font-weight: 500; font-size: 0.9rem; }

/* ---- Post Cards ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: #4a3668;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); border-color: var(--accent); }
.blog-preview .post-card { background: #352654; }
.post-card-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.post-card-meta time { font-size: 0.8rem; color: var(--text-muted); }
.tag {
  display: inline-block;
  background: rgba(168,85,247,0.2);
  color: #dcc0f3;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid rgba(168,85,247,0.3);
}
.post-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; color: #fff; }
.post-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ---- Blog Listing Page ---- */
.blog-page-header {
  padding: 60px 0 40px;
  background: linear-gradient(135deg, #352654 0%, #4a3668 50%, #5d4a8a 100%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.blog-page-header h1 { font-size: 2.2rem; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 8px; color: #fff; }
.blog-page-header p { color: var(--text-muted); }

/* ---- Post Page ---- */
.post { padding-top: 60px; padding-bottom: 80px; }
.post-header { max-width: var(--prose-width); margin: 0 auto 48px; }
.post-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.post-meta time { font-size: 0.85rem; color: var(--text-muted); }
.post-category { font-size: 0.75rem; font-weight: 600; color: #dcc0f3; background: rgba(168,85,247,0.2); padding: 2px 10px; border-radius: 100px; border: 1px solid rgba(168,85,247,0.3); }
.reading-time { font-size: 0.8rem; color: var(--text-muted); }
.post-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; color: #fff; }
.post-description { font-size: 1.1rem; color: var(--text-muted); line-height: 1.7; }

/* Post Content Typography */
.post-content {
  max-width: var(--prose-width);
  margin: 0 auto 60px;
  font-size: 1rem;
  line-height: 1.8;
}
.post-content h2 { font-size: 1.5rem; font-weight: 800; margin: 40px 0 16px; letter-spacing: -0.01em; color: #fff; }
.post-content h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; color: #fff; }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content strong { font-weight: 600; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content blockquote { border-left: 3px solid var(--accent); padding: 12px 20px; background: rgba(168,85,247,0.1); border-radius: 0 8px 8px 0; margin: 24px 0; font-style: italic; color: var(--text-muted); }
.post-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.9rem; }
.post-content th { text-align: left; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--border); font-weight: 600; color: #fff; }
.post-content td { padding: 10px 12px; border: 1px solid var(--border); }
.post-content tr:nth-child(even) td { background: rgba(74,54,104,0.5); }

/* Post CTA Box */
.post-cta {
  max-width: var(--prose-width);
  margin: 0 auto;
  background: linear-gradient(135deg, #4a3668, #5d4a8a);
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  color: #fff;
}
.post-cta h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; color: #fff; }
.post-cta p { color: #dcc0f3; margin-bottom: 24px; font-size: 0.95rem; }
.btn-white {
  display: inline-block;
  background: #fff;
  color: #3d2c5f;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.1s;
}
.btn-white:hover { opacity: 0.9; transform: translateY(-1px); }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner { display: flex; flex-direction: column; gap: 24px; align-items: center; text-align: center; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.footer-brand .logo-text { font-size: 1.1rem; font-weight: 700; color: #fff; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.85rem; color: #fff; transition: color 0.2s; }
.footer-links a:hover { color: #dcc0f3; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Generic Page ---- */
.page-content {
  max-width: var(--prose-width);
  margin: 60px auto;
  color: var(--text);
  line-height: 1.8;
}
.page-content h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 40px;
  color: #fff;
}
.page-content h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.page-content p {
  margin-bottom: 16px;
}
.page-content ul,
.page-content ol {
  margin: 0 0 20px 0;
  padding-left: 24px;
}
.page-content ul li,
.page-content ol li {
  margin-bottom: 8px;
  padding-left: 4px;
}
.page-content a {
  color: #c084fc;
  text-decoration: underline;
}
.page-content a:hover {
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .ways-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .container { padding: 0 26px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { max-width: 100%; }
  .hero-cta { align-items: center; }
  .hero-visual { margin-top: 40px; }
  .ways-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .blog-preview-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .post { padding-top: 40px; padding-bottom: 56px; }
  .post-header { margin-bottom: 32px; }
  .post-content { margin-bottom: 40px; }
  .post-cta { padding: 28px 20px; }
  .hero-screenshot { max-height: 460px; width: auto; max-width: 100%; }
}

/* ---- Scroll animations ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .hero { padding: 48px 0 40px; }
  .features, .blog-preview { padding: 48px 0; }
  .trust, .bottom-cta { padding: 48px 0; }
  .container { padding: 0 26px; }
  .post { padding-top: 28px; padding-bottom: 40px; }
  .post-header { margin-bottom: 24px; }
  .post-content { margin-bottom: 32px; }
}
