/* =================================================================
   Reusable components: buttons, cards, ornaments, fields, video frame,
   text cards, animation utilities.
   ================================================================= */

/* -------- eyebrow / kicker label -------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.25rem;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}
.eyebrow.single::before { display: none; }

.deck {
  font-family: var(--f-body);
  font-style: italic;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: var(--parchment);
  line-height: 1.6;
}

.muted { color: var(--muted); }

/* -------- drop cap -------- */
.dropcap > p:first-of-type::first-letter,
.dropcap::first-letter {
  font-family: var(--f-display);
  color: var(--gold);
  font-size: 4.2rem;
  line-height: 0.95;
  float: left;
  margin: 0.1em 0.18em 0 0;
  font-weight: 500;
  text-shadow: var(--glow-gold);
}

/* -------- ornament divider -------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  color: var(--gold);
  margin: 2rem auto;
  font-size: 0.85rem;
  letter-spacing: 0.5em;
}
.ornament::before, .ornament::after {
  content: "";
  display: block;
  width: clamp(40px, 12vw, 120px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.55), transparent);
}
.ornament.triple { font-size: 0.7rem; letter-spacing: 1em; }

/* meander divider — subtle greek key motif */
.meander {
  height: 18px;
  width: clamp(180px, 25vw, 280px);
  margin: 1.5rem auto;
  opacity: 0.45;
  background:
    repeating-linear-gradient(90deg,
      var(--gold) 0 8px, transparent 8px 12px,
      var(--gold) 12px 14px, transparent 14px 22px);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

/* -------- buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 2.4rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 0;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  cursor: pointer;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.35), transparent);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease);
}
.btn:hover { color: var(--void); background: var(--gold); box-shadow: var(--glow-gold-strong); }
.btn:hover::before { transform: translateX(110%); }

.btn.solid { background: var(--gold); color: var(--void); }
.btn.solid:hover { background: var(--cream); border-color: var(--cream); }

.btn.ghost { border-color: rgba(201,169,110,0.45); color: var(--parchment); }
.btn.ghost:hover { color: var(--void); background: var(--gold); border-color: var(--gold); }

.btn.sm { padding: 0.65rem 1.4rem; font-size: 0.7rem; letter-spacing: 0.2em; }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* When .btn / .btn.solid / .btn.ghost is applied to a .wp-block-button wrapper,
   the actual clickable element is the inner <a class="wp-block-button__link">.
   The wrapper has no padding, so its background/colour shows through but is
   invisible behind the link. Propagate the visual to the inner link. */
.wp-block-button.btn { background: transparent; padding: 0; border: 0; }
.wp-block-button.btn > .wp-block-button__link {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 0;
  padding: 0.95rem 2.4rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.4s var(--ease);
}
.wp-block-button.btn > .wp-block-button__link:hover {
  color: var(--void);
  background: var(--gold);
  box-shadow: var(--glow-gold-strong);
}
.wp-block-button.btn.solid > .wp-block-button__link {
  background: var(--gold);
  color: var(--void);
  border-color: var(--gold);
}
.wp-block-button.btn.solid > .wp-block-button__link:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--void);
}
.wp-block-button.btn.ghost > .wp-block-button__link {
  background: transparent;
  border-color: rgba(201,169,110,0.45);
  color: var(--parchment);
}
.wp-block-button.btn.ghost > .wp-block-button__link:hover {
  color: var(--void);
  background: var(--gold);
  border-color: var(--gold);
}

/* -------- text link with arrow -------- */
.tlink {
  font-family: var(--f-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.tlink::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}
.tlink:hover { color: var(--cream); }
.tlink:hover::after { transform: translateX(4px); }

/* -------- cards -------- */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  position: relative;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  background: rgba(31, 34, 56, 0.7);
  box-shadow: 0 14px 60px rgba(0,0,0,0.55), var(--glow-gold);
}

/* corner ornaments for ritual cards */
.card.ornate::before,
.card.ornate::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid rgba(201,169,110,0.5);
}
.card.ornate::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card.ornate::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* -------- video frame + play button (reusable across pages) -------- */
.video-frame {
  position: relative;
  border: 1px solid rgba(201,169,110,0.32);
  padding: 5px;
  background: var(--obsidian);
  box-shadow:
    0 0 0 1px rgba(201,169,110,0.08),
    0 24px 70px rgba(0,0,0,0.7),
    0 0 80px rgba(74,53,99,0.25);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-frame .inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}
