/* =============================================
   LIGHT THEME — warm ivory & gold
   ============================================= */
:root,
[data-theme="light"] {
  /* Backgrounds */
  --bg-base: #FDFAF6;
  --bg-alt: #F2EDE4;
  --bg-card: #FFFFFF;
  --bg-nav: #FDFAF6;
  --bg-footer: #FFFFFF;
  --bg-banner: #F2EDE4;
  --bg-intro: #FDFAF6;

  /* Text */
  --text-primary: #1C1712;
  --text-secondary: #4A3F35;
  --text-muted: #8A7B70;

  /* Accent */
  --gold: #B07D3A;
  --gold-hover: #8C6028;
  --gold-pale: #F5E9D6;
  --gold-border: rgba(176, 125, 58, 0.35);

  /* Teal accent */
  --teal: #1D6B65;
  --teal-pale: #E0F0EE;

  /* UI */
  --border: rgba(28, 23, 18, 0.12);
  --border-strong: rgba(28, 23, 18, 0.22);
  --shadow: 0 4px 24px rgba(28, 23, 18, 0.07);
  --shadow-lg: 0 12px 40px rgba(28, 23, 18, 0.10);

  /* Intro specific */
  --intro-bg: #1C1712;
  --intro-text: #FDFAF6;
  --intro-accent: #C9974A;

  /* Marquee */
  --marquee-bg: #1C1712;
  --marquee-text: #C9974A;

  /* Nav active underline */
  --nav-active-bg: #F5E9D6;

  /* Misc */
  --radius-sm: 5px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --nav-h: 72px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --transition: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   DARK THEME — deep navy & violet
   ============================================= */
[data-theme="dark"] {
  /* Backgrounds */
  --bg-base: #0D1117;
  --bg-alt: #161B24;
  --bg-card: #1C2333;
  --bg-nav: #0D1117;
  --bg-footer: #070A10;
  --bg-banner: #111722;
  --bg-intro: #0D1117;

  /* Text */
  --text-primary: #E8EDF5;
  --text-secondary: #A8B4C8;
  --text-muted: #5E6E85;

  /* Accent — violet / indigo */
  --gold: #7C6FD4;
  --gold-hover: #6058C0;
  --gold-pale: #1E1A35;
  --gold-border: rgba(124, 111, 212, 0.35);

  /* Teal accent */
  --teal: #38C9C0;
  --teal-pale: #0A2325;

  /* UI */
  --border: rgba(232, 237, 245, 0.09);
  --border-strong: rgba(232, 237, 245, 0.18);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);

  /* Intro specific */
  --intro-bg: #070A10;
  --intro-text: #E8EDF5;
  --intro-accent: #7C6FD4;

  /* Marquee */
  --marquee-bg: #111722;
  --marquee-text: #7C6FD4;

  --nav-active-bg: #1E1A35;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

button {
  cursor: pointer;
}

/* =============================================
   INTRO ANIMATION
   ============================================= */
#intro-screen {
  position: fixed;
  inset: 0;
  background: var(--intro-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: introExit 0.4s ease forwards 1.1s;
}

@keyframes introExit {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
    visibility: hidden;
  }
}

#intro-logo {
  text-align: center;
  padding: 1rem;
}

#intro-prefix {
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 2.5vw, 0.85rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--intro-accent);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.3s;
}

#intro-name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 9vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--intro-text);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.65s;
  line-height: 1.1;
}

#intro-line {
  height: 1px;
  background: var(--intro-accent);
  width: 0;
  margin: 1.1rem auto;
  animation: lineGrow 0.55s ease forwards 1.25s;
}

@keyframes lineGrow {
  to {
    width: min(200px, 55vw);
  }
}

#intro-tagline {
  font-size: clamp(0.6rem, 2vw, 0.8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--intro-accent);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.6s;
}

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

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, box-shadow 0.3s ease, border-color 0.4s ease;
}

#navbar.nav-animated {
  opacity: 0;
  animation: navReveal 0.5s ease forwards 3.3s;
}

@keyframes navReveal {
  to {
    opacity: 1;
  }
}

#navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
}

.brand-prefix {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color 0.4s;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: color 0.4s;
}

.nav-links {
  display: flex;
  gap: 0;
  margin-left: auto;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.73rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.4rem clamp(0.4rem, 1.2vw, 0.85rem);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: var(--nav-active-bg);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-strong);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.25s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: var(--gold-pale);
  color: var(--gold);
  border-color: var(--gold);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
}

[data-theme="light"] .icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   CONTAINER
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* =============================================
   SECTION SHARED
   ============================================= */
.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.6rem;
  transition: color 0.4s;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  transition: color 0.4s;
}

.section-title em {
  color: var(--gold);
  font-style: italic;
}

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
  gap: clamp(2rem, 5vw, 5rem);
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 3.7s;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero-title em {
  color: var(--gold);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.78;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2.25rem;
}

