/* ============================================================
   JAEL — Dark theme (white monogram on near-black)
   Single source of truth. Page <style> must not re-set these.
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-elevated: #141416;
  --bg-soft: #1a1a1e;
  --border: #2a2a2e;
  --text: #f5f0e1;
  --text-muted: #c9b89a;
  --gold: #d4af37;
  --gold-soft: #c5a46e;
  --ruby: #9b1b30;
  --ruby-deep: #2a1218;
  --radius: 1.5rem;
  --pill: 9999px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html {
  background: var(--bg);
  color-scheme: dark;
}

body,
body.luxury-bg {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg) !important;
  color: var(--text) !important;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Typography — always light on dark canvas */
.serif,
.font-serif {
  font-family: var(--font-display);
  font-weight: 700;
}

body h1,
body h2,
body h3,
body h4,
body .font-serif,
body .serif {
  font-family: var(--font-display);
  color: var(--text) !important;
  font-weight: 700;
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

p, li, label, span, div {
  /* don't force all spans — only muted helpers */
}

.text-stone,
.muted-copy {
  color: var(--text-muted) !important;
}

.gold,
.gold-accent {
  color: var(--gold) !important;
}

.brand-wordmark {
  color: #ffffff !important;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---- Nav ---- */
.site-nav,
nav.sticky,
nav.border-b {
  border-bottom: 1px solid var(--border) !important;
  background: rgba(10, 10, 12, 0.95) !important;
  backdrop-filter: blur(12px);
  color: var(--text);
}

.nav-link {
  transition: color 0.2s ease;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted) !important;
}

.nav-link:hover,
.nav-link.active,
.nav-link.gold {
  color: var(--gold) !important;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  border-radius: var(--pill);
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--bg) !important;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg) !important;
}

/* Beat Tailwind [hidden] { display:none !important } so the open menu shows */
.mobile-nav.open,
.mobile-nav[data-open="1"] {
  display: block !important;
}

.mobile-nav[hidden]:not(.open):not([data-open="1"]) {
  display: none !important;
}

.mobile-nav a {
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

.mobile-nav a:hover {
  color: var(--gold) !important;
}

/* Hamburger must stay clickable above hero layers */
[data-mobile-nav-toggle] {
  position: relative;
  z-index: 60;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1024px) {
  .mobile-nav,
  .mobile-nav.open,
  .mobile-nav[data-open="1"] {
    display: none !important;
  }
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: var(--gold) !important;
  color: var(--bg) !important;
  border-radius: var(--pill);
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
  text-align: center;
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: var(--bg) !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: transparent !important;
  color: var(--gold) !important;
  border: 1px solid var(--gold) !important;
  border-radius: var(--pill);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--gold) !important;
  color: var(--bg) !important;
}

.btn-ruby {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: var(--ruby) !important;
  color: #fff !important;
  border-radius: var(--pill);
  font-weight: 500;
}

.link-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold) !important;
}

.link-cta:hover {
  text-decoration: underline;
}

/* ---- Surfaces ---- */
.card,
.world-card,
.rosary-card {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.world-card:hover,
.rosary-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.rosary-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
  overflow: hidden;
}

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

.rosary-photo .photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gold);
  text-align: center;
  padding: 1.5rem;
  pointer-events: none;
}

.rosary-photo.has-photo .photo-placeholder {
  display: none;
}

.panel-dark {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.panel-dark .accent {
  color: var(--gold) !important;
}

.panel-dark .muted {
  color: var(--text-muted) !important;
}

.panel-ruby-mist {
  background: var(--ruby-deep) !important;
  border: 1px solid #4a1f28;
  border-radius: var(--radius);
  color: var(--text-muted);
}

.input-field,
input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border) !important;
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--gold) !important;
}

.materials-line {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold) !important;
}

.site-footer {
  border-top: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  background: var(--bg) !important;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--gold) !important;
}

.collection-tab {
  transition: all 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.collection-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.collection-tab[aria-selected="true"] {
  background: var(--gold) !important;
  color: var(--bg) !important;
  border-color: var(--gold) !important;
}

.collection-panel {
  scroll-margin-top: 7rem;
}

.elegant-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* ---- Hero: large transparent monogram on dark field (home + every section) ---- */
.hero-stage {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

/* Section pages share the same full-size stage language */
.hero-stage--page {
  min-height: min(72vh, 680px);
}

.hero-logo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Full-size monogram — viewport-based so it stays large without locking hero height */
.hero-logo-img {
  position: absolute;
  left: 2%;
  right: auto;
  top: 50%;
  bottom: auto;
  height: min(68vh, 560px);
  width: auto;
  max-width: min(58vw, 420px);
  object-fit: contain;
  object-position: left center;
  opacity: 0.28;
  filter: drop-shadow(0 0 48px rgba(255, 255, 255, 0.06));
  user-select: none;
  transform: translateY(-50%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .hero-logo-img {
    left: 3%;
    height: min(72vh, 620px);
    max-width: min(48vw, 520px);
    opacity: 0.3;
  }
}

@media (min-width: 1024px) {
  .hero-logo-img {
    left: 4%;
    height: min(74vh, 680px);
    max-width: min(42vw, 600px);
    opacity: 0.32;
  }
}

/* Hero headline — open tracking (letter-spacing), lighter weight */
body h1.hero-title,
.hero-title {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.08;
}

@media (min-width: 768px) {
  body h1.hero-title,
  .hero-title {
    letter-spacing: 0.1em !important;
  }
}

/* Tighter tracking on the second line only */
body h1.hero-title .hero-title-beautifully,
.hero-title-beautifully {
  letter-spacing: 0.02em !important;
  font-weight: inherit;
}

@media (min-width: 768px) {
  body h1.hero-title .hero-title-beautifully,
  .hero-title-beautifully {
    letter-spacing: 0.03em !important;
  }
}

/* Exquisite provenance line under hero monogram */
.hero-provenance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 100%;
}

.hero-provenance-line {
  display: block;
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--gold),
    transparent
  );
  opacity: 0.85;
  flex-shrink: 0;
}

