/* ═══════════════════════════════════════════════
   YIM — Shared Stylesheet
   Covers: reset, variables, nav, page-header,
   footer, buttons, search, animations, mobile nav
   ═══════════════════════════════════════════════ */

/* ── PAGE TRANSITION ── */
@keyframes pageGoldFade {
  0%   { opacity: 0.75; }
  100% { opacity: 0; }
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: radial-gradient(ellipse 160% 160% at 50% 50%, #F4C77B 0%, #D98F4E 30%, #A6792B 55%, #2a1a08 80%, #0d0a09 100%);
  animation: pageGoldFade 1.3s ease forwards;
}
body.bfcache-reset::before { animation-name: none; }

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

/* ── VARIABLES ── */
:root {
  --navy:    #0d0a09;
  --navy-mid:#1e1710;
  --gold:    #A6792B;
  --gold-l:  #F4C77B;
  --warm:    #161210;
  --ink:     #EDE3D3;
  --ink-s:   #c9bba8;
  --ink-mu:  #9a8470;
  --rule:    rgba(166,121,43,0.28);
  --amber:   #D98F4E;
  --cream:   #EDE3D3;
}

/* ── BASE ── */
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'Jost', sans-serif; background: var(--warm); color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ── NAV ── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 22px 48px; background: rgba(13,10,9,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(166,121,43,0.2); }
.nav-brand { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.15rem; color: var(--cream); letter-spacing: 0.04em; text-decoration: none; }
.nav-brand span { color: var(--gold-l); font-style: italic; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a { font-size: 0.7rem; font-weight: 300; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(237,227,211,0.63); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-l); }
.nav-links a.nav-highlight { border: 1px solid rgba(166,121,43,0.55); padding: 7px 16px; box-shadow: 0 0 12px rgba(166,121,43,0.15); transition: color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.nav-links a.nav-highlight:hover, .nav-links a.nav-highlight.active { border-color: var(--gold-l); box-shadow: 0 0 16px rgba(166,121,43,0.3); }

/* ── HAMBURGER NAV ── */
.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: 18px; flex-shrink: 0; }
.nav-hamburger span { display: block; width: 22px; height: 1px; background: var(--gold); transition: transform 0.3s, opacity 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── PAGE HEADER ── */
/* Each page sets --page-bg in its own <style> block */
.page-header { background: var(--navy); padding: 140px 40px 90px; text-align: center; position: relative; overflow: hidden; background-image: var(--page-bg, none); background-size: cover; background-position: center; background-repeat: no-repeat; }
.page-header::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(to bottom, rgba(13,10,9,0.72) 0%, rgba(13,10,9,0.55) 50%, rgba(13,10,9,0.82) 100%); }
.page-header::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(166,121,43,0.08) 0%, transparent 60%); }
.page-header-ornament { width: 1px; height: 60px; background: linear-gradient(to bottom, transparent, var(--gold), transparent); margin: 0 auto 32px; }
.page-header-eyebrow { font-size: 0.65rem; font-weight: 300; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold-l); margin-bottom: 18px; }
.page-header-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(2.6rem, 5vw, 4.2rem); color: var(--cream); line-height: 1.1; margin-bottom: 18px; letter-spacing: 0.02em; }
.page-header-title em { font-style: italic; color: var(--gold-l); }
.page-header-sub { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.1rem; color: rgba(237,227,211,0.65); letter-spacing: 0.04em; max-width: 500px; margin: 0 auto; }
.page-header-ornament, .page-header-eyebrow, .page-header-title, .page-header-sub, .page-scroll { position: relative; z-index: 2; }

/* ── PAGE SCROLL INDICATOR ── */
.page-scroll { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 40px; animation: fadeIn 1s 1.5s ease both; opacity: 0; }
.page-scroll span { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(237,227,211,0.57); }
.page-scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--gold-l), transparent); animation: scrollDrop 1.8s 1.5s ease infinite; }

