/* ============================================
   Back to This - Landing Page Styles
   Brand: Blue gradient
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-blue: #3B82F6;
  --brand-blue-dark: #2563EB;
  --brand-gradient: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  --brand-gradient-soft: linear-gradient(135deg, #93C5FD 0%, #3B82F6 50%, #2563EB 100%);
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --bg-white: #ffffff;
  --bg-light: #f0f7ff;
  --bg-subtle: #f0f4f8;
  --border-light: #e0e7ef;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --max-width: 1120px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-blue-dark);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 56px 0;
  }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-brand span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }
}

/* --- Hero Section --- */
.hero {
  padding-top: 140px;
  padding-bottom: 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  margin-bottom: 20px;
  position: relative;
}

.hero .tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.hero .highlight {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

/* --- Problem Section --- */
.problem {
  background: var(--bg-light);
}

.problem-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.problem h2 {
  margin-bottom: 20px;
}

.problem p {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.problem-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.stat-card .number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-card .label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Features Section --- */
.features {
  padding: 100px 0;
}

.features .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.features .section-header p {
  margin-top: 12px;
  font-size: 1.1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- How It Works --- */
.how-it-works {
  background: var(--bg-light);
}

.how-it-works .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Arrow between steps */
@media (min-width: 769px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    right: -24px;
    width: 20px;
    height: 2px;
    background: var(--border-light);
  }
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 80%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.app-store-badge {
  display: inline-block;
  transition: transform var(--transition);
}

.app-store-badge:hover {
  transform: scale(1.05);
}

.app-store-badge img {
  height: 52px;
  width: auto;
}

/* Placeholder badge style (when no image) */
.badge-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  transition: transform var(--transition);
}

.badge-placeholder:hover {
  transform: scale(1.05);
  color: #fff;
}

.badge-placeholder .badge-icon {
  font-size: 1.6rem;
}

.badge-placeholder .badge-text {
  text-align: left;
  line-height: 1.3;
}

.badge-placeholder .badge-text small {
  font-size: 0.7rem;
  opacity: 0.8;
}

.badge-placeholder .badge-text strong {
  display: block;
  font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
  background: var(--bg-subtle);
  padding: 48px 0;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.footer-brand span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-links-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-links-col ul {
  list-style: none;
}

.footer-links-col li {
  margin-bottom: 8px;
}

.footer-links-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links-col a:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* --- Blog Listing --- */
.blog-header {
  padding-top: 120px;
  padding-bottom: 40px;
  text-align: center;
}

.blog-header h1 {
  margin-bottom: 12px;
}

.blog-header p {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  padding-bottom: 80px;
}

.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}

.blog-card h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.blog-card h2 a {
  color: var(--text-primary);
}

.blog-card h2 a:hover {
  color: var(--brand-blue);
}

.blog-card p {
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-blue);
}

/* --- Blog Post --- */
.post-header {
  padding-top: 120px;
  padding-bottom: 40px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.post-header .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.post-header h1 {
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.post-header .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.post-content {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.post-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.post-content h3 {
  margin-top: 36px;
  margin-bottom: 12px;
}

.post-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content ul, .post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.post-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.post-content blockquote {
  border-left: 3px solid var(--brand-blue);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--bg-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-content blockquote p {
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 0;
}

.post-cta {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  margin-top: 48px;
}

.post-cta h3 {
  margin-bottom: 12px;
}

.post-cta p {
  margin-bottom: 20px;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  padding: 32px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 48px;
}

.post-nav a {
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Privacy Policy --- */
.privacy-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.privacy-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.privacy-content p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

.privacy-content ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.privacy-content li {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Use Cases Section --- */
.use-cases {
  background: var(--bg-light);
}

.use-cases .section-header {
  text-align: center;
  margin-bottom: 60px;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.use-case-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.use-case-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.use-case-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.use-case-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.use-case-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* --- Responsive fine-tuning --- */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding-top: 110px;
    padding-bottom: 60px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

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

  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .post-nav {
    flex-direction: column;
    gap: 16px;
  }
}
