/* Cosmodestiny — Static HTML Mirror
   Design: minimal, warm, generous whitespace
*/

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&family=Fira+Code:wght@300;400;500;700&display=swap');

/* ── CSS Variables ── */
:root {
  --base:        #F8F7F5;
  --contrast:    #191919;
  --accent-1:    #FFFFFF;
  --accent-2:    #84f5b0;
  --accent-3:    #191919;
  --accent-4:    #5F5F5F;
  --accent-5:    #F1EEE9;
  --accent-6:    rgba(25,25,25,0.18);

  --font-manrope: 'Manrope', sans-serif;
  --font-code:    'Fira Code', monospace;

  /* Fluid spacing */
  --s-30: clamp(14px, 3vw, 30px);
  --s-40: clamp(20px, 4vw, 40px);
  --s-50: clamp(20px, 5vw, 50px);
  --s-60: clamp(30px, 7vw, 70px);
  --s-70: clamp(40px, 8vw, 90px);

  /* Fluid font sizes */
  --fs-sm:  0.875rem;
  --fs-md:  clamp(1rem, 1rem + 0.2vw, 1.125rem);
  --fs-lg:  clamp(1.125rem, 1.125rem + 0.4vw, 1.375rem);
  --fs-xl:  clamp(1.75rem, 1.75rem + 0.4vw, 2rem);
  --fs-2xl: clamp(2.15rem, 2.15rem + 1.3vw, 3rem);
  --fs-3xl: clamp(2.5rem, 2.5rem + 2vw, 4rem);

  /* Layout */
  --max-w:     1200px;
  --max-prose: 645px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  background-color: var(--base);
  color: var(--accent-4);
  font-family: var(--font-manrope);
  font-size: var(--fs-lg);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--s-50);
  background: var(--accent-5);
  color: var(--contrast);
  font-size: var(--fs-sm);
  padding: .5em 1em;
  z-index: 999;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Links ── */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: text-decoration-color .15s;
}
a:hover { text-decoration-color: var(--accent-4); }

/* ── Selection ── */
::selection { background: var(--accent-2); color: var(--contrast); }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--accent-4);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════
   HEADER — logo (big) + tagline below + nav right
═══════════════════════════════════════ */
.site-header {
  background-color: var(--base);
  border-bottom: 1px solid var(--accent-6);
  padding: var(--s-30) 0 var(--s-30);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s-40);
  display: flex;
  align-items: flex-end; /* nav aligns with bottom baseline */
  justify-content: space-between;
  gap: var(--s-40);
}

/* Logo block: stacked vertically — title then tagline */
.header-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.site-title {
  font-size: 1.35rem;  /* bigger, bolder */
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--contrast);
}
.site-title a {
  text-decoration: none;
  color: var(--contrast);
}

.site-tagline {
  font-size: var(--fs-sm);
  color: var(--accent-4);
  font-style: italic;
  line-height: 1.2;
}

/* ── Navigation ── */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-40);
  list-style: none;
  padding: 0;
  align-self: flex-end;
}

.site-nav a {
  font-size: var(--fs-sm);
  font-weight: 400;
  text-decoration: none;
  color: var(--accent-4);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--contrast);
  border-bottom-color: var(--contrast);
}

/* ═══════════════════════════════════════
   HOMEPAGE SECTIONS
═══════════════════════════════════════ */

/* Hero blockquote — small, italic, quote-style with left border */
.home-hero {
  background-color: var(--base);
  padding: var(--s-60) var(--s-40);
}

.home-hero-inner {
  max-width: var(--max-prose);
  margin: 0 auto;
}

.hero-quote {
  border: none;
  padding: 0;
  text-align: left;
  font-size: var(--fs-lg);
  font-weight: 300;
  color: var(--accent-4);
  line-height: 1.7;
  letter-spacing: 0;
  font-style: italic;
  border-left: 2px solid var(--accent-4);
  padding-left: var(--s-40);
}
.hero-quote p {
  margin-bottom: .15em;
}
.hero-quote p:last-child { margin-bottom: 0; }

