/*
Theme Name: The Fourth Wall Child Theme
Description: A sophisticated and luxurious WordPress child theme for literature blogging
Version: 1.0.0
Author: Custom Design
Template: twentytwentyfour
*/

/* Force load even if parent theme issues exist */
@import url('../twentytwentyfour/style.css');

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties - Color Palette */
:root {
  --deep-red: #A50034;
  --pure-white: #FFFFFF;
  --soft-pink: #F7C6C7;
  --bright-red: #D50032;
  --crimson: #B22234;
  
  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 4rem 2rem;
  --card-padding: 2rem;
  
  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(165, 0, 52, 0.1);
  --shadow-medium: 0 8px 30px rgba(165, 0, 52, 0.15);
  --shadow-strong: 0 12px 40px rgba(165, 0, 52, 0.2);
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--deep-red);
  background: linear-gradient(135deg, var(--pure-white) 0%, #fefefe 100%);
  overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/* Header */
.site-header {
  background: var(--pure-white);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(165, 0, 52, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-soft);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}

.site-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--deep-red);
  text-decoration: none;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 4px rgba(165, 0, 52, 0.1);
  transition: var(--transition-smooth);
}

.site-title:hover {
  color: var(--bright-red);
  transform: translateY(-1px);
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.main-navigation a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--deep-red);
  text-decoration: none;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bright-red), var(--crimson));
  transition: var(--transition-spring);
}

.main-navigation a:hover {
  color: var(--bright-red);
}

.main-navigation a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: var(--section-padding);
  text-align: center;
  background: linear-gradient(135deg, var(--pure-white) 0%, rgba(247, 198, 199, 0.1) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(213, 0, 50, 0.05) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  background: linear-gradient(135deg, var(--deep-red), var(--bright-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  text-shadow: 0 4px 8px rgba(165, 0, 52, 0.2);
}

.hero-description {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--deep-red);
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Featured Posts */
.featured-posts {
  padding: var(--section-padding);
  background: var(--pure-white);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--deep-red);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.post-card {
  background: var(--pure-white);
  border-radius: 16px;
  padding: var(--card-padding);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(247, 198, 199, 0.3);
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--bright-red), var(--crimson));
  transform: scaleX(0);
  transition: var(--transition-spring);
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: var(--soft-pink);
}

.post-card:hover::before {
  transform: scaleX(1);
}

.post-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--deep-red);
}

.post-excerpt {
  color: rgba(165, 0, 52, 0.8);
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bright-red);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.read-more:hover {
  color: var(--crimson);
  gap: 0.75rem;
}

/* About Section */
.about-section {
  padding: var(--section-padding);
  background: linear-gradient(135deg, var(--crimson) 0%, var(--deep-red) 100%);
  color: var(--pure-white);
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.about-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-title {
  color: var(--pure-white);
  margin-bottom: 2rem;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.8;
  opacity: 0.95;
}

/* Quote Section */
.quote-section {
  padding: var(--section-padding);
  background: var(--pure-white);
  text-align: center;
}

.stylized-quote {
  max-width: 700px;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-style: italic;
  color: var(--deep-red);
  position: relative;
  padding: 2rem;
}

.stylized-quote::before,
.stylized-quote::after {
  content: '"';
  font-size: 6rem;
  color: var(--soft-pink);
  position: absolute;
  font-family: var(--font-heading);
}

.stylized-quote::before {
  top: -1rem;
  left: -1rem;
}

.stylized-quote::after {
  bottom: -3rem;
  right: -1rem;
}

/* Newsletter Section */
.newsletter-section {
  padding: var(--section-padding);
  background: linear-gradient(135deg, rgba(247, 198, 199, 0.1) 0%, var(--pure-white) 100%);
  text-align: center;
}

.newsletter-form {
  max-width: 500px;
  margin: 2rem auto 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.email-input {
  flex: 1;
  min-width: 250px;
  padding: 1rem 1.5rem;
  border: 2px solid var(--soft-pink);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--pure-white);
  transition: var(--transition-smooth);
}

.email-input:focus {
  outline: none;
  border-color: var(--bright-red);
  box-shadow: 0 0 0 4px rgba(213, 0, 50, 0.1);
}

.subscribe-button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--bright-red), var(--crimson));
  color: var(--pure-white);
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: var(--shadow-soft);
}

.subscribe-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--deep-red) 0%, var(--crimson) 100%);
  color: var(--soft-pink);
  text-align: center;
  padding: 2rem 0;
  border-top: 4px solid var(--pure-white);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
}

.footer-content {
  position: relative;
  z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-navigation ul {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }
  
  .email-input {
    min-width: auto;
    width: 100%;
  }
  
  .about-content {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 2rem 1rem;
    --card-padding: 1.5rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--bright-red);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .newsletter-section,
  .site-footer {
    display: none;
  }
  
  body {
    color: #000;
    background: #fff;
  }
}