/* Base styles for The Church of the Random */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-dark: #0a0e27;
  --secondary-dark: #141b3d;
  --accent-gold: #d4af37;
  --accent-blue: #4a90e2;
  --light-text: #f5f5f5;
  --muted-text: #a8b2d1;
  --soft-white: #fafafa;
}

body {
  font-family: 'Garamond', 'Georgia', serif;
  line-height: 1.8;
  color: var(--muted-text);
  background: var(--primary-dark);
  overflow-x: hidden;
}

/* Animated Background */
.cosmic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(ellipse at 20% 30%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
  radial-gradient(ellipse at 80% 70%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
  radial-gradient(circle at 50% 50%, var(--secondary-dark) 0%, var(--primary-dark) 100%);
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* Header */
header {
  position: relative;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo-symbol {
  width: 80px;
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer rotating hexagon */
.logo-symbol::before {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  border: 2px solid var(--accent-gold);
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  animation: rotate 30s linear infinite;
  opacity: 0.5;
}

/* Inner rotating hexagon */
.logo-symbol::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  border: 2px solid var(--accent-gold);
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  animation: rotate 20s linear infinite reverse;
  opacity: 0.7;
}

.logo-symbol .inner-circle {
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  position: absolute;
}

.logo-symbol .outer-circles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.logo-symbol .outer-circle {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0.6;
}

.logo-symbol .outer-circle:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.logo-symbol .outer-circle:nth-child(2) {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.logo-symbol .outer-circle:nth-child(3) {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.logo-symbol .outer-circle:nth-child(4) {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.logo-symbol .lines {
  position: absolute;
  width: 100%;
  height: 100%;
}

.logo-symbol .line {
  position: absolute;
  background: var(--accent-gold);
  opacity: 0.3;
}

.logo-symbol .line.horizontal {
  width: 60px;
  height: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-symbol .line.vertical {
  width: 1px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-symbol .line.diagonal1 {
  width: 1px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.logo-symbol .line.diagonal2 {
  width: 1px;
  height: 60px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo-text {
  text-align: center;
}

.logo-text h1 {
  font-size: clamp(1.4rem, 2.2vw + 1rem, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.4rem;
  color: var(--light-text);
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.logo-text p {
  font-size: clamp(0.8rem, 0.6vw + 0.6rem, 1rem);
  color: var(--accent-gold);
  letter-spacing: 0.25rem;
  font-style: italic;
  font-weight: 300;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem 8rem 2rem;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.fractal-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-content h2 {
  font-size: clamp(2rem, 5vw + 1rem, 4.5rem);
  font-weight: 300;
  color: var(--light-text);
  margin-bottom: 2rem;
  letter-spacing: 0.15rem;
  line-height: 1.2;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.hero-content .subtitle {
  font-size: clamp(1rem, 1.2vw + 0.6rem, 1.5rem);
  color: var(--accent-gold);
  font-style: italic;
  margin-bottom: 1rem;
  font-weight: 300;
  letter-spacing: 0.05rem;
}

.hero-content .tagline {
  font-size: clamp(0.95rem, 0.8vw + 0.6rem, 1.1rem);
  color: var(--muted-text);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Divider */
.section-divider {
  max-width: 800px;
  margin: 3rem auto;
  text-align: center;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.section-divider::before {
  left: 0;
}

.section-divider::after {
  right: 0;
}

.divider-symbol {
  font-size: 1.5rem;
  color: var(--accent-gold);
}

/* Content Sections */
.content-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(4rem, 6vw, 8rem) clamp(1.5rem, 3vw, 4rem);
}

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

.section-header h3 {
  font-size: clamp(1.8rem, 3vw + 0.8rem, 3rem);
  color: var(--light-text);
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.2rem;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.section-header p {
  font-size: clamp(1rem, 0.6vw + 0.7rem, 1.2rem);
  color: var(--muted-text);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Three Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  margin-top: 4rem;
}

.pillar {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(20, 27, 61, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pillar:hover::before {
  opacity: 1;
}

.pillar:hover {
  transform: translateY(-10px);
  border-color: var(--accent-gold);
}

.pillar-icon {
  font-size: clamp(2rem, 2.5vw + 1rem, 3.5rem);
  margin-bottom: 2rem;
  filter: grayscale(1) brightness(1.5);
  opacity: 0.8;
}

.pillar h4 {
  font-size: clamp(1.2rem, 1.2vw + 0.6rem, 1.6rem);
  margin-bottom: 1.5rem;
  color: var(--accent-gold);
  font-weight: 300;
  letter-spacing: 0.1rem;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.pillar p {
  color: var(--muted-text);
  line-height: 1.9;
  font-size: clamp(0.95rem, 0.6vw + 0.6rem, 1.05rem);
}

/* Quote Section */
.quote-section {
  background: linear-gradient(135deg, rgba(20, 27, 61, 0.8) 0%, rgba(10, 14, 39, 0.9) 100%);
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.quote-section::before {
  content: '"';
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12rem;
  color: rgba(212, 175, 55, 0.1);
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  line-height: 1;
}

.quote-section blockquote {
  font-size: clamp(1.3rem, 2.5vw + 0.5rem, 2.2rem);
  font-style: italic;
  max-width: 900px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-weight: 300;
  color: var(--light-text);
  position: relative;
  z-index: 1;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.quote-section cite {
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-style: normal;
  letter-spacing: 0.1rem;
}

/* Teachings Section */
.teachings {
  background: rgba(10, 14, 39, 0.5);
}

.teaching-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.teaching-card {
  background: rgba(20, 27, 61, 0.6);
  padding: clamp(1.5rem, 2vw + 1rem, 3rem);
  border-left: 3px solid var(--accent-gold);
  transition: all 0.3s ease;
}

.teaching-card:hover {
  background: rgba(20, 27, 61, 0.9);
  transform: translateX(10px);
}

.teaching-card h5 {
  font-size: clamp(1.2rem, 1.4vw + 0.7rem, 1.8rem);
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  font-weight: 300;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.teaching-card p {
  color: var(--muted-text);
  line-height: 1.9;
  font-size: clamp(0.95rem, 0.6vw + 0.6rem, 1.05rem);
}

/* Principles */
.principles-list {
  max-width: 900px;
  margin: 4rem auto 0;
}

.principle-item {
  background: rgba(20, 27, 61, 0.3);
  padding: 2rem 3rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.principle-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--accent-gold);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.principle-item:hover::before {
  transform: scaleY(1);
}

.principle-item:hover {
  background: rgba(20, 27, 61, 0.6);
  border-color: var(--accent-gold);
}

.principle-number {
  color: var(--accent-gold);
  font-size: clamp(1.8rem, 2.2vw + 0.8rem, 3rem);
  font-weight: 300;
  margin-bottom: 1rem;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.principle-item h6 {
  font-size: 1.4rem;
  color: var(--light-text);
  margin-bottom: 1rem;
  font-weight: 300;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.principle-item p {
  color: var(--muted-text);
  line-height: 1.9;
}

/* Footer */
footer {
  background: rgba(10, 14, 39, 0.9);
  padding: clamp(3rem, 5vw, 6rem) clamp(1.5rem, 3vw, 4rem) 3rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  margin-bottom: 4rem;
  text-align: center;
}

.footer-section h6 {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  font-weight: 300;
  color: var(--accent-gold);
  letter-spacing: 0.1rem;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.footer-about p {
  color: var(--muted-text);
  line-height: 1.9;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--muted-text);
}

.footer-bottom p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Removed deprecated manual view toggle and mobile preview styles */

/* Responsive */
@media (max-width: 1200px) {
  .pillars {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .teaching-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 2rem;
  }
  
  .logo {
    flex-direction: column;
    gap: 1rem;
  }
  
  .logo-text {
    text-align: center;
  }
  
  .logo-text h1 {
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
  }
  
  .logo-text p {
    font-size: 0.85rem;
    letter-spacing: 0.15rem;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero-content h2 {
    font-size: 2.5rem;
  }
  
  .hero-content .subtitle {
    font-size: 1.2rem;
  }
  
  .content-section {
    padding: 5rem 2rem;
  }
  
  .section-header h3 {
    font-size: 2rem;
  }
  
  .quote-section blockquote {
    font-size: 1.5rem;
  }
}
