/* Global Styles for groundflow */

/* CSS Variables */
:root {
  --primary-color: #2D3436;
  --accent-color: #6C5CE7;
  --bg-color: #FFFFFF;
  --text-color: #2D3436;
  --secondary-text: #636E72;
  --highlight-bg: #F8F9FA;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  padding: 0 20px;
}

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 20px;
}

/* Special container for homepage */
.container.home {
  padding: 80px 20px;
}

.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-section .tagline {
  flex: 1;
  margin: 0;
}

.hero-section .logo {
  margin-left: 2rem;
}

/* Navigation styles */
.nav-bar {
  background: var(--bg-color);
  border-bottom: 1px solid rgba(108, 92, 231, 0.1);
  padding: 1rem 0;
}

.nav-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 2.5rem;
}

/* Ensure content container matches nav alignment */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 20px;
}

.container.with-nav {
  padding: 2rem 20px;
  padding-top: 5rem;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: var(--primary-color);
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: var(--accent-color);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--primary-color);
}

p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-text);
}

/* Utility Classes */
.highlight {
  color: var(--accent-color);
  font-weight: 600;
}

/* Navigation Bar */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-color);
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

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

.logo {
  text-decoration: none;
  display: inline-block;
}

.logo img {
  height: 2rem;
  width: auto;
  vertical-align: middle;
}

.logo.large img {
  height: 3rem;
}

/* Hide text but keep it accessible for screen readers */
.logo .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Breadcrumbs */
.breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--secondary-text);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin: 0 0.5rem;
  color: var(--secondary-text);
}

.breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--primary-color);
  font-weight: 500;
}

/* Forms & Buttons */
input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #E9ECEF;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-color);
}

button {
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
}

/* Links */
.subtle-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--secondary-text);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.subtle-link:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* Notifications */
.notification {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  display: none;
}

.notification.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.notification.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Home Page Specific Styles */
.signup-section {
  margin-top: 3rem;
  padding: 2rem;
  background: #F8F9FA;
  border-radius: 12px;
}

.signup-section h2 {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.signup-form {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.privacy-note {
  font-size: 0.875rem;
  color: var(--secondary-text);
  margin-top: 1rem;
}

/* FAQ Styles */
.faq-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(108, 92, 231, 0.1);
}

.faq-section h2 {
  color: var(--primary-color);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #F8F9FA;
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
}

.faq-item h3 {
  color: var(--primary-color);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 0; /* prevent large top gap from global h3 margins */
  margin-bottom: 1rem;
}

.faq-item p {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--secondary-text);
}

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

.scroll-indicator {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: rgba(108, 92, 231, 0.1);
  border-radius: 50%;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  transform: translate(-50%, -75%) rotate(45deg);
}

/* Mastering Flow Page Specific Styles */
.chapters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.chapter-card {
  background: var(--highlight-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(108, 92, 231, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.1);
  border-color: var(--accent-color);
}

.chapter-number {
  color: var(--accent-color);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.chapter-title {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.chapter-description {
  color: var(--secondary-text);
  font-size: 1rem;
  margin: 0;
}

.start-reading {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  margin-top: 2rem;
  transition: transform 0.2s ease;
}

.start-reading:hover {
  transform: translateY(-2px);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .scroll-indicator {
    display: block;
  }

  .container {
    padding: 40px 0;
  }

  /* Adjust container padding for pages with nav bar */
  .container.with-nav {
    padding-top: calc(40px + 4.5rem);
  }

  h1 {
    font-size: 2rem;
  }

  .signup-form {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .chapters {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
