/* Modern, elegant design for Permacommons */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.7;
  color: #1a202c;
  background-color: #ffffff;
  font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #1a202c;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.875rem;
}

p {
  margin-bottom: 1.5rem;
  color: #4a5568;
  font-size: 1.125rem;
}

a {
  color: #3182ce;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2c5aa0;
}

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

.section {
  padding: 5rem 0;
}

/* Navigation */
.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: #1a202c;
  text-decoration: none;
}

.nav-brand img {
  height: 2rem;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: #4a5568;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #3182ce;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #3182ce;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 8rem 0 6rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  height: 5rem;
  width: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-size: 4rem;
  font-weight: 700;
}

.hero-tagline {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: white;
  color: #3182ce;
  border-color: white;
}

.btn-primary:hover {
  background: #f7fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-secondary:hover {
  background: white;
  color: #3182ce;
  transform: translateY(-2px);
}

/* Content Sections */
.content-section {
  padding: 6rem 0;
}

.content-section:nth-child(even) {
  background: #f8fafc;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1a202c;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #718096;
  max-width: 600px;
  margin: 0 auto;
}

.content-grid {
  display: grid;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.content-card {
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.vision-section {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  text-align: center;
}

.vision-section .section-title,
.vision-section .section-subtitle {
  color: white;
}

.cta-section {
  background: #1a202c !important;
  color: white !important;
  text-align: center;
}

.cta-section .section-title,
.cta-section .section-subtitle {
  color: white !important;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.cta-section .btn-primary {
  background: white !important;
  color: #3182ce !important;
  border-color: white !important;
}

/* Blog Styles */
.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 2rem;
  margin-top: 4rem;
}

.blog-title {
  font-size: 3rem;
  margin-bottom: 3rem;
  text-align: center;
  color: #1a202c;
}

.blog-post {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-post-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.blog-post-title a {
  color: #1a202c;
  text-decoration: none;
}

.blog-post-title a:hover {
  color: #3182ce;
}

.blog-post-description {
  color: #718096;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #a0aec0;
  font-size: 0.875rem;
}

/* Blog Post Content Styling */
.content-card h1,
.content-card h2,
.content-card h3,
.content-card h4,
.content-card h5,
.content-card h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1a202c;
}

.content-card h1:first-child,
.content-card h2:first-child,
.content-card h3:first-child {
  margin-top: 0;
}

.content-card h2 {
  font-size: 1.875rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.content-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.content-card p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: #4a5568;
}

.content-card ul,
.content-card ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  color: #4a5568;
}

.content-card li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.content-card li:last-child {
  margin-bottom: 0;
}

.content-card ul {
  list-style-type: disc;
}

.content-card ol {
  list-style-type: decimal;
}

.content-card ul ul,
.content-card ol ol,
.content-card ul ol,
.content-card ol ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.content-card blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #3182ce;
  background: #f7fafc;
  font-style: italic;
  color: #2d3748;
}

.content-card code {
  background: #f7fafc;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: #e53e3e;
}

.content-card pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content-card pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

.content-card hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid #e2e8f0;
}

.content-card strong {
  font-weight: 600;
  color: #1a202c;
}

.content-card em {
  font-style: italic;
}

