@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Cinzel:wght@400;500;600;700&display=swap');

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

:root {
  /* Palette */
  --gold-deep: #C8960C;
  --gold-mid: #D4A840;
  --gold-light: #E8CC6E;
  --cream: #FAF6EE;
  --cream-dark: #F0E8D8;
  --text-dark: #1A1A1A;
  --text-muted: #4A4235;
  --amber-dark: #3D2B08;
  --white-warm: #F5E6C8;
  --gold-link: #B8860B;

  /* Typography */
  --font-serif: 'EB Garamond', 'Georgia', serif;
  --font-display: 'Cinzel', 'Georgia', serif;
  --line-height: 1.8;
  --content-width: 700px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
}

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

body {
  font-family: var(--font-serif);
  color: var(--text-dark);
  background: var(--cream);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-link);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-sm);
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.site-nav--scrolled {
  background: rgba(30, 21, 5, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
  color: rgba(250, 240, 215, 0.85);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(220, 190, 120, 0.2);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #fff;
  border-color: rgba(232, 204, 110, 0.45);
  background: rgba(200, 150, 12, 0.15);
  opacity: 1;
}

.nav-link--active {
  color: #fff;
  border-color: rgba(232, 204, 110, 0.5);
  background: rgba(200, 150, 12, 0.1);
}

@media (min-width: 481px) {
  .site-nav {
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 1.25rem;
    letter-spacing: 0.16em;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--space-xl) + 2rem) var(--space-md) var(--space-lg);
}

.hero__icon-wrapper {
  display: inline-block;
  position: relative;
  margin-bottom: var(--space-lg);
}

.hero__icon {
  width: 280px;
  height: auto;
  border-radius: 8px;
  box-shadow:
    0 0 30px rgba(200, 150, 12, 0.6),
    0 0 80px rgba(200, 150, 12, 0.35),
    0 0 160px rgba(180, 130, 10, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.5);
}

.hero__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 0 40px rgba(200, 150, 12, 0.3);
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  font-style: italic;
  color: rgba(245, 230, 200, 0.8);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero__scroll-arrow {
  display: block;
  width: 18px;
  height: 18px;
  border-right: 1.5px solid rgba(245, 230, 200, 0.4);
  border-bottom: 1.5px solid rgba(245, 230, 200, 0.4);
  transform: rotate(45deg);
  animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 0.6; }
}

/* Responsive hero */
@media (min-width: 768px) {
  .hero__icon {
    width: 380px;
  }

  .hero__title {
    font-size: 2.25rem;
    letter-spacing: 0.15em;
  }

  .hero__subtitle {
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .hero__icon {
    width: 440px;
  }

  .hero__title {
    font-size: 2.75rem;
  }
}

/* Biography */
.biography {
  position: relative;
  z-index: 3;
  background: var(--cream);
  padding: var(--space-xl) var(--space-md);
}

.biography::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--cream));
  pointer-events: none;
}

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

.bio__heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.bio__text p {
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.85;
}

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

.bio__text--hidden {
  display: none;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-lg);
}

.lang-toggle__btn {
  appearance: none;
  border: 1px solid rgba(180, 140, 50, 0.3);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-toggle__btn:first-child {
  border-radius: 4px 0 0 4px;
}

.lang-toggle__btn:last-child {
  border-radius: 0 4px 4px 0;
  border-left: none;
}

.lang-toggle__btn--active {
  background: rgba(180, 140, 50, 0.15);
  color: var(--gold-link);
  border-color: rgba(180, 140, 50, 0.5);
}

.lang-toggle__btn:hover:not(.lang-toggle__btn--active) {
  background: rgba(180, 140, 50, 0.08);
  color: var(--gold-link);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--cream);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
}

.footer__cross {
  font-size: 1rem;
  opacity: 0.4;
}

.footer__year {
  opacity: 0.4;
}

/* Responsive biography */
@media (min-width: 768px) {
  .bio__heading {
    font-size: 2.125rem;
  }

  .bio__text p {
    font-size: 1.125rem;
  }
}

/* Acatist page */
.page-acatist {
  background: var(--cream);
}

.acatist-header {
  position: relative;
  background: #0E0A03;
  padding: calc(var(--space-xl) + 3rem) var(--space-md) var(--space-xl);
  text-align: center;
  overflow: hidden;
}

.acatist-header__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.acatist-header__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--cream);
  max-width: var(--content-width);
  margin: 0 auto;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6), 0 0 50px rgba(200, 150, 12, 0.3);
  position: relative;
  z-index: 1;
}

.acatist-body {
  position: relative;
  padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.acatist-body::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--cream));
  pointer-events: none;
  z-index: 1;
}

.acatist-body__container {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Prayer text styling */
.prayer-section {
  margin-bottom: var(--space-lg);
}

.prayer-heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
  text-align: center;
  letter-spacing: 0.06em;
}

.condac-heading,
.icos-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gold-link);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
}

.prayer-section p {
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  color: var(--text-dark);
  line-height: 1.85;
}

.prayer-instruction {
  color: var(--text-muted);
  font-style: italic;
}

.bucura-te {
  padding-left: var(--space-md);
  border-left: 2px solid var(--gold-mid);
  margin: var(--space-sm) 0 var(--space-md);
}

.bucura-te p {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

/* Prayer divider */
.prayer-divider {
  display: block;
  text-align: center;
  font-size: 1rem;
  color: var(--gold-mid);
  opacity: 0.5;
  margin: var(--space-lg) 0;
}

/* Tropar audio link */
.tropar-link {
  text-align: center;
  margin: var(--space-xl) 0 var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid rgba(180, 140, 50, 0.35);
  border-radius: 6px;
  background: rgba(180, 140, 50, 0.06);
  transition: all 0.3s ease;
}

.tropar-link:hover {
  border-color: rgba(200, 160, 60, 0.5);
  background: rgba(180, 140, 50, 0.1);
}

.tropar-link__anchor {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.tropar-link__icon {
  font-size: 0.75rem;
  color: var(--gold-link);
}

.tropar-link__anchor:hover {
  opacity: 1;
  color: var(--gold-link);
}

/* Responsive acatist */
@media (min-width: 768px) {
  .acatist-header__title {
    font-size: 2.25rem;
  }

  .prayer-section p {
    font-size: 1.125rem;
  }

  .prayer-heading {
    font-size: 1.75rem;
  }
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
