/* Fonts are loaded via <link rel="preconnect"> + stylesheet in each page head
   (faster than @import, which blocks on this file downloading first). */

:root {
  /* dark — light shattering through darkness */
  --void: #14110C;
  --void-2: #1A160F;
  --panel: #211C14;

  --bone: #ECE4D4;
  --ivory: #F6F0E3;
  --ash: #B6AC98;
  --soft-gray: #847B6B;

  --muted-gold: #B8964E;
  --brass: #C9A961;

  --line: rgba(236, 228, 212, 0.10);
  --line-strong: rgba(236, 228, 212, 0.18);
  --gold-line: rgba(201, 169, 97, 0.45);

  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-serif);
  background: var(--void);
  color: var(--bone);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--muted-gold); color: var(--void); }

/* ── Layered backgrounds ── */

#branch-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#star-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* warm depth — a faint glow as if light emanates from the center */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(201,169,97,0.06), transparent 60%),
    radial-gradient(ellipse 90% 90% at 50% 50%, transparent 55%, rgba(0,0,0,0.45) 100%);
}

.hero, .section, nav, footer, .page-header, .page-body { position: relative; z-index: 1; }

/* ── Navigation ── */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.6s ease, padding 0.4s ease, border-color 0.6s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(20, 17, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1rem 3rem;
  border-bottom: 1px solid var(--line);
}

.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  position: relative;
  transition: color 0.4s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0;
  width: 0; height: 1px;
  background: var(--brass);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav-links a:hover { color: var(--ivory); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero ── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 10rem;
}

.hero-logo {
  width: min(420px, 64vw);
  margin-bottom: 3rem;
  opacity: 0;
  animation: emerge 2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s forwards;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 400;
  color: var(--ivory);
  text-align: center;
  max-width: 660px;
  line-height: 1.35;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: fadeInUp 1.5s ease 0.9s forwards;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 1.7vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ash);
  text-align: center;
  max-width: 620px;
  line-height: 1.8;
  text-wrap: balance;
  opacity: 0;
  animation: fadeInUp 1.6s ease 1.4s forwards;
}

.hero-tagline em { font-style: normal; color: var(--bone); }

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--soft-gray);
  opacity: 0;
  animation: fadeInUp 1.6s ease 1.8s forwards;
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 38px;
  margin: 0.9rem auto 0;
  background: linear-gradient(to bottom, var(--gold-line), transparent);
}

/* ── Sections ── */

.section {
  padding: 9rem 2rem;
  max-width: 820px;
  margin: 0 auto;
}

.section.wide { max-width: 1100px; }

.section-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold-line);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ivory);
  margin-bottom: 2rem;
  letter-spacing: 0.005em;
}

.section p {
  font-size: 1.18rem;
  color: var(--ash);
  margin-bottom: 1.5rem;
  max-width: 660px;
}

.section p:last-child { margin-bottom: 0; }
.section p em { color: var(--bone); font-style: italic; }

.gold-rule {
  width: 64px; height: 1px;
  background: var(--gold-line);
  margin: 4rem 0;
}

/* ── Tenets: three growing motifs ── */

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

.tenet { text-align: left; }

.tenet h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 0.7rem;
}

.tenet p {
  font-size: 1.02rem;
  color: var(--ash);
  line-height: 1.7;
  margin: 0;
}

/* ── Constellation field within a section ── */

.constellation-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

/* ── Footer ── */

footer {
  padding: 4.5rem 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft-gray);
}

.footer-right { font-family: var(--font-sans); font-size: 0.68rem; color: var(--soft-gray); letter-spacing: 0.05em; }
.footer-right a { color: var(--ash); text-decoration: none; transition: color 0.4s ease; }
.footer-right a:hover { color: var(--brass); }

/* ── Animations ── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes emerge {
  from { opacity: 0; transform: translateY(34px) scale(0.96); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Inner page headers ── */

.page-header {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 11rem 2rem 4rem;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 1.2rem;
}

.page-header .subtitle {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-style: italic;
  color: var(--soft-gray);
}

.page-body { max-width: 820px; margin: 0 auto; padding: 4rem 2rem 9rem; text-align: center; }
.page-body p { font-size: 1.1rem; color: var(--soft-gray); font-style: italic; }

/* ── Editorial prose (inner pages) ── */

.page-prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2rem 9rem;
}

.page-prose p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.85;
  color: var(--ash);
  margin-bottom: 1.8rem;
}

.page-prose p:last-child { margin-bottom: 0; }

/* ── Team grid ── */

.team-grid {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 2rem 9rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem 3.5rem;
  justify-items: center;
}

.member { text-align: center; max-width: 320px; }

.member-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.8rem;
  border: 1px solid var(--line-strong);
  filter: grayscale(100%) contrast(1.02) brightness(0.96);
  transition: filter 1.2s ease, border-color 1.2s ease;
}

.member:hover .member-portrait {
  filter: grayscale(0%) contrast(1) brightness(1);
  border-color: var(--gold-line);
}

.member-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.member-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 0.35rem;
}

.member-role {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ── Mobile ── */

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-toggle span { display: block; width: 22px; height: 1px; background: var(--bone); margin: 5px 0; transition: all 0.3s ease; }

@media (max-width: 860px) {
  .tenets { grid-template-columns: 1fr; gap: 2.5rem; }
  .team-grid { grid-template-columns: 1fr; gap: 3.5rem; }
}

@media (max-width: 768px) {
  nav { padding: 1.2rem 1.5rem; }
  nav.scrolled { padding: 1rem 1.5rem; }
  .mobile-toggle { display: block; z-index: 101; }
  .nav-links {
    position: fixed; top: 0; right: -100%;
    width: 72%; max-width: 320px; height: 100vh;
    background: var(--void-2);
    flex-direction: column; padding: 6rem 2.5rem; gap: 2rem;
    transition: right 0.45s cubic-bezier(0.2,0.7,0.2,1);
    border-left: 1px solid var(--line);
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 0.85rem; }
  .hero-logo { width: min(300px, 74vw); margin-bottom: 2.5rem; }
  .section { padding: 6rem 1.5rem; }
  footer { flex-direction: column; gap: 1.5rem; text-align: center; padding: 3rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