.hero-cta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 0.82rem clamp(1.2rem, 3vw, 2rem);
  background: var(--gold);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border: none;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

[data-theme="dark"] .btn-primary {
  color: #0D1117;
}

.btn-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.btn-ghost {
  display: inline-block;
  padding: 0.82rem clamp(1.2rem, 3vw, 2rem);
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.25s;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}

.hero-visual {
  flex: 0 0 clamp(240px, 35vw, 390px);
}

.hero-image-frame {
  position: relative;
  width: 100%;
  padding-top: 115%;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.hero-badge {
  position: absolute;
  bottom: -18px;
  right: -18px;
  background: var(--gold);
  border-radius: 50%;
  width: 88px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  box-shadow: var(--shadow);
}

[data-theme="dark"] .hero-badge {
  color: #0D1117;
}
[data-theme="light"] .hero-badge {
  color: #fff;
}

.badge-num {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
}

.badge-label {
  font-size: 0.52rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.3;
  margin-top: 2px;
}

/* =============================================
   GALLERY
   ============================================= */
.gallery-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  background: var(--bg-base);
  transition: background 0.4s;
  overflow: hidden;
}

.gallery-track-wrap {
  overflow: hidden;
  width: 100%;
  padding: 0.5rem 0;
}

.gallery-track {
  display: flex;
  gap: 1rem;
  width: max-content;
}

.gallery-track--left {
  animation: scrollLeft 40s linear infinite;
}

.gallery-track--right {
  animation: scrollRight 40s linear infinite;
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes scrollRight {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.gallery-item {
  flex: 0 0 clamp(160px, 18vw, 240px);
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.gallery-item:hover {
  border-color: var(--gold-border);
}

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

/* =============================================
   MARQUEE
   ============================================= */
.marquee-strip {
  background: var(--marquee-bg);
  padding: 0.85rem 0;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.4s;
}

.marquee-track {
  display: inline-flex;
  gap: 1.8rem;
  animation: marqueeScroll 28s linear infinite;
}

@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee-track span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--marquee-text);
  font-weight: 500;
  transition: color 0.4s;
}

.marquee-track .dot {
  color: var(--gold);
  opacity: 0.6;
}

/* =============================================
   PILLARS / CARDS
   ============================================= */
.pillars-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  background: var(--bg-base);
  transition: background 0.4s;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 1.25rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: all 0.3s;
}

.pillar-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pillar-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 1.1rem;
  color: var(--gold);
}

.pillar-icon svg {
  width: 100%;
  height: 100%;
}

.pillar-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
}

.pillar-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.pillar-card p em {
  color: var(--gold);
  font-style: italic;
}

/* =============================================
   PHILOSOPHY / BLOCKQUOTE
   ============================================= */
.philosophy-strip {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  background: var(--bg-alt);
  transition: background 0.4s;
}

.philosophy-quote {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.55;
  color: var(--gold);
  opacity: 0.25;
  margin-bottom: 0.25rem;
}

blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.7vw, 1.85rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 1.25rem;
  transition: color 0.4s;
}

blockquote em {
  color: var(--gold);
  font-style: normal;
}

cite {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
}

/* =============================================
   STATS
   ============================================= */
.stats-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  transition: background 0.4s, border-color 0.4s;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.4rem;
  transition: color 0.4s;
}

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

/* =============================================
   BOOKS TEASER (HOME)
   ============================================= */
.books-teaser {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  background: var(--bg-base);
}

.books-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.book-teaser-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-cover-placeholder {
  aspect-ratio: 3/4;
  max-width: 300px;
  background: var(--bg-alt);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background 0.4s;
}

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

.book-info h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.book-info p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.center-cta {
  text-align: center;
  margin-top: 0.5rem;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.75rem;
  transition: background 0.4s, border-color 0.4s;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.footer-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color 0.4s;
}

.footer-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  font-size: 0.73rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--gold);
  transition: color 0.25s;
}

.footer-bottom a:hover {
  color: var(--gold-hover);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 820px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-nav);
    padding: 1rem clamp(1rem, 4vw, 2rem);
    border-bottom: 1px solid var(--border);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.6rem 0.8rem;
    width: 100%;
  }

  #hero {
    flex-direction: column;
    padding-top: calc(var(--nav-h) + 1rem);
    gap: 2rem;
  }

  .hero-visual {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
  }

  .hero-badge {
    width: 72px;
    height: 72px;
    bottom: -12px;
    right: -12px;
  }

  .badge-num {
    font-size: 1.1rem;
  }

  .badge-label {
    font-size: 0.45rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    width: 60px;
    height: 60px;
    bottom: -8px;
    right: -8px;
  }

  .badge-num {
    font-size: 0.9rem;
  }

  .badge-label {
    font-size: 0.4rem;
  }
}