﻿/* ============================================================
   SCHOLA CANTORUM — main.css
   Core design tokens, typography, layout, liturgical styling
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colors: Sacred palette of warm golds, parchment & deep charcoal */
  --bg-deep:       #080604;
  --bg-dark:       #0f0c08;
  --bg-mid:        #15110c;
  --bg-surface:    rgba(201, 168, 76, 0.04);
  --bg-hover:      rgba(201, 168, 76, 0.08);

  --gold:          #C9A84C;
  --gold-light:    #E5C578;
  --gold-bright:   #F3DB9E;
  --gold-dim:      #7A6530;
  --gold-border:   rgba(201, 168, 76, 0.22);
  --gold-border-subtle: rgba(201, 168, 76, 0.10);
  --gold-glow:     rgba(201, 168, 76, 0.16);

  --parchment:     #F5ECD7;
  --parchment-dim: #C8B990;
  --text-primary:  #E4D7C0;
  --text-secondary:#AA9A78;
  --text-dim:      #695B42;

  /* Typography */
  --font-title:    'Cinzel', Georgia, 'Times New Roman', serif;
  --font-deco:     'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-body:     'EB Garamond', Georgia, 'Times New Roman', serif;

  --text-xs:    0.8rem;
  --text-sm:    0.925rem;
  --text-base:  1.125rem;
  --text-lg:    1.25rem;
  --text-xl:    1.5rem;
  --text-2xl:   2.1rem;
  --text-3xl:   2.85rem;
  --text-hero:  clamp(3.5rem, 9.5vw, 6.8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  180ms;
  --dur-med:   350ms;
  --dur-slow:  700ms;
  --dur-enter: 1100ms;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: background var(--dur-med) ease,
              backdrop-filter var(--dur-med) ease,
              padding var(--dur-med) ease,
              border-color var(--dur-med) ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 6, 4, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gold-border-subtle);
}

.nav__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-deco);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  transition: color var(--dur-fast) ease, text-shadow var(--dur-fast) ease;
}
.nav__logo:hover {
  color: var(--gold-light);
  text-shadow: 0 0 15px var(--gold-glow);
}

.nav__links {
  display: flex;
  gap: var(--space-8);
}

.nav__link {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--dur-fast) ease;
  position: relative;
  padding-bottom: 4px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--dur-med) var(--ease-out);
  transform-origin: center;
}

.nav__link:hover { color: var(--gold-light); }
.nav__link:hover::after { transform: scaleX(1); }

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  transition: transform var(--dur-med) ease, opacity var(--dur-fast) ease;
  transform-origin: center;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg-deep);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__glow--top {
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(201, 168, 76, 0.16) 0%,
    rgba(201, 168, 76, 0.05) 50%,
    transparent 75%);
}

.hero__glow--bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 35%;
  background: radial-gradient(ellipse at 50% 100%,
    rgba(107, 26, 42, 0.12) 0%,
    transparent 70%);
}

.hero__rays {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__rays::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 50%;
  width: 320%;
  height: 320%;
  transform: translateX(-50%);
  background: repeating-conic-gradient(
    from -5deg at 50% 0%,
    rgba(201, 168, 76, 0.038) 0deg 2.5deg,
    transparent 2.5deg 7.5deg
  );
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 110% 100% at 50% 50%,
    transparent 25%,
    rgba(8, 6, 4, 0.55) 75%,
    rgba(8, 6, 4, 0.90) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-8);
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--dur-enter) var(--ease-out) 0.3s,
    transform var(--dur-enter) var(--ease-out) 0.3s;
}

body.loaded .hero__content {
  opacity: 1;
  transform: translateY(0);
}

.hero__overline {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.hero__ornament {
  color: var(--gold);
  font-size: 0.75rem;
  opacity: 0.85;
}

.hero__title {
  font-family: var(--font-deco);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.05;
  color: var(--gold);
  margin-bottom: var(--space-8);
  letter-spacing: 0.04em;
  text-shadow:
    0 0 60px rgba(201, 168, 76, 0.35),
    0 0 120px rgba(201, 168, 76, 0.12);
}

.hero__title-line { display: block; }

.hero__title-line--accent {
  color: var(--parchment);
  font-size: 0.62em;
  letter-spacing: 0.28em;
  display: block;
  margin-top: 0.1em;
}

.hero__verse {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--text-primary);
  max-width: 540px;
  margin: 0 auto var(--space-3);
  line-height: 1.6;
}

