/* ============================================================
   QURBANA et SELAH — shared design system
   An Offering, Made in Stillness.
   ============================================================ */

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

:root {
  /* palette */
  --gold:       #C9A84C;
  --gold-soft:  #d8bd6e;
  --champagne:  #E8D5B0;
  --rose:       #C4956A;
  --linen:      #F5F0E8;
  --linen-2:    #EFE7D8;
  --dark:       #1A1510;
  --dark-2:     #221c15;
  --sage:       #6B7F5E;
  --charcoal:   #2C2C2A;

  /* semantic */
  --ink:        #2C2C2A;
  --ink-soft:   #5c554b;
  --on-dark:    #EFE7D8;
  --on-dark-soft: #b5a890;
  --hairline:   rgba(44,44,42,0.16);
  --hairline-d: rgba(232,213,176,0.16);

  /* type */
  --display: 'Cinzel', 'Times New Roman', serif;
  --body:    'Cormorant Garamond', 'Georgia', serif;

  /* rhythm */
  --shell: clamp(1.25rem, 5vw, 7rem);
  --section-y: clamp(5rem, 12vw, 11rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--linen);
  color: var(--ink);
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.62;
  font-weight: 400;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--dark); }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ---------- type primitives ---------- */
.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow.center::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow.center { justify-content: center; }

h1, h2, h3 { font-weight: 400; margin: 0; }

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.01em;
}

.lede {
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  line-height: 1.32;
  letter-spacing: 0.005em;
}

.serif-it { font-style: italic; font-weight: 400; }