/* ── SHARED UTILITIES ── */
.section-eyebrow { font-size: 0.63rem; font-weight: 300; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 20px; }
.gem-rule { display: flex; align-items: center; gap: 20px; max-width: 380px; margin: 60px auto; }
.gem-rule::before, .gem-rule::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.gem { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; opacity: 0.7; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── BUTTONS ── */
.btn { display: inline-block; font-size: 0.68rem; font-weight: 300; letter-spacing: 0.28em; text-transform: uppercase; padding: 14px 36px; text-decoration: none; transition: all 0.25s; }
.btn-outline { color: var(--gold-l); border: 1px solid rgba(166,121,43,0.5); }
.btn-outline:hover { background: rgba(166,121,43,0.1); border-color: var(--gold-l); color: var(--cream); }
.btn-fill { color: var(--navy); background: var(--gold-l); border: 1px solid var(--gold-l); }
.btn-fill:hover { background: var(--gold); border-color: var(--gold); }

/* ── SOCIAL ICONS ── */
.footer-social { display: flex; align-items: center; gap: 22px; }
.social-link { color: var(--gold); opacity: 0.85; transition: color 0.25s, opacity 0.25s, transform 0.25s; display: flex; align-items: center; text-decoration: none; }
.social-link:hover { color: var(--gold-l); opacity: 1; transform: translateY(-2px); }
.social-link svg { display: block; }
nav .social-link { opacity: 1; }

/* ── FOOTER ── */
.footer-contact { display: flex; align-items: center; gap: 28px; }
.footer-contact-item { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--gold); opacity: 1; transition: color 0.25s, opacity 0.25s; }
.footer-contact-item:link, .footer-contact-item:visited { color: var(--gold); }
.footer-contact-item:hover { color: var(--gold-l); opacity: 1; }
.footer-contact-item svg { display: block; flex-shrink: 0; }
.footer-contact-label { font-size: 0.62rem; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; }
footer { background: var(--navy); padding: 48px 48px 36px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-top: 1px solid rgba(166,121,43,0.15); }
.footer-brand { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: 1.05rem; color: rgba(237,227,211,0.6); }
.footer-brand em { font-style: italic; color: var(--gold-l); }
.footer-note { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(237,227,211,0.42); font-weight: 300; }

/* ── SEARCH ── */
.search-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(13,10,9,0.94); backdrop-filter: blur(18px); display: flex; align-items: flex-start; justify-content: center; padding-top: 130px; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-box { width: 100%; max-width: 660px; padding: 0 24px; }
.search-input-wrap { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid rgba(166,121,43,0.6); padding-bottom: 18px; margin-bottom: 4px; }
.search-input-wrap svg { color: var(--gold); flex-shrink: 0; }
.search-input { flex: 1; background: none; border: none; outline: none; font-family: 'Cormorant Garamond', serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 300; color: var(--cream); caret-color: var(--gold-l); }
.search-input::placeholder { color: rgba(237,227,211,0.22); }
.search-close { background: none; border: none; color: var(--ink-mu); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; line-height: 1; transition: color 0.2s; }
.search-close:hover { color: var(--gold-l); }
.search-results { list-style: none; max-height: 52vh; overflow-y: auto; }
.search-result-item { display: block; padding: 16px 14px; border-bottom: 1px solid rgba(166,121,43,0.12); text-decoration: none; transition: background 0.15s; }
.search-result-item:hover { background: rgba(166,121,43,0.07); }
.search-result-page { font-size: 0.58rem; font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; display: block; }
.search-result-title { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 400; color: var(--cream); display: block; margin-bottom: 3px; }
.search-result-desc { font-size: 0.8rem; font-weight: 300; color: var(--ink-mu); display: block; line-height: 1.5; }
.search-hint { font-size: 0.62rem; font-weight: 300; letter-spacing: 0.18em; color: rgba(237,227,211,0.18); text-align: center; margin-top: 28px; }
.search-hint kbd { font-family: 'Jost', sans-serif; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; padding: 1px 6px; font-size: 0.7em; }
.search-no-results { padding: 28px 14px; font-size: 0.88rem; color: var(--ink-mu); font-style: italic; font-family: 'Cormorant Garamond', serif; }

/* ── ANIMATIONS ── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollDrop { 0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); transform-origin: top; } }

/* ── MOBILE NAV ── */
@media (max-width: 768px) {
  nav { padding: 18px 24px; }
  .nav-hamburger { display: flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(13,10,9,0.97); flex-direction: column; gap: 0; padding: 8px 0; border-bottom: 1px solid rgba(166,121,43,0.2); }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(166,121,43,0.08); }
  .nav-links a { display: block; padding: 14px 24px; font-size: 0.75rem; letter-spacing: 0.2em; }
  footer { flex-direction: column; text-align: center; padding: 40px 24px 28px; }
  img { max-width: 100%; height: auto; }
}

/* ── ACCESSIBILITY ── */
:focus-visible {
  outline: 2px solid var(--gold-l);
  outline-offset: 3px;
}
.search-input:focus-visible { outline: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--gold-l);
  color: var(--navy);
  padding: 10px 20px;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.1s;
}
.skip-link:focus { top: 16px; }