.hero__verse-ref {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: var(--space-12);
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  background: rgba(201, 168, 76, 0.04);
  padding: var(--space-4) var(--space-8);
  transition: all var(--dur-med) ease;
}

.hero__btn:hover {
  color: var(--bg-deep);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 35px rgba(201, 168, 76, 0.4);
}

.hero__btn-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  transition: transform var(--dur-med) var(--ease-out);
}
.hero__btn:hover .hero__btn-icon { transform: translateX(5px); }

.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  transition: opacity var(--dur-slow) ease 1.8s;
}
body.loaded .hero__scroll { opacity: 0.45; }

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6) translateY(-4px); }
  50%       { opacity: 1;   transform: scaleY(1)   translateY(6px);  }
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
  padding: var(--space-24) 0;
  position: relative;
}

.section--dark { background-color: var(--bg-dark); }
.section--mid  { background-color: var(--bg-mid);  }

.section__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.section__label {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-title);
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--parchment);
  margin-bottom: var(--space-4);
  line-height: 1.25;
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-style: italic;
  max-width: 64ch;
  margin-bottom: var(--space-12);
}

/* ── About / El Coro ──────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-16);
  align-items: start;
  margin-bottom: var(--space-12);
}

.about__lead {
  font-size: 1.25rem;
  color: var(--parchment);
  line-height: 1.85;
  margin-bottom: var(--space-8);
  font-weight: 400;
}

.about__pillar {
  margin-bottom: var(--space-8);
  padding-left: var(--space-6);
  border-left: 2px solid var(--gold-border-subtle);
  transition: border-color var(--dur-med) ease;
}

.about__pillar:hover {
  border-left-color: var(--gold);
}

.about__pillar-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.about__pillar p {
  color: var(--text-primary);
  font-size: 1.05rem;
}

.about__side {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.about__quote {
  padding: var(--space-8);
  background: rgba(201, 168, 76, 0.03);
  border: 1px solid var(--gold-border-subtle);
  border-left: 3px solid var(--gold);
}

.about__quote blockquote p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-light);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.about__quote cite {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  font-style: normal;
  display: block;
}

.about__experience-card {
  padding: var(--space-8);
  background: rgba(245, 236, 215, 0.02);
  border: 1px solid var(--gold-border-subtle);
}

.about__experience-card h4 {
  font-family: var(--font-title);
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

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

/* ── Ornament Divider ─────────────────────────────────────── */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-16);
}

.ornament-divider span {
  color: var(--gold-dim);
  font-size: 0.75rem;
  opacity: 0.6;
}
.ornament-divider span:nth-child(2) {
  opacity: 1;
  font-size: 1rem;
  color: var(--gold);
}

/* ── Contact ──────────────────────────────────────────────── */
.contact__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact__text {
  font-size: 1.2rem;
  color: var(--text-primary);
  max-width: 62ch;
  line-height: 1.85;
}

.contact__card {
  padding: var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--gold-border);
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 420px;
}

.contact__card-label {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.contact__email {
  font-family: var(--font-title);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  transition: color var(--dur-fast) ease;
}
.contact__email:hover { color: var(--gold-light); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background-color: var(--bg-deep);
  border-top: 1px solid var(--gold-border-subtle);
  padding: var(--space-16) var(--space-8);
  text-align: center;
}

.footer__name {
  font-family: var(--font-deco);
  font-size: 1.15rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: var(--space-2);
}

.footer__motto {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.footer__copy {
  font-family: var(--font-title);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  .hero__title { font-size: clamp(3rem, 15vw, 5rem); }
  .section__title { font-size: var(--text-2xl); }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(8, 6, 4, 0.98);
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-8);
    border-bottom: 1px solid var(--gold-border);
  }
  .nav__links.open { display: flex; }
  .nav__toggle { display: flex; }
}