.hero-provenance-line:first-child {
  background: linear-gradient(to right, transparent, var(--gold));
}

.hero-provenance-line:last-child {
  background: linear-gradient(to left, transparent, var(--gold));
}

.hero-provenance-text {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .hero-provenance {
    gap: 1.25rem;
  }

  .hero-provenance-line {
    width: 3.5rem;
  }

  .hero-provenance-text {
    font-size: 0.75rem;
    letter-spacing: 0.42em;
  }
}

/* ---- Tailwind utility overrides (light leftovers → dark) ---- */
body .text-\[\#3A2F1F\],
body .text-\[\#3a2f1f\] {
  color: var(--text) !important;
}

body .text-\[\#6B5B4F\],
body .text-\[\#6b5b4f\] {
  color: var(--text-muted) !important;
}

body .text-\[\#C5A46E\],
body .text-\[\#c5a46e\] {
  color: var(--gold) !important;
}

body .border-\[\#EDE4D0\],
body .border-\[\#ede4d0\] {
  border-color: var(--border) !important;
}

body .border-\[\#C5A46E\],
body .border-\[\#c5a46e\] {
  border-color: var(--gold) !important;
}

body .bg-white,
body .bg-white\/95 {
  background-color: var(--bg-elevated) !important;
}

body .bg-\[\#F8F5F0\],
body .bg-\[\#f8f5f0\],
body .bg-\[\#F8F5F0\]\/50 {
  background-color: var(--bg) !important;
}

body .bg-\[\#EDE4D0\],
body .bg-\[\#ede4d0\] {
  background-color: var(--bg-soft) !important;
}

body .bg-\[\#3A2F1F\],
body .bg-\[\#3a2f1f\] {
  background-color: var(--gold) !important;
  color: var(--bg) !important;
}

body .hover\:bg-\[\#2a2218\]:hover,
body .hover\:bg-black:hover {
  background-color: #e4c04a !important;
  color: var(--bg) !important;
}

body .hover\:bg-\[\#C5A46E\]:hover,
body .hover\:bg-\[\#c5a46e\]:hover {
  background-color: var(--gold) !important;
  color: var(--bg) !important;
}

body .hover\:text-white:hover {
  color: var(--bg) !important;
}

body .hover\:text-\[\#3A2F1F\]:hover {
  color: var(--gold) !important;
}

body .hover\:border-\[\#C5A46E\]:hover {
  border-color: var(--gold) !important;
}

/* Forms success / soft fills that were parchment */
body .bg-\[\#EDE4D0\].rounded-2xl,
body #success-message,
body #partner-success {
  background-color: var(--bg-soft) !important;
  color: var(--text) !important;
}

/* ============================================================
   Site-wide background music player
   Muted until visitor presses play. Injected by site.js.
   ============================================================ */
.site-bgm {
  position: fixed;
  z-index: 90;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.55rem 0.75rem 0.55rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(10, 10, 12, 0.92);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-body);
}

.site-bgm__btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: none;
  background: var(--gold);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.site-bgm__btn:hover {
  background: #e4c04a;
  transform: scale(1.04);
}

.site-bgm__btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.site-bgm__meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.2;
}

.site-bgm__eyebrow {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.site-bgm__title {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.site-bgm.is-playing .site-bgm__title {
  color: var(--text);
}

.site-bgm__controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.site-bgm__icon-btn {
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.site-bgm__icon-btn:hover {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
}

.site-bgm__vol {
  display: none;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-left: 0.15rem;
}

.site-bgm__vol input[type="range"] {
  width: 4rem;
  accent-color: var(--gold);
  cursor: pointer;
}

.site-bgm.needs-gesture {
  animation: site-bgm-pulse 1.6s ease-in-out infinite;
}

@keyframes site-bgm-pulse {
  0%,
  100% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
  50% {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 175, 55, 0.55);
  }
}

@media (min-width: 640px) {
  .site-bgm__vol {
    display: inline-flex;
  }

  .site-bgm__title {
    max-width: 11rem;
  }
}

@media (max-width: 420px) {
  .site-bgm__controls .site-bgm__icon-btn {
    display: none;
  }

  .site-bgm__title {
    max-width: 6.5rem;
  }
}
