/* ═══════════════════════════════════════════════════
   Philosophy Page — editorial experience
   Inherits all vars from styles.css
═══════════════════════════════════════════════════ */

/* Active nav state */
.nav-active {
  color: var(--emerald) !important;
}
.nav-active::after {
  width: 100% !important;
}

/* ── REVEAL SYSTEM ── */
.phil-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.phil-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════
   HERO
═══════════════════ */
.phil-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(7rem,14vw,11rem) 0 clamp(5rem,10vw,8rem);
  overflow: hidden;
  z-index: 1;
}

.phil-hero-bg {
  position: absolute;
  top: 50%; left: 55%;
  transform: translate(-50%,-50%);
  width: min(900px, 120vw);
  pointer-events: none;
  animation: spin-slow 160s linear infinite;
  opacity: 0.16;
  z-index: 0;
  filter: sepia(0.3) hue-rotate(10deg) saturate(1.3);
}
.phil-hero-bg img { width: 100%; }

.phil-hero-bloom {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 450px;
  pointer-events: none; z-index: 0;
  animation: bloom-pulse 12s ease-in-out infinite alternate;
}
.phil-hero-bloom::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%,
    rgba(212,175,55,0.14) 0%,
    rgba(22,163,74,0.08) 45%,
    transparent 75%);
  filter: blur(55px);
}

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

.phil-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--text-heading);
  margin: 1.2rem 0 2rem;
  letter-spacing: -0.02em;
}
.phil-hero-content h1 em {
  font-style: italic;
  color: var(--emerald);
}

.phil-hero-lead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 580px;
}

.phil-hero-scroll-hint {
  margin-top: 3rem;
}

/* ═══════════════════
   OPENING
═══════════════════ */
.phil-opening {
  position: relative; z-index: 2;
  padding: clamp(5rem,10vw,9rem) 0;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border);
}

.phil-opening-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: center;
}

.phil-mandala-small {
  opacity: 0.18;
  animation: spin-slow 200s linear infinite;
  filter: sepia(0.2) hue-rotate(10deg) saturate(1.2);
}
.phil-mandala-small img { width: 100%; }

.phil-opening-right h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-heading);
  margin-bottom: 1.8rem;
}

.phil-opening-right p {
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.phil-pullquote {
  font-family: var(--font-display) !important;
  font-size: clamp(1.1rem, 2vw, 1.35rem) !important;
  font-style: italic;
  font-weight: 300 !important;
  color: var(--emerald) !important;
  line-height: 1.6 !important;
  padding: 1.5rem 0 1.5rem 1.8rem;
  border-left: 3px solid rgba(22,163,74,0.35);
  margin: 2rem 0 0 !important;
}

/* ═══════════════════
   PRINCIPLES
═══════════════════ */
.phil-principles { position: relative; z-index: 2; }

/* ── Full-width principle sections ── */
.principle-full {
  position: relative;
  padding: clamp(5rem,10vw,9rem) 0;
  overflow: hidden;
}
.principle-alt { background: var(--bg-section); }

.principle-full-bg {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}
.principle-orb {
  position: absolute;
  width: 600px; height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  top: -100px; right: -100px;
  opacity: 0.7;
}
.principle-alt .principle-orb {
  left: -100px; right: auto;
}

.principle-full-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
  position: relative; z-index: 2;
}
.principle-alt .principle-full-grid {
  grid-template-columns: 1fr 320px;
}

/* ── Visual column ── */
.principle-full-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding-top: 0.5rem;
  position: sticky;
  top: 120px; /* sticks as you scroll the text */
}

.principle-number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 300;
  line-height: 1;
  color: var(--border-mid);
  letter-spacing: -0.04em;
  user-select: none;
}

.principle-icon-large {
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: inline-flex;
}

/* ── Text column ── */
.principle-full-text { padding-top: 0.5rem; }

.principle-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.principle-full-text h3 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-heading);
  margin-bottom: 1.8rem;
}

.principle-lead {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1.4rem;
}

.principle-full-text p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.principle-example {
  margin-top: 2rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-mid);
}
.principle-1 .principle-example { border-left-color: rgba(22,163,74,0.4); }
.principle-2 .principle-example { border-left-color: rgba(184,134,11,0.4); }
.principle-3 .principle-example { border-left-color: rgba(124,58,237,0.4); }
.principle-4 .principle-example { border-left-color: rgba(22,163,74,0.4); }

.principle-example-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}
.principle-example p {
  font-size: 14px !important;
  color: var(--text-muted) !important;
  line-height: 1.7 !important;
  margin: 0 !important;
}

/* ═══════════════════
   SACRED TECH
═══════════════════ */
.phil-sacred {
  position: relative; z-index: 2;
  padding: clamp(6rem,12vw,10rem) 0;
  overflow: hidden;
}

.phil-sacred-bg {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
}
.sacred-grad {
  position: absolute; inset: 0;
  background: var(--dark-grad);
}
.phil-sacred-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--dark-grad-glow);
  opacity: 0.8;
}
.sacred-mandala {
  position: absolute;
  top: 50%; right: -120px;
  transform: translateY(-50%);
  width: 600px; height: 600px;
  opacity: 0.07;
  animation: spin-slow 180s linear infinite;
  filter: sepia(0.2);
}

.phil-sacred-inner {
  position: relative; z-index: 2;
}

.phil-sacred-inner .section-tag { margin-bottom: 1rem; }