/* Section 2: About — light accent */
.home-about {
  background-color: var(--accent-5);
  padding: var(--s-60) var(--s-40);
}

/* Section 3: Navigation links */
.home-nav {
  background-color: var(--base);
  padding: var(--s-60) var(--s-40);
}

.home-content {
  max-width: var(--max-prose);
  margin: 0 auto;
}

.home-content p { margin-bottom: .8em; }
.home-content p:last-child { margin-bottom: 0; }
.home-content blockquote { margin-top: 1.5em; }

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

/* ═══════════════════════════════════════
   INNER PAGES
═══════════════════════════════════════ */
.site-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-70) var(--s-40);
  flex: 1;
}

.page-content {
  max-width: var(--max-prose);
  margin: 0 auto;
}

/* ── Page header ── */
.page-header {
  margin-bottom: var(--s-50);
  padding-bottom: var(--s-40);
  border-bottom: 1px solid var(--accent-6);
}

.page-header h1 { margin-bottom: var(--s-20); }

.page-subtitle {
  font-size: var(--fs-md);
  color: var(--accent-4);
  font-style: italic;
  margin-top: var(--s-10);
}

/* ── Dark hero section (Philosophy block) ── */
.philo-dark {
  background-color: var(--contrast);
  color: var(--accent-1);
  padding: var(--s-60) var(--s-40);
  margin: var(--s-60) 0;
  text-align: center;
}

.philo-dark-inner {
  max-width: var(--max-prose);
  margin: 0 auto;
}

.philo-dark h2 {
  color: var(--accent-1);
  font-size: var(--fs-2xl);
  font-weight: 400;
  margin-bottom: var(--s-30);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.philo-dark hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.3);
  margin: 0 auto var(--s-40);
  width: 60%;
}

.philo-dark .philo-subtitle {
  font-size: var(--fs-lg);
  font-style: italic;
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--s-50);
  line-height: 1.4;
}

.philo-dark p {
  color: rgba(255,255,255,0.9);
  line-height: 2;
  margin-bottom: .8em;
  font-size: var(--fs-md);
  font-weight: 300;
  text-align: left;
}

.philo-dark p:last-child { margin-bottom: 0; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  color: var(--contrast);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: .6em;
  margin-top: 1.4em;
  letter-spacing: -.01em;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); font-weight: 600; }
h1:first-child,
h2:first-child,
h3:first-child { margin-top: 0; }

/* ── Paragraphs ── */
p { margin-bottom: 1.1em; }

/* ── Blockquotes ── */
blockquote {
  border-left: 2px solid var(--accent-4);
  padding: var(--s-30) var(--s-40);
  margin: var(--s-40) 0;
  font-size: var(--fs-lg);
  font-weight: 300;
  color: var(--contrast);
  font-style: normal;
  line-height: 1.7;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote em { font-style: italic; }

/* ── Lists ── */
ul, ol { padding-left: var(--s-40); margin-bottom: 1.2em; }
li { margin-bottom: .4em; }

/* ── HR ── */
hr {
  border: none;
  border-top: 1px solid var(--accent-6);
  margin: var(--s-50) 0;
}

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-bottom: var(--s-40); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--accent-6); }
th { font-weight: 700; color: var(--contrast); border-bottom: 2px solid var(--accent-4); }
tr:hover td { background-color: var(--accent-5); }

.comparison-table { overflow-x: auto; }

/* ── Challenge blocks ── */
.challenge-block {
  background-color: var(--accent-5);
  border-radius: 3px;
  padding: var(--s-40);
  margin: var(--s-40) 0;
}
.challenge-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-4);
  margin-bottom: var(--s-20);
}
.challenge-response {
  border-left: 2px solid var(--accent-4);
  padding-left: var(--s-30);
  margin-top: var(--s-20);
}

/* ── FAQ accordion ── */
.faq-item {
  border-bottom: 1px solid var(--accent-6);
  padding: var(--s-30) 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--accent-6); }
details[open] .faq-toggle-icon { transform: rotate(45deg); }

