/* ============================================
   MIR SANCTUARY — Design System v2
   Exact brand guide application
   mirsanctuary.com · EST. MMXXV
   ============================================ */

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

/* ─── Tokens — exact brand guide ─── */
:root {
  /* Colour palette — brand guide v2 */
  --parchment:      #F5F0E8;   /* Primary background — dominant */
  --parchment-mid:  #EDE8DE;   /* Slightly deeper parchment for section contrast */
  --parchment-deep: #E8E2D6;   /* Hover states, subtle panel contrast */
  --gold:           #C9A96E;   /* Sacred Gold — primary accent / divine */
  --old-gold:       #8B6914;   /* Old Gold — secondary text / warmth */
  --gold-muted:     #B8956A;   /* Gold at reduced weight for rules/lines */
  --ember:          #2C1810;   /* Ember — display text / grounding ONLY */
  --third-eye:      #4A90C4;   /* Third Eye — intuition, use sparingly */
  --obsidian:       #0A0A0A;   /* Obsidian — accent only, never dominant */

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 11rem;

  /* Layout */
  --max-w:      1180px;
  --max-w-text: 700px;

  --transition: 0.4s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--parchment);
  color: var(--old-gold);           /* Body default: Old Gold, not Ember */
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ─── Typography — brand guide application ─── */

/* Display / Headline: Cormorant Garamond Light Italic, Ember */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  color: var(--ember);              /* Ember for all display — correct per brand guide */
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.9rem); }

/* Subheading: Cormorant Garamond Regular */
h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--ember);
  line-height: 1.3;
}

/* Body: Jost Light, Old Gold */
p {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--old-gold);
  max-width: 62ch;
  line-height: 1.85;
}

p + p { margin-top: 1em; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--ember); }

/* Label / Caption: Jost Regular Caps — per brand guide */
.label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
}

.label--ember  { color: var(--ember); opacity: 0.5; }
.label--parchment { color: var(--parchment); opacity: 0.5; }
.label--gold   { color: var(--gold); }

/* ─── Gold Rule ─── */
.gold-rule {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem 0;
  opacity: 0.6;
}
.gold-rule--center { margin-left: auto; margin-right: auto; }
.gold-rule--full   { width: 100%; }
.gold-rule--sm     { width: 20px; margin: 0.75rem 0; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--text {
  max-width: var(--max-w-text);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section      { padding: var(--space-xl) 0; }
.section--sm  { padding: var(--space-lg) 0; }
.section--dark { background: var(--obsidian); }
.section--parchment-mid  { background: var(--parchment-mid); }
.section--ember { background: var(--ember); }

/* ─── Navigation ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.75rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition), padding var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(12px);
  padding: 1.1rem var(--space-md);
  border-bottom: 1px solid rgba(201, 169, 110, 0.18);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 34px;
  width: auto;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--ember);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

/* Nav: Jost Regular Caps — per brand guide */
.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--old-gold);
  opacity: 0.65;
  transition: opacity var(--transition), color var(--transition);
  text-decoration: none;
}

.nav-links a:hover    { opacity: 1; color: var(--ember); }
.nav-links a.active   { opacity: 1; color: var(--old-gold); }

.nav-book {
  color: var(--parchment) !important;
  background: var(--ember);
  padding: 0.6rem 1.5rem;
  opacity: 1 !important;
  letter-spacing: 0.2em;
  transition: background var(--transition);
}
.nav-book:hover { background: var(--old-gold); color: var(--parchment) !important; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ember);
  transition: var(--transition);
}

/* ─── Buttons — Jost Regular Caps ─── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--ember);
  color: var(--parchment);
}
.btn-primary:hover { background: var(--old-gold); color: var(--parchment); }

.btn-outline {
  background: transparent;
  color: var(--ember);
  border: 1px solid rgba(44, 24, 16, 0.3);
}
.btn-outline:hover {
  background: var(--ember);
  color: var(--parchment);
  border-color: var(--ember);
}

.btn-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 169, 110, 0.5);
}
.btn-gold:hover { background: var(--gold); color: var(--parchment); }

.btn-light {
  background: transparent;
  color: rgba(245, 240, 232, 0.7);
  border: 1px solid rgba(245, 240, 232, 0.2);
}
.btn-light:hover { background: rgba(245, 240, 232, 0.07); }

/* ─── Sacred divider ─── */
.sacred-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}
.sacred-divider::before,
.sacred-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,169,110,0.4), transparent);
}
.sacred-divider span {
  color: var(--gold);
  font-size: 0.5rem;
  opacity: 0.6;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--obsidian);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold);
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 300;
}

.footer-tagline {
  font-size: 0.75rem;
  color: rgba(245, 240, 232, 0.3);
  letter-spacing: 0.1em;
  margin: 0;
  max-width: none;
}

.footer-col h5 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  font-style: normal;
  opacity: 0.7;
}

.footer-col ul          { list-style: none; }
.footer-col ul li       { margin-bottom: 0.65rem; }
.footer-col ul a {
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.4);
  transition: color var(--transition);
  letter-spacing: 0.02em;
  font-weight: 300;
}
.footer-col ul a:hover  { color: rgba(245, 240, 232, 0.75); }

.footer-bottom {
  border-top: 1px solid rgba(201, 169, 110, 0.1);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.22);
  letter-spacing: 0.12em;
  max-width: none;
  margin: 0;
}

/* ─── Emblem ─── */
.emblem {
  display: block;
}
.emblem--hero   { width: clamp(160px, 20vw, 260px); height: auto; }
.emblem--section { width: 72px; height: auto; }
.emblem--small  { width: 44px; height: auto; }
.emblem--nav    { height: 34px; width: auto; }

/* Footer emblem inverted for dark background */
.emblem--footer {
  filter: brightness(0) invert(1);
  opacity: 0.5;
}

/* ─── Forms ─── */
.form-field { margin-bottom: 2rem; }

.form-field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 0.65rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(139, 105, 20, 0.25);
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--ember);
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
  -webkit-appearance: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--gold);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(139, 105, 20, 0.3);
  font-style: italic;
}

.form-field textarea {
  resize: none;
  min-height: 110px;
}

/* ─── Offering tiles ─── */
.offering-card {
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid rgba(201, 169, 110, 0.2);
  transition: border-color var(--transition);
}
.offering-card:hover { border-top-color: var(--gold); }
.offering-card h3   { margin-bottom: var(--space-xs); }

/* ─── Scroll animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes subtlePulse {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 1; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.fade-up            { opacity: 0; animation: fadeUp 1s ease forwards; }
.fade-up-delay-1    { animation-delay: 0.2s; }
.fade-up-delay-2    { animation-delay: 0.4s; }
.fade-up-delay-3    { animation-delay: 0.6s; }
.fade-up-delay-4    { animation-delay: 0.8s; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Page hero offset for fixed nav */
.page-hero-offset { padding-top: 110px; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
}

@media (max-width: 700px) {
  :root { --space-xl: 4rem; --space-2xl: 6rem; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--parchment);
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    z-index: 99;
  }
  .nav-links.open a { font-size: 0.9rem; opacity: 1; }
  .nav-toggle { display: flex; }

  .footer-grid     { grid-template-columns: 1fr; }
  .footer-bottom   { flex-direction: column; gap: var(--space-sm); text-align: center; }
}