.creed {
  font-family: var(--body);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ---------- layout ---------- */
.shell { padding-inline: var(--shell); }
.section { padding-block: var(--section-y); }
.dark { background: var(--dark); color: var(--on-dark); }
.dark .eyebrow { color: var(--gold); }
.linen { background: var(--linen); color: var(--ink); }
.maxw { max-width: 1500px; margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 1.15em 2.4em;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  transition: background 0.6s var(--ease), color 0.6s var(--ease), letter-spacing 0.6s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover { letter-spacing: 0.36em; }
.btn-gold {
  border-color: var(--gold);
  color: var(--dark);
  background: var(--gold);
}
.btn-gold:hover { background: var(--gold-soft); }
.dark .btn-line { color: var(--on-dark); }
.btn-line:hover { background: var(--ink); color: var(--linen); }
.dark .btn-line:hover { background: var(--gold); color: var(--dark); border-color: var(--gold); }

.link-quiet {
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--hairline);
  transition: gap 0.5s var(--ease), border-color 0.5s var(--ease);
}
.dark .link-quiet { border-color: var(--hairline-d); }
.link-quiet:hover { gap: 1.2em; border-color: var(--gold); color: var(--gold); }
.link-quiet .arr { transition: transform 0.5s var(--ease); }
.link-quiet:hover .arr { transform: translateX(0.25em); }

/* ---------- imagery: warm light "photography" (swap real photos later) ----------
   Layered radial light + linen-fold gradients that read as golden-hour
   photography, with a slow living drift like sunlight moving over cloth. */
.ph {
  position: relative;
  overflow: hidden;
  background-color: #e9dcc4;
  background-image:
    radial-gradient(60% 75% at 22% 18%, rgba(255,250,238,0.95) 0%, rgba(255,247,230,0) 55%),
    radial-gradient(55% 60% at 82% 30%, rgba(232,213,176,0.85) 0%, rgba(232,213,176,0) 60%),
    radial-gradient(80% 90% at 70% 95%, rgba(196,149,106,0.55) 0%, rgba(196,149,106,0) 55%),
    radial-gradient(50% 70% at 12% 88%, rgba(201,168,76,0.35) 0%, rgba(201,168,76,0) 60%),
    linear-gradient(150deg, #f3e9d6 0%, #e7d6ba 45%, #d9c19c 100%);
  background-size: 160% 160%, 150% 150%, 170% 170%, 150% 150%, 100% 100%;
  background-position: 20% 20%, 80% 30%, 70% 90%, 10% 85%, 0 0;
}
.ph::before {
  content: "";
  position: absolute; inset: -2%;
  background-image:
    radial-gradient(58% 72% at 24% 20%, rgba(255,252,244,0.9) 0%, rgba(255,252,244,0) 55%),
    radial-gradient(70% 84% at 72% 92%, rgba(196,149,106,0.5) 0%, rgba(196,149,106,0) 55%);
  background-repeat: no-repeat;
  animation: ph-drift 18s ease-in-out infinite alternate;
  mix-blend-mode: soft-light;
}
@keyframes ph-drift {
  0%   { transform: translate3d(-1.5%, -1%, 0) scale(1.04); opacity: 0.85; }
  100% { transform: translate3d(2%, 1.5%, 0) scale(1.08); opacity: 1; }
}
/* warm scene variants for rhythm */
.ph.ph-rose   { background-color: #e8cdb6; background-image:
    radial-gradient(60% 75% at 25% 20%, rgba(255,245,235,0.9) 0%, rgba(255,245,235,0) 55%),
    radial-gradient(70% 80% at 80% 85%, rgba(196,123,90,0.6) 0%, rgba(196,123,90,0) 55%),
    linear-gradient(150deg, #f1ddca 0%, #e3c0a4 55%, #cf9f7e 100%); }
.ph.ph-sage   { background-color: #d8d8c4; background-image:
    radial-gradient(60% 75% at 22% 22%, rgba(252,250,238,0.92) 0%, rgba(252,250,238,0) 55%),
    radial-gradient(72% 82% at 82% 88%, rgba(107,127,94,0.5) 0%, rgba(107,127,94,0) 55%),
    linear-gradient(150deg, #eef0e2 0%, #d6dac3 55%, #b9c2a3 100%); }
.ph.ph-gold   { background-color: #e7d2a0; background-image:
    radial-gradient(58% 72% at 24% 18%, rgba(255,251,236,0.95) 0%, rgba(255,251,236,0) 55%),
    radial-gradient(74% 84% at 78% 88%, rgba(201,168,76,0.7) 0%, rgba(201,168,76,0) 55%),
    linear-gradient(150deg, #f6eccf 0%, #e6cf9a 55%, #cdb06a 100%); }
.dark .ph, .ph.ph-dark {
  background-color: #1d160e;
  background-image:
    radial-gradient(55% 70% at 28% 22%, rgba(232,213,176,0.34) 0%, rgba(232,213,176,0) 55%),
    radial-gradient(60% 70% at 80% 86%, rgba(201,168,76,0.4) 0%, rgba(201,168,76,0) 55%),
    radial-gradient(80% 90% at 60% 50%, rgba(120,90,50,0.3) 0%, rgba(120,90,50,0) 60%),
    linear-gradient(150deg, #2a2114 0%, #1a130b 55%, #100b06 100%);
}
.dark .ph::before, .ph.ph-dark::before {
  background-image:
    radial-gradient(55% 70% at 28% 22%, rgba(232,213,176,0.4) 0%, rgba(232,213,176,0) 55%),
    radial-gradient(64% 76% at 78% 90%, rgba(201,168,76,0.45) 0%, rgba(201,168,76,0) 55%);
  mix-blend-mode: screen;
}
/* optional subtle label — only when .ph-label is set */
.ph::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  bottom: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  max-width: 80%;
  pointer-events: none;
}
.ph.ph-label::after { content: attr(data-label); opacity: 0.5; }
.dark .ph.ph-label::after, .ph.ph-dark.ph-label::after { color: var(--on-dark-soft); }
.ph-frame { outline: 1px solid var(--hairline); outline-offset: -1px; }
@media (prefers-reduced-motion: reduce) { .ph::before { animation: none; } }

/* photo fill for .ph placeholders (Shop / Offering dynamic cards) */
.ph.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; }
.ph.has-photo::before { display: none; }
.ph.has-photo::after { display: none; }

/* ---------- drag-and-drop image slots ----------
   <image-slot> the user fills. Empty state keeps the warm "light on linen"
   look via ::part(frame); once filled the photo covers it. */
image-slot.imgslot { display: block; position: relative; width: 100%; }
image-slot.slot-fill { position: absolute; inset: 0; width: 100%; height: 100%; }
image-slot.r45 { aspect-ratio: 4/5; height: auto; }
image-slot.r56 { aspect-ratio: 5/6; height: auto; }
image-slot.r34 { aspect-ratio: 3/4; height: auto; }
image-slot.framed { outline: 1px solid var(--hairline); outline-offset: -1px; }
.imgslot::part(frame) {
  background-color: #e9dcc4;
  background-image:
    radial-gradient(60% 75% at 22% 18%, rgba(255,250,238,0.95) 0%, rgba(255,247,230,0) 55%),
    radial-gradient(55% 60% at 82% 30%, rgba(232,213,176,0.85) 0%, rgba(232,213,176,0) 60%),
    radial-gradient(80% 90% at 70% 95%, rgba(196,149,106,0.55) 0%, rgba(196,149,106,0) 55%),
    linear-gradient(150deg, #f3e9d6 0%, #e7d6ba 45%, #d9c19c 100%);
}
.imgslot::part(empty) { color: var(--ink-soft); font-family: var(--display); letter-spacing: 0.08em; }
.imgslot::part(ring) { border-color: rgba(44,44,42,0.22); }
.imgslot.s-rose::part(frame) { background-color: #e8cdb6; background-image:
    radial-gradient(60% 75% at 25% 20%, rgba(255,245,235,0.9) 0%, rgba(255,245,235,0) 55%),
    radial-gradient(70% 80% at 80% 85%, rgba(196,123,90,0.6) 0%, rgba(196,123,90,0) 55%),
    linear-gradient(150deg, #f1ddca 0%, #e3c0a4 55%, #cf9f7e 100%); }
.imgslot.s-sage::part(frame) { background-color: #d8d8c4; background-image:
    radial-gradient(60% 75% at 22% 22%, rgba(252,250,238,0.92) 0%, rgba(252,250,238,0) 55%),
    radial-gradient(72% 82% at 82% 88%, rgba(107,127,94,0.5) 0%, rgba(107,127,94,0) 55%),
    linear-gradient(150deg, #eef0e2 0%, #d6dac3 55%, #b9c2a3 100%); }
.imgslot.s-gold::part(frame) { background-color: #e7d2a0; background-image:
    radial-gradient(58% 72% at 24% 18%, rgba(255,251,236,0.95) 0%, rgba(255,251,236,0) 55%),
    radial-gradient(74% 84% at 78% 88%, rgba(201,168,76,0.7) 0%, rgba(201,168,76,0) 55%),
    linear-gradient(150deg, #f6eccf 0%, #e6cf9a 55%, #cdb06a 100%); }
.imgslot.s-dark::part(frame) {
  background-color: #1d160e;
  background-image:
    radial-gradient(55% 70% at 28% 22%, rgba(232,213,176,0.34) 0%, rgba(232,213,176,0) 55%),
    radial-gradient(60% 70% at 80% 86%, rgba(201,168,76,0.4) 0%, rgba(201,168,76,0) 55%),
    linear-gradient(150deg, #2a2114 0%, #1a130b 55%, #100b06 100%);
}
.imgslot.s-dark::part(empty) { color: var(--on-dark-soft); }
.imgslot.s-dark::part(ring) { border-color: rgba(232,213,176,0.28); }

/* ---------- scroll reveal ----------
   Default state is VISIBLE. We only hide-then-animate once JS adds
   `.reveal-ready` to <html>, so no-JS / capture / throttled contexts
   always show content. `.shown` is a hard failsafe. */
html.reveal-ready [data-reveal] { opacity: 0; transform: translateY(28px); }
html.reveal-ready [data-reveal="fade"] { transform: none; }
html.reveal-ready [data-reveal="line"] { clip-path: inset(0 100% 0 0); transform: none; opacity: 1; }
html.reveal-ready [data-reveal].in { animation: qs-reveal-up 1.1s var(--ease) var(--d, 0ms) both; }
html.reveal-ready [data-reveal="fade"].in { animation: qs-reveal-fade 1.1s var(--ease) var(--d, 0ms) both; }
html.reveal-ready [data-reveal="line"].in { animation: qs-reveal-line 1.4s var(--ease) var(--d, 0ms) both; }
[data-reveal].shown { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }

@keyframes qs-reveal-up   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes qs-reveal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qs-reveal-line { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  html.reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- gold scroll thread ---------- */
.thread {
  position: fixed;
  top: 0; left: clamp(0.6rem, 2.6vw, 3.2rem);
  height: 100vh; width: 2px;
  z-index: 40;
  pointer-events: none;
}
.thread svg { height: 100%; width: 14px; overflow: visible; }
.thread path { fill: none; stroke: var(--gold); stroke-width: 1.3; opacity: 0.55; }
.thread .thread-bg { stroke: rgba(201,168,76,0.16); }
@media (max-width: 720px) { .thread { display: none; } }

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--dark);
  display: grid; place-items: center;
  transition: opacity 1.4s var(--ease), visibility 1.4s var(--ease);
}
.preloader.gone { opacity: 0; visibility: hidden; }
.preloader .selah {
  font-family: var(--body);
  font-style: italic;
  font-weight: 300;
  color: var(--champagne);
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: breathe 4.2s var(--ease) forwards;
}
.preloader .sub {
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-top: 1.6rem;
  opacity: 0;
  animation: fadein 1.6s var(--ease) 1.6s forwards;
}
@keyframes breathe {
  0%   { opacity: 0; transform: scale(0.96); letter-spacing: 0.2em; filter: blur(6px); }
  40%  { opacity: 1; transform: scale(1.0); letter-spacing: 0.06em; filter: blur(0); }
  72%  { opacity: 1; transform: scale(1.015); }
  100% { opacity: 1; transform: scale(1.0); }
}
@keyframes fadein { to { opacity: 1; } }

/* ---------- navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem,2vw,1.6rem) var(--shell);
  transition: background 0.6s var(--ease), padding 0.6s var(--ease), border-color 0.6s var(--ease);
  border-bottom: 1px solid transparent;
  color: var(--on-dark);
  mix-blend-mode: normal;
}
.nav.solid {
  background: rgba(26,21,16,0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--hairline-d);
  padding-block: clamp(0.7rem,1.4vw,1rem);
}
.nav.on-linen { color: var(--ink); }
.nav.on-linen.solid { background: rgba(245,240,232,0.9); border-color: var(--hairline); }
.nav-brand {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.22em;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  text-transform: uppercase;
  display: inline-flex; flex-direction: row; align-items: baseline; gap: 0.5em; line-height: 1;
  white-space: nowrap;
}
.nav-brand .et { font-size: 0.78em; letter-spacing: 0.2em; color: var(--gold); font-style: italic; font-family: var(--body); text-transform: lowercase; }
.nav-links { display: flex; gap: clamp(1.4rem,2.4vw,2.8rem); align-items: center; }
.nav-links a {
  font-family: var(--display);
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  position: relative; padding: 0.3em 0; white-space: nowrap;
  opacity: 0.85; transition: opacity 0.4s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width 0.5s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-offering {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0.85 !important;
}
.nav-offering [data-offering-count] { color: var(--gold); }
.nav-offering:hover { color: var(--gold); opacity: 1 !important; }
.nav-burger { display: none; }
.nav-mobile { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-mobile { display: flex; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; color: inherit;
  }
  .nav-burger span { width: 26px; height: 1.5px; background: currentColor; display: block; transition: 0.4s var(--ease); }
  .nav-mobile {
    position: fixed; inset: 0; z-index: 99; background: var(--dark); color: var(--on-dark);
    display: flex; flex-direction: column; justify-content: center; gap: 1.4rem; padding: var(--shell);
    transform: translateY(-100%); transition: transform 0.7s var(--ease); visibility: hidden;
  }
  .nav-mobile.open { transform: none; visibility: visible; }
  .nav-mobile a { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.2em; text-transform: uppercase; }
  .nav-mobile a .num { font-family: var(--body); font-style: italic; color: var(--gold); font-size: 0.8rem; margin-right: 1rem; }
}

/* ---------- footer ---------- */
.footer { background: var(--dark); color: var(--on-dark); padding: clamp(4rem,7vw,7rem) var(--shell) 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; max-width: 1500px; margin-inline: auto; }
.footer h4 { font-family: var(--display); font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin: 0 0 1.4rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer ul a { opacity: 0.78; font-size: 1.05rem; transition: opacity 0.4s, color 0.4s; }
.footer ul a:hover { opacity: 1; color: var(--gold); }
.footer-creed { font-family: var(--body); font-style: italic; font-weight: 300; font-size: clamp(1.6rem,2.6vw,2.3rem); line-height: 1.3; max-width: 14ch; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  max-width: 1500px; margin: clamp(3rem,5vw,5rem) auto 0; padding-top: 2rem; border-top: 1px solid var(--hairline-d);
  font-family: var(--display); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-dark-soft); }
.footer-selah { font-family: var(--body); font-style: italic; text-transform: none; letter-spacing: 0.04em; font-size: 1.4rem; color: var(--champagne); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.4rem; } .footer-creed { max-width: none; } }

/* ---------- closing Selah band ---------- */
.selah-band { text-align: center; padding-block: clamp(6rem,13vw,12rem); }
.selah-band .word {
  font-family: var(--body); font-style: italic; font-weight: 300;
  font-size: clamp(4rem, 13vw, 11rem); line-height: 1; color: var(--champagne); letter-spacing: 0.04em;
}
.dark .selah-band .word { color: var(--champagne); }
.linen .selah-band .word { color: var(--rose); }
.selah-band .aff { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); margin-bottom: 2.5rem; }