.faq-question {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--contrast);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-20);
  list-style: none;
  margin-bottom: 0;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; }
.faq-toggle-icon {
  font-size: 1.2em;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform .2s;
  color: var(--accent-4);
}
.faq-answer { color: var(--accent-4); line-height: 1.7; margin-top: var(--s-20); }

/* ── Attunings ── */
.attuning {
  background-color: var(--accent-5);
  border-radius: 3px;
  padding: var(--s-40);
  margin: var(--s-40) 0;
}
.attuning h2 {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: var(--s-30);
  margin-top: 0;
  padding-bottom: var(--s-20);
  border-bottom: 1px solid var(--accent-6);
}
.attuning-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-4);
  margin-top: var(--s-30);
  margin-bottom: var(--s-10);
}

/* ── Principle items ── */
.principle-item { margin-bottom: var(--s-50); }
.principle-number {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-4);
  margin-bottom: var(--s-10);
}

/* ── Mantra blocks ── */
.mantra-block {
  background-color: var(--accent-5);
  border-top: 1px solid var(--accent-6);
  border-bottom: 1px solid var(--accent-6);
  padding: var(--s-60) var(--s-40);
  margin: var(--s-50) 0;
  text-align: center;
}
.mantra-block p {
  font-size: var(--fs-lg);
  font-weight: 400;
  color: var(--contrast);
  line-height: 1.9;
  margin-bottom: .5em;
  font-style: italic;
}
.mantra-emphasis {
  font-size: var(--fs-xl) !important;
  font-weight: 600 !important;
  font-style: normal !important;
  display: block;
  margin-bottom: .4em;
}

/* ── Section label ── */
.section-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-4);
  margin-bottom: var(--s-30);
  margin-top: var(--s-60);
}

/* ── Nav helpers ── */
.nav-links {
  display: flex;
  justify-content: space-between;
  gap: var(--s-30);
  margin-top: var(--s-60);
  padding-top: var(--s-40);
  border-top: 1px solid var(--accent-6);
  flex-wrap: wrap;
}
.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-4);
  transition: color .2s;
}
.nav-links a:hover { color: var(--contrast); }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--accent-6);
  padding: var(--s-50) var(--s-40);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-20);
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--s-30);
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--accent-4);
  transition: color .2s;
}
.footer-links a:hover { color: var(--contrast); }

.footer-copy {
  font-size: var(--fs-sm);
  color: var(--accent-4);
  font-style: italic;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Header: stack logo + hamburger button */
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
  }
  .header-brand { padding-bottom: 12px; }

  /* Hamburger button */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    color: var(--contrast);
  }
  .menu-toggle svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; }

  /* Nav drawer: hidden by default, slides down */
  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--base);
    border-top: 1px solid var(--accent-6);
    padding: 12px 0;
    width: 100%;
  }
  .site-nav.is-open { display: flex; }
  .site-nav li { border-bottom: 1px solid var(--accent-6); }
  .site-nav li:last-child { border-bottom: none; }
  .site-nav a {
    display: block;
    padding: 14px var(--s-40);
    font-size: 1rem;
    text-transform: none;
    letter-spacing: .02em;
  }

  /* Content: prevent overflow */
  .page-content,
  .home-content,
  .home-hero-inner {
    padding: 0 var(--s-30);
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Prose constrain + overflow-wrap for tables */
  .page-content { max-width: 100%; }
  .comparison-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; font-size: 0.8rem; }

  /* Philosophy dark block: stay full width */
  .philo-dark { padding: var(--s-40) var(--s-30); }
  .philo-dark-inner { padding: 0; max-width: 100%; overflow-x: hidden; }
  .philo-dark h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); overflow-wrap: break-word; }

  blockquote { padding: var(--s-20) var(--s-30); }
  .attuning, .challenge-block { padding: var(--s-30); }
  .site-main { padding: var(--s-50) 0; }
  .site-footer { padding: var(--s-40) var(--s-30); }
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: var(--s-20); }
  blockquote { padding: var(--s-20) var(--s-30); }
  .attuning, .challenge-block { padding: var(--s-30); }
}

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