.video-frame .inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,8,17,0.2) 0%, rgba(7,8,17,0.45) 100%);
}
/* Gate cards (homepage Περσεφόνη / Έλευσις): show the WHOLE photo (no crop).
   The image is contained inside the 16:9 frame, and a soft, darkened, blurred
   copy of the same image fills the leftover space so there are no dead bars. */
.gate-frame {
  /* squarer than 16:9 so the tall portrait shows large instead of as a thin strip */
  aspect-ratio: 1 / 1;
}
.gate-frame .inner {
  background-image: var(--gate-bg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1; /* keep the sharp photo above the blurred fill */
}
.gate-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gate-bg);
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.5) saturate(1.05);
  transform: scale(1.15);
  z-index: 0;
}
/* moving backdrop (reuses the animated hero clip) — sits behind the gradient + play button */
.video-frame__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.play-btn {
  position: relative;
  z-index: 2;
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(7,8,17,0.5);
  display: grid;
  place-items: center;
  color: var(--gold);
  transition: all 0.35s var(--ease);
  backdrop-filter: blur(4px);
}
.play-btn::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--gold);
  margin-left: 5px;
  transition: border-left-color 0.3s var(--ease);
}
.play-btn:hover {
  background: var(--gold);
  box-shadow: var(--glow-gold-strong);
  transform: scale(1.06);
}
.play-btn:hover::before { border-left-color: var(--void); }
.video-frame .badge {
  position: absolute;
  z-index: 3;
  top: 14px; left: 14px;   /* top, not bottom — avoids colliding with .title-overlay */
  background: rgba(7,8,17,0.7);
  border: 1px solid rgba(201,169,110,0.3);
  color: var(--gold);
  font-family: var(--f-display);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
}
.video-frame .title-overlay {
  position: absolute;
  z-index: 3;
  left: 20px; right: 20px; bottom: 16px;
  font-family: var(--f-display);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 2px 24px rgba(0,0,0,0.9);
  text-align: center;
}
/* Keep video frames (homepage gates + intro) text-free so no label overlaps
   text baked into the thumbnail image — only the image + play button show.
   The titles live OUTSIDE the frame: gates as the <h3> above, intro as the
   section heading above. */
.video-frame .badge,
.video-frame .title-overlay { display: none; }

/* -------- form fields (generic) -------- */
.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  font-family: var(--f-display);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.6rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: rgba(7,8,17,0.65);
  border: 1px solid rgba(201,169,110,0.28);
  color: var(--cream);
  padding: 0.95rem 1.05rem;
  font-family: var(--f-body);
  font-size: 1.05rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-radius: 0;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); font-style: italic; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201,169,110,0.3), 0 0 30px rgba(201,169,110,0.15);
}
.checkbox {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.92rem; color: var(--parchment); font-style: italic;
  cursor: pointer;
  margin-bottom: 1.5rem;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--gold); margin-top: 3px; }
.privacy-note { font-size: 0.82rem; color: var(--muted); font-style: italic; text-align: center; margin-top: 1rem; }

/* -------- text card (used in texts grid) -------- */
.text-card h3 {
  color: var(--gold);
  font-size: 1.08rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.text-card .meta {
  font-family: var(--f-display);
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.text-card .meta::after {
  content: "·";
  color: var(--gold-soft);
}
.text-card .meta:last-child::after { content: ""; }
.text-card p { color: var(--parchment); font-style: italic; font-size: 1rem; margin-bottom: 1.25rem; }

/* -------- page section / pages routing (prototype SPA shell) -------- */
/* NOTE: prototype used .page on hidden SPA sections. In WP, the body
   has class .page (post type), which would conflict — removed display:none.
   Keep only the entry animation, scoped to .page-section to avoid clobbering body. */
.page-section.is-active { display: block; animation: page-in 0.55s var(--ease) both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------- reveal-on-scroll --------
   Content is visible by default; JS adds `.js-ready` to <html> when the
   observer is initialised, only then do we start from a hidden state and
   animate in. This means no-JS / pre-observer screenshots still show
   content, and the animation runs when JS is available. */
.reveal { transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js-ready .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal:not(.is-in) { opacity: 1; transform: none; }
}

/* -------- image placeholder -------- */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      rgba(201,169,110,0.05) 0 10px,
      rgba(201,169,110,0.09) 10px 20px),
    var(--obsidian);
  border: 1px solid rgba(201,169,110,0.18);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  aspect-ratio: 16 / 9;
}
