/* Balance Static Site - Main Stylesheet */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

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

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

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 4rem;
}

h2 {
  font-size: 3rem;
}

h3 {
  font-size: 1.5rem;
}

/* Large display headings */
.display-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 118px;
  font-weight: 600;
  text-align: center;
  line-height: 1;
  margin: 0 0 40px;
  color: #333;
}

/* Layout */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / Navigation */
.header {
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  padding: 0 40px;
}

.logo img {
  width: 220px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 0.7;
}

.nav-cta {
  color: #a78bfa;
  font-weight: 500;
}

.nav-cta:hover {
  opacity: 0.7;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  padding: 20px 0 60px;
}

.hero-headline {
  text-align: center;
  margin-bottom: 30px;
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  align-items: center;
}

.hero-content .subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
  line-height: 1.3;
}

.hero-content p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 20px;
  max-width: 300px;
  line-height: 1.55;
}

.btn-primary {
  display: inline-block;
  background: #a78bfa;
  color: #fff;
  padding: 8px 44px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #9575f0;
}

.hero-images {
  display: flex;
  justify-content: center;
}

.hero-images img {
  max-width: 100%;
  height: auto;
}

/* Feature Sections */
.feature-section {
  padding: 40px 0 60px;
}

.feature-headline {
  text-align: center;
  margin-bottom: 30px;
}

.feature-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
}

.layout-reverse .feature-body {
  direction: rtl;
}

.layout-reverse .feature-body > * {
  direction: ltr;
}

.feature-content .subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.feature-content p {
  font-size: 1rem;
  color: #555;
  max-width: 480px;
  line-height: 1.7;
}

.feature-image img {
  max-width: 100%;
  height: auto;
}

/* Footer */
.footer {
  background: #1a1a1a;
  color: #fff;
  padding: 60px 0 40px;
}

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

.footer-logo img {
  height: 32px;
  margin-bottom: 16px;
}

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

.footer-links a {
  color: #ccc;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-social img {
  width: 24px;
  height: 24px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #333;
  text-align: center;
  color: #888;
  font-size: 0.875rem;
}

/* Try Balance Now Page */
.try-hero {
  padding: 80px 0;
  text-align: center;
}

.try-hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.try-hero .subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.try-hero p {
  font-size: 1.125rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 40px;
}

.try-hero .arrow-down {
  width: 40px;
  margin: 0 auto;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.download-section {
  padding: 80px 0;
  text-align: center;
  background: #f9f9f9;
}

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

.download-section p {
  font-size: 1.125rem;
  color: #555;
  margin-bottom: 32px;
}

.download-section .app-store-btn {
  display: inline-block;
}

.download-section .app-store-btn img {
  height: 60px;
}

/* Blog Page */
.blog-header {
  padding: 60px 0 40px;
  text-align: center;
}

.blog-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 118px;
  font-weight: 600;
  line-height: 1;
  color: #333;
}

/* Container for blog grid */
.blog-grid-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  padding: 0 0 80px;
}

.blog-card {
  background: #fff;
}

.blog-card:hover {
  opacity: 0.9;
}

.blog-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  max-width: 300px;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  padding: 16px 0;
}

.blog-card-date {
  display: inline-block;
  font-size: 0.8rem;
  color: #333;
  background: #f5d547;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.blog-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.25;
}

.blog-card-excerpt {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.blog-card-link {
  color: #a78bfa;
  font-weight: 500;
}

.blog-card-link:hover {
  text-decoration: underline;
}

/* Blog Post Page */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.blog-post-back {
  color: #a78bfa;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 24px;
}

.blog-post-back:hover {
  text-decoration: underline;
}

.blog-post-featured-image {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.blog-post-header {
  margin-bottom: 40px;
}

.blog-post-date {
  display: inline-block;
  font-size: 0.875rem;
  color: #333;
  background: #f5d547;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.blog-post h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  line-height: 1.2;
}

.blog-post-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.blog-post-content p {
  margin-bottom: 24px;
}

.blog-post-content h2 {
  font-size: 1.75rem;
  margin: 40px 0 20px;
}

.blog-post-content h3 {
  font-size: 1.375rem;
  margin: 32px 0 16px;
}

.blog-post-content ul, .blog-post-content ol {
  margin: 0 0 24px 24px;
}

.blog-post-content li {
  margin-bottom: 8px;
}

.blog-post-content blockquote {
  border-left: 4px solid #333;
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: #555;
}

.blog-post-inline-image {
  margin: 32px 0;
}

.blog-post-inline-image img {
  width: 100%;
  border-radius: 8px;
}

.blog-post-content a {
  color: #a78bfa;
  text-decoration: underline;
}

.blog-post-content a:hover {
  color: #9575f0;
}

/* Responsive - Tablet */
@media (max-width: 968px) {
  .display-heading {
    font-size: 100px;
  }

  .blog-header h1 {
    font-size: 100px;
  }

  /* Shrink images on tablet, keep two-column */
  .hero-images img {
    max-width: 280px;
  }

  .feature-image img {
    max-width: 320px;
  }

  .hero-content .subtitle {
    font-size: 1.5rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .nav.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .display-heading {
    font-size: 60px;
    margin-bottom: 20px;
  }

  /* Stack to single column - content first, image after */
  .hero-body,
  .feature-body {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .layout-reverse .feature-body {
    direction: ltr;
  }

  /* Content comes first, image comes second on mobile */
  .hero-content,
  .feature-content {
    order: 1;
  }

  .hero-images,
  .feature-image {
    order: 2;
  }

  /* Make subtitle larger on mobile - acts as main heading */
  .hero-content .subtitle {
    font-size: 1.75rem;
    font-weight: 600;
  }

  .feature-content .subtitle {
    font-size: 1.5rem;
    font-weight: 600;
  }

  /* Center images on mobile */
  .hero-images,
  .feature-image {
    display: flex;
    justify-content: center;
  }

  .hero-images img {
    max-width: 90%;
  }

  .feature-image img {
    max-width: 90%;
  }

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

  .blog-header h1 {
    font-size: 60px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

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

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