@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --maroon:   #6A1E1E;
  --maroon-d: #3d1010;
  --maroon-l: #f8eded;
  --gold:     #c9a84c;
  --gold-l:   #fdf6e3;
  --cream:    #fafaf8;
  --white:    #ffffff;
  --text:     #2d2d2d;
  --muted:    #7a7a7a;
  --border:   #e8e4e0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

/* ── BACK LINK ───────────────────────────────────────────────────── */
.back-link {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #fff;
  text-decoration: none;
  background: rgba(106, 30, 30, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .15);
  padding: .6rem 1.25rem;
  border-radius: 999px;
  transition: all .3s ease;
}

.back-link:hover {
  background: rgba(106, 30, 30, 1);
  border-color: rgba(255, 255, 255, .3);
  transform: translateY(-2px);
}

/* ── HERO ────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #fffdf8, var(--cream) 56%, #f6ede0);
  padding: 8rem 2rem 5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.hero::before {
  animation: mv-grid-drift 18s linear infinite;
  background-image: linear-gradient(rgba(106,30,30,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(106,30,30,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  content: '';
  inset: -54px;
  mask-image: radial-gradient(circle, #000 15%, transparent 70%);
  position: absolute;
}

.hero::after {
  animation: mv-glow-breathe 7s ease-in-out infinite;
  background: radial-gradient(circle, rgba(201,168,76,.2), transparent 68%);
  content: '';
  height: 24rem;
  left: 50%;
  position: absolute;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 44rem;
}

.hero > * {
  position: relative;
  z-index: 1;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  animation: fade-up .7s ease both;
}

.hero-eyebrow .line {
  width: 32px;
  height: 1px;
  background: var(--gold);
  animation: line-breathe 2.7s ease-in-out infinite;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  animation: fade-up .7s .1s ease both;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
  animation: fade-up .7s .2s ease both;
}

/* ── SHARED ──────────────────────────────────────────────────────── */
section { padding: 5rem 2rem; }

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.s-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

.s-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

/* ── PHILOSOPHY ──────────────────────────────────────────────────── */
.philosophy {
  background: var(--maroon);
  padding: 5rem 2rem;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.philosophy::before {
  animation: quote-glow 6s ease-in-out infinite;
  background: radial-gradient(circle, rgba(201,168,76,.16), transparent 67%);
  content: '';
  height: 23rem;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48rem;
}

.philosophy .container { max-width: 760px; position: relative; z-index: 1; }

.phil-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.phil-quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: rgba(255,255,255,.88);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.phil-source {
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .08em;
}

/* ── MISSION & VISION ────────────────────────────────────────────── */
.cards-section {
  background: var(--white);
  padding: 5rem 2rem;
}

.cards-header {
  margin-bottom: 3rem;
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mv-card {
  border-radius: 1rem;
  padding: 2.5rem;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}

.mv-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 14px 34px rgba(106,30,30,.14);
}

.mv-card::after {
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.25), transparent);
  content: '';
  height: 150%;
  left: -70%;
  position: absolute;
  top: -25%;
  transform: skewX(-18deg);
  transition: left .7s ease;
  width: 38%;
}

.mv-card:hover::after { left: 135%; }

.mv-card.mission {
  background: var(--maroon);
  border-color: transparent;
}

.mv-card.vision {
  background: var(--cream);
}

.mv-card .card-icon {
  width: 2.65rem;
  height: 2.65rem;
  color: var(--maroon);
  background: var(--maroon-l);
  border: 1.5px solid currentColor;
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  margin-bottom: 1.1rem;
  transition: transform .3s ease;
}

.mv-card:hover .card-icon { animation: mv-icon-pop .52s ease; }

.mv-card .card-icon::before {
  content: '';
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}

.mv-card.mission .card-icon {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3C/svg%3E");
}

.mv-card.vision .card-icon {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h4'/%3E%3Cpath d='M6 8v8'/%3E%3Cpath d='M18 8v8'/%3E%3Cpath d='M6 12h4'/%3E%3Cpath d='M14 12h4'/%3E%3Ccircle cx='8' cy='16' r='3'/%3E%3Ccircle cx='16' cy='16' r='3'/%3E%3C/svg%3E");
}

.mv-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.mv-card.mission h3 { color: var(--gold); }
.mv-card.vision  h3 { color: var(--maroon); }

.mv-card p {
  font-size: .85rem;
  line-height: 1.85;
}

.mv-card.mission p { color: rgba(255,255,255,.7); }
.mv-card.vision  p { color: var(--muted); }

/* ── CORE VALUES ─────────────────────────────────────────────────── */
.values-section {
  background: var(--cream);
  padding: 5rem 2rem;
}

.values-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.values-intro p {
  font-size: .88rem;
  line-height: 1.85;
  color: var(--muted);
  margin-top: 1rem;
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.value-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border-radius: .875rem;
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}

.value-row:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(106,30,30,.06);
  transform: translateX(7px);
}

.value-letter {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  min-width: 32px;
}

.value-name {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: .15rem;
}

.value-desc {
  font-size: .77rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── LIBRARY CARDS ───────────────────────────────────────────────── */
.lib-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.lib-card {
  border-radius: 1rem;
  padding: 2rem;
  transition: box-shadow .28s ease, transform .28s ease;
}

.lib-card:hover { box-shadow: 0 12px 28px rgba(106,30,30,.1); transform: translateY(-5px); }

.lib-card.light {
  background: var(--white);
  border: 1px solid var(--border);
}

.lib-card.dark {
  background: var(--maroon);
}

.lib-card-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

.lib-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: .85rem;
}

.lib-card.light h3 { color: var(--maroon); }
.lib-card.dark  h3 { color: #fff; }

.lib-card p {
  font-size: .84rem;
  line-height: 1.8;
}

.lib-card.light p { color: var(--muted); }
.lib-card.dark  p { color: rgba(255,255,255,.65); }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.page-footer {
  background: var(--maroon);
  padding: 2.5rem 2rem;
  text-align: center;
}

.page-footer p { font-size: .75rem; color: rgba(255,255,255,.45); }
.page-footer a { color: var(--gold); text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }

/* ── REVEAL ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@keyframes mv-grid-drift { to { transform: translate3d(54px, 54px, 0); } }
@keyframes mv-glow-breathe {
  0%, 100% { opacity: .7; transform: translate(-50%, -50%) scale(.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}
@keyframes line-breathe { 50% { opacity: .4; transform: scaleX(1.5); } }
@keyframes quote-glow {
  0%, 100% { opacity: .62; transform: translate(-50%, -50%) scale(.94); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}
@keyframes mv-icon-pop {
  45% { transform: translateY(-5px) rotate(-8deg) scale(1.12); }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .mv-grid       { grid-template-columns: 1fr; }
  .values-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .lib-cards     { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