.content-card a {
  color: #3182ce;
  text-decoration: underline;
  text-decoration-color: rgba(49, 130, 206, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.content-card a:hover {
  color: #2c5aa0;
  text-decoration-color: rgba(44, 90, 160, 0.6);
}

/* Footer */
.footer {
  background: #1a202c;
  color: #cbd5e1;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-section p,
.footer-section li {
  color: #a0aec0;
  margin-bottom: 0.5rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #a0aec0;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 2rem;
  text-align: center;
  color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .nav-container {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .nav-brand {
    font-size: 1.125rem;
  }
  
  .nav-brand img {
    height: 1.75rem;
  }
  
  .nav-links {
    gap: 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero {
    padding: 5rem 0 3rem;
    margin-top: 3.5rem;
  }
  
  .hero-logo {
    height: 4rem;
    margin-bottom: 1.5rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  .section-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .section-subtitle {
    font-size: 1.125rem;
    padding: 0 1rem;
  }
  
  .content-section {
    padding: 3rem 0;
  }
  
  .section-header {
    margin-bottom: 2.5rem;
  }
  
  .content-card {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .content-card h2 {
    font-size: 1.5rem;
  }
  
  .content-card h3 {
    font-size: 1.25rem;
  }
  
  .content-card p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .content-card ul,
  .content-card ol {
    padding-left: 1.5rem;
    margin: 1.25rem 0;
  }
  
  .blog-container {
    padding: 3rem 1rem;
  }
  
  .blog-title {
    font-size: 2.25rem;
    margin-bottom: 2rem;
  }
  
  .blog-post {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .blog-post-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .blog-post-description {
    font-size: 1rem;
  }
  
  .blog-post-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
  }
  
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-section {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.5rem 0.75rem;
  }
  
  .nav-brand {
    font-size: 1rem;
  }
  
  .nav-brand img {
    height: 1.5rem;
  }
  
  .nav-links {
    gap: 1rem;
    font-size: 0.85rem;
  }
  
  .hero {
    padding: 4rem 0 2.5rem;
    margin-top: 3rem;
  }
  
  .hero-logo {
    height: 3.5rem;
    margin-bottom: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-tagline {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    padding: 0 0.5rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .content-section {
    padding: 2.5rem 0;
  }
  
  .content-card {
    padding: 1.25rem;
    margin: 0 0.25rem;
  }
  
  .content-card h2 {
    font-size: 1.375rem;
  }
  
  .content-card h3 {
    font-size: 1.125rem;
  }
  
  .content-card p {
    font-size: 0.95rem;
  }
  
  .blog-container {
    padding: 2.5rem 0.75rem;
  }
  
  .blog-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .blog-post {
    padding: 1.25rem;
  }
  
  .blog-post-title {
    font-size: 1.375rem;
  }
  
  .blog-post-description {
    font-size: 0.95rem;
  }
  
  .footer {
    padding: 2.5rem 0 1.25rem;
  }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  /* Better touch targets */
  .nav-links a {
    padding: 0.75rem 0.5rem;
  }
  
  /* Improved readability */
  body {
    font-size: 15px;
  }
  
  /* Better spacing for mobile */
  .content-card ul li,
  .content-card ol li {
    margin-bottom: 0.5rem;
  }
  
  /* Mobile-optimized code blocks */
  .content-card pre {
    padding: 1rem;
    font-size: 0.8rem;
    overflow-x: auto;
  }
  
  /* Better blockquote on mobile */
  .content-card blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
}

/* FAQ Page Specific Styles */
.faq-page {
  padding-top: 6rem;
  margin-top: 4rem;
}

.faq-page .section-title {
  font-size: 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.faq-page .section-subtitle {
  font-size: 1.25rem;
  color: #718096;
  max-width: 700px;
  margin: 0 auto;
}

/* FAQ Content Styling */
.faq-content {
  max-width: 900px;
  margin: 0 auto;
}

.faq-content h2 {
  font-size: 2rem;
  color: #1a202c;
  margin-top: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #3182ce;
  position: relative;
}

.faq-content h2:first-of-type {
  margin-top: 0;
}

.faq-content h2::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.faq-content h3 {
  font-size: 1.375rem;
  color: #2d3748;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding: 1rem 0 0.5rem;
  border-left: 4px solid #3182ce;
  padding-left: 2.5rem;
  background: linear-gradient(90deg, rgba(49, 130, 206, 0.05) 0%, transparent 100%);
  position: relative;
}

.faq-content h3::before {
  content: 'Q:';
  position: absolute;
  left: -4px;
  top: 1rem;
  background: #3182ce;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0 0.25rem 0.25rem 0;
  line-height: 1;
}

.faq-content h3 + p {
  margin-top: 0.75rem;
  padding-left: 2.5rem;
  border-left: 4px solid #e2e8f0;
  background: rgba(247, 250, 252, 0.5);
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.faq-content h3 + p::before {
  content: 'A:';
  position: absolute;
  left: -4px;
  top: 1rem;
  background: #48bb78;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0 0.25rem 0.25rem 0;
  line-height: 1;
}

.faq-content hr {
  margin: 4rem 0;
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-20 {
  margin-top: 5rem;
}

/* Smooth animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}
