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

:root {
  /* Nano Banana / Muted Cream Background base */
  --bg-color: #FDFCF2; /* soft warm cream */
  --bg-overlay: rgba(253, 252, 242, 0.95);
  --text-dark: #1C1C1A;
  --text-muted: #5E5D5A;
  --accent-terracotta: #A85741;
  --accent-blue: #4A5B69;
  
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  smooth-scroll: true;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.2;
}

p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 65ch;
  color: var(--text-dark);
}

.caption {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Base Layout & Elevated Swiss Grid */
.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 0;
}

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

/* Nav */
nav {
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
  z-index: 10;
  background-color: var(--bg-color);
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: opacity 0.3s var(--ease);
}
nav a:hover {
  opacity: 0.5;
}

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

/* Hero Section */
.hero {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-img-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.8;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  animation: breathe 20s infinite alternate ease-in-out;
}

.hero-content {
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
  padding: 2rem;
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border-radius: 2px;
}

/* Offset Grid Sections (Vignettes) */
.offset-section {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  margin-bottom: 8rem;
  align-items: center;
}

.offset-section .text-block {
  grid-column: 2 / 6;
}

.offset-section .img-block {
  grid-column: 7 / 13;
  position: relative;
}

.offset-section.reverse .text-block {
  grid-column: 8 / 12;
}

.offset-section.reverse .img-block {
  grid-column: 1 / 7;
}

.classical-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: sepia(0.1) contrast(1.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transition: transform 1.5s var(--ease);
}

.classical-img:hover {
  transform: scale(1.02);
}

/* Mystery Page Styling */
.mystery-header {
  text-align: center;
  padding: 12rem 0 6rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.saint-quote {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--accent-terracotta);
  font-size: 1.5rem;
  margin: 2rem auto 0 auto;
  max-width: 900px;
  padding: 0 2rem;
  min-height: 3rem;
  transition: opacity 1s var(--ease);
}

.mystery-block {
  padding: 6rem 0;
}

.mystery-block {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4rem;
  align-items: start;
}

.mystery-title-area {
  grid-column: 2 / 6;
  position: sticky;
  top: 100px;
}

.spiritual-fruit {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--accent-blue);
  margin-bottom: 2rem;
  display: block;
}

.scripture-area {
  grid-column: 7 / 12;
  counter-reset: verse;
}

.verse {
  display: flex;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.verse.visible {
  opacity: 1;
  transform: translateY(0);
}

.verse::before {
  counter-increment: verse;
  content: counter(verse);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--accent-terracotta);
  margin-right: 1.5rem;
  margin-top: 0.4rem;
}

/* Contemplate Button */
.contemplate-btn-container {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: -2rem; /* Pulls it closer to the drawer */
}

.btn-contemplate {
  background: transparent;
  border: 1px solid var(--text-dark);
  padding: 1rem 2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  margin-top: 3rem;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-contemplate::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--text-dark);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  z-index: -1;
}

.btn-contemplate:hover {
  color: var(--bg-color);
}

.btn-contemplate:hover::before {
  transform: translateY(0);
}

/* Drawer Component (Downwards Drop) */
.drawer-container {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  background: var(--text-dark);
  color: var(--bg-color);
  transition: max-height 0.8s var(--ease), padding 0.8s var(--ease);
  margin-top: 2rem;
}

.drawer-container.open {
  max-height: 800px;
  padding: 4rem;
}

.drawer-content {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.6s var(--ease) 0.3s, transform 0.6s var(--ease) 0.3s;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.drawer-container.open .drawer-content {
  opacity: 1;
  transform: translateY(0);
}

.drawer-content p {
  color: var(--bg-color);
  font-size: 1.5rem;
  font-family: var(--font-serif);
  line-height: 1.8;
  margin: 0 auto;
}

.close-drawer {
  background: none;
  border: none;
  color: var(--accent-terracotta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  margin-top: 3rem;
  cursor: pointer;
}

/* Animations */
@keyframes breathe {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Instructions Section */
.instructions-section {
  margin-top: 10rem;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.instructions-section h2 {
  margin-bottom: 3rem;
}

.instructions-list {
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.8;
  list-style-position: outside;
  margin-left: 2rem;
  color: var(--text-dark);
}

.instructions-list li {
  margin-bottom: 1.5rem;
}

.instructions-list strong {
  color: var(--accent-terracotta);
  font-weight: 600;
}

/* Mobile */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 5%;
  }
  
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* Switch grids to flex columns for better stacking and centering */
  .offset-section, 
  .offset-section.reverse,
  .mystery-block,
  .grid-12 {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }

  .text-block, .img-block, .mystery-title-area, .scripture-area {
    width: 100%;
    padding: 0 1rem;
  }

  .img-block {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .mystery-title-area {
    position: relative;
    top: 0;
    text-align: center;
  }

  p, h1, h2, h3, .verse {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .drawer-container.open {
    padding: 2rem 1rem;
  }
}