.phil-sacred-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 300;
  line-height: 1.08;
  color: #f0f4ff;
  margin-bottom: 3rem;
}
.phil-sacred-inner h2 em {
  font-style: italic;
  color: var(--gold-light, #d4af37);
}

.sacred-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: 2.5rem;
}

.sacred-text-grid p {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 300;
  color: rgba(240,244,255,0.7);
  line-height: 1.85;
}
.sacred-text-grid p em {
  font-style: italic;
  color: rgba(212,175,55,0.9);
}

/* ═══════════════════
   MANIFESTO
═══════════════════ */
.phil-manifesto {
  position: relative; z-index: 2;
  padding: clamp(5rem,10vw,9rem) 0;
  background: var(--bg-section);
  border-top: 1px solid var(--border);
}

.phil-manifesto-inner {
  max-width: 820px;
}

.manifesto-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.manifesto-line {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.35s var(--ease-out);
  align-items: start;
}
.manifesto-line:last-child { border-bottom: none; }
.manifesto-line:hover { padding-left: 8px; }

.line-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--emerald);
  opacity: 0.5;
  line-height: 1.2;
  transition: opacity 0.3s;
  user-select: none;
}
.manifesto-line:hover .line-num { opacity: 1; }

.manifesto-line p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 300;
  color: var(--text-body);
  line-height: 1.7;
  margin: 0;
  transition: color 0.3s;
}
.manifesto-line:hover p { color: var(--text-heading); }

/* ═══════════════════
   CTA
═══════════════════ */
.phil-cta {
  position: relative; z-index: 2;
  padding: clamp(5rem,10vw,9rem) 0;
  overflow: hidden;
  text-align: center;
}

.phil-cta-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
  animation: spin-slow 200s linear infinite;
  opacity: 0.07;
  z-index: 0;
}
.phil-cta-bg img { width: 500px; height: 500px; }

.phil-cta-inner {
  position: relative; z-index: 2;
  max-width: 580px;
  margin: 0 auto;
}

.phil-cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-heading);
  margin: 1rem 0 1.5rem;
}
.phil-cta-inner h2 em {
  font-style: italic;
  color: var(--emerald);
}

.phil-cta-inner p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.phil-cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .phil-opening-grid { grid-template-columns: 200px 1fr; gap: 3.5rem; }
  .principle-full-grid { grid-template-columns: 240px 1fr; gap: 3rem; }
  .principle-alt .principle-full-grid { grid-template-columns: 1fr 240px; }
  .principle-number { font-size: clamp(4rem, 10vw, 7rem); }
  .sacred-text-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .phil-opening-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .phil-mandala-small { display: none; }

  .principle-full-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .principle-alt .principle-full-grid {
    grid-template-columns: 1fr;
  }
  /* On tablet, visual column goes after text for alt rows */
  .principle-alt .principle-full-text { order: 1; }
  .principle-alt .principle-full-visual { order: 2; }

  .principle-full-visual {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0;
  }
  .principle-number { font-size: 4rem; }
  .principle-icon-large { padding: 1rem; }
  .principle-icon-large svg { width: 56px; height: 56px; }

  .sacred-text-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .sacred-mandala { display: none; }

  .manifesto-line { grid-template-columns: 30px 1fr; gap: 1rem; }
}

@media (max-width: 768px) {
  .phil-hero-content h1 { font-size: clamp(2.8rem, 12vw, 4.5rem); }
  .phil-hero-lead { font-size: 17px; }

  .phil-opening-right h2 { font-size: clamp(2rem, 8vw, 3rem); }
  .phil-opening-right p { font-size: 16px; }

  .principle-full-text h3 { font-size: clamp(2rem, 7vw, 3rem); }
  .principle-lead { font-size: 1.05rem; }
  .principle-full-text p { font-size: 15px; }

  .phil-cta-actions { flex-direction: column; align-items: center; }
  .phil-cta-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) {
  .phil-hero { padding: 7rem 0 4rem; }
  .phil-hero-content h1 { font-size: clamp(2.5rem, 13vw, 3.5rem); }
  .phil-hero-lead { font-size: 17px; line-height: 1.75; }

  .phil-opening-right h2 { font-size: 2.2rem; }
  .phil-opening-right p { font-size: 16px; line-height: 1.8; }
  .phil-pullquote { font-size: 1.05rem !important; padding-left: 1.2rem; }

  .principle-full { padding: 3.5rem 0; }
  .principle-full-visual { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .principle-number { font-size: 3.5rem; }
  .principle-full-text h3 { font-size: 2.2rem; }
  .principle-lead { font-size: 1rem; }
  .principle-full-text p { font-size: 16px; line-height: 1.8; }
  .principle-example p { font-size: 15px !important; }

  .phil-sacred { padding: 4rem 0; }
  .phil-sacred-inner h2 { font-size: 2.2rem; }
  .sacred-text-grid p { font-size: 16px; }

  .phil-manifesto { padding: 3.5rem 0; }
  .manifesto-line { grid-template-columns: 24px 1fr; gap: 0.85rem; padding: 1.5rem 0; }
  .manifesto-line p { font-size: 16px; }
  .line-num { font-size: 1.4rem; }

  .phil-cta { padding: 4rem 0; }
  .phil-cta-inner h2 { font-size: 2.2rem; }
  .phil-cta-inner p { font-size: 16px; }
}
