/* TFM Secret Places — variant A "Kammer" (php/tfm-secret.php, js/tfm-secret.js)
   Builds on tfm-village.css: hero image and back button come from the
   location archive (.tfm-loc-hero, .tfm-loc-back); district
   colours from body.tfm-district-<key> (--d, --d-s, --d-rgb).
   Mock: docs/mocks/secret-place-mock.html. Build table: docs/immersion.md section 4. */

/* ── Hero ── */
.tfm-secret-hero { isolation: isolate; }
.tfm-secret-sigil, .tfm-secret-sigil * { color: var(--d-s, #e8c97a) !important; }
.tfm-secret-sigil p { margin: 0; }
.tfm-secret-sigil .elementor-widget-container,
.tfm-secret-sigil:not(:has(.elementor-widget-container)) {
  width: 64px !important; height: 64px !important; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem; line-height: 1;
  border: 1px solid rgba(var(--d-rgb, 212, 168, 67), .7);
  box-shadow: 0 0 30px rgba(var(--d-rgb, 212, 168, 67), .45), inset 0 0 18px rgba(var(--d-rgb, 212, 168, 67), .35);
  animation: tfmSecretPulse 5s ease-in-out infinite;
}
@keyframes tfmSecretPulse { 50% { box-shadow: 0 0 46px rgba(var(--d-rgb, 212, 168, 67), .6), inset 0 0 24px rgba(var(--d-rgb, 212, 168, 67), .5); } }

.tfm-secret-kicker, .tfm-secret-kicker * {
  font-family: Jost, sans-serif !important; font-size: .7rem !important; letter-spacing: .28em !important;
  text-transform: uppercase !important; color: var(--d-s, #e8c97a) !important;
}
.tfm-secret-kicker p, .tfm-secret-greet p { margin: 0; }
/* Same look as .tfm-loc-title, but without that class: the global sink-in effect
   (tfm-fx.js) would split the title, and this page has its own entrance. */
.tfm-secret-title .elementor-heading-title {
  font-family: "Cormorant Garamond", serif !important; font-style: italic !important; font-weight: 400 !important;
  font-size: clamp(2.4rem, 6vw, 3.8rem) !important; line-height: 1.05 !important; letter-spacing: .02em !important;
  color: var(--ink, #f0e8d8) !important;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .7), 0 0 40px rgba(var(--d-rgb, 212, 168, 67), .4);
}
.tfm-secret-title .tfm-ch { display: inline-block; white-space: pre; }
.tfm-secret-greet, .tfm-secret-greet * {
  font-family: "Cormorant Garamond", Georgia, serif !important; font-style: italic !important;
  font-size: 1.3rem !important; color: var(--body-text, #e4ddf0) !important;
}
.tfm-secret-greet { max-width: 34ch; margin-inline: auto; }

/* ── Lore + relic ── */
.tfm-secret-label, .tfm-secret-label * {
  font-family: Jost, sans-serif !important; font-size: .7rem !important; font-weight: 500 !important;
  letter-spacing: .26em !important; text-transform: uppercase !important; color: var(--d-s, #e8c97a) !important;
}
.tfm-secret-lore-text, .tfm-secret-lore-text p {
  font-family: "Cormorant Garamond", Georgia, serif !important; font-size: 1.22rem !important;
  line-height: 1.7 !important; color: var(--body-text, #e4ddf0) !important;
}
.tfm-secret-lore-text p { margin: 0 0 14px; }
.tfm-secret-lore-text p:first-of-type::first-letter { float: left; font-size: 3.4rem; line-height: .9; padding: 6px 8px 0 0; color: var(--d-s, #e8c97a); }

.tfm-secret-relic {
  text-align: center;
  border-radius: 160px 160px 18px 18px !important;
  background: linear-gradient(180deg, rgba(var(--d-rgb, 212, 168, 67), .12), rgba(14, 9, 28, .85) 55%) !important;
  border: 1px solid rgba(var(--d-rgb, 212, 168, 67), .4) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .4), 0 0 40px -10px rgba(var(--d-rgb, 212, 168, 67), .45);
}
.tfm-secret-relic-kicker, .tfm-secret-relic-kicker * {
  font-family: Jost, sans-serif !important; font-size: .62rem !important; letter-spacing: .28em !important;
  text-transform: uppercase !important; color: var(--muted, #b6afc7) !important;
}
.tfm-secret-relic-kicker p, .tfm-secret-relic-text p, .tfm-secret-glyph p { margin: 0; }
.tfm-secret-glyph .elementor-widget-container,
.tfm-secret-glyph:not(:has(.elementor-widget-container)) {
  width: 90px !important; height: 90px !important; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.2rem; line-height: 1; color: var(--d-s, #e8c97a);
  background: radial-gradient(circle, rgba(var(--d-rgb, 212, 168, 67), .25), transparent 70%);
  animation: tfmSecretFloat 6s ease-in-out infinite;
}
@keyframes tfmSecretFloat { 50% { transform: translateY(-6px); } }
.tfm-secret-relic-title .elementor-heading-title {
  font-family: "Cormorant Garamond", Georgia, serif !important; font-weight: 500 !important;
  font-size: 1.5rem !important; color: var(--ink, #f6f1ea) !important;
}
.tfm-secret-relic-text, .tfm-secret-relic-text * {
  font-family: "Cormorant Garamond", Georgia, serif !important; font-style: italic !important;
  font-size: 1.08rem !important; color: var(--muted, #b6afc7) !important;
}
/* hidden by JS when the field is still empty */
.tfm-secret-is-empty { display: none !important; }

/* ── Left here for you ── */
.tfm-secret-left { border-top: 2px solid rgba(var(--d-rgb, 212, 168, 67), .2); }
.tfm-secret-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; text-align: left; }
.tfm-secret-card {
  display: block; border-radius: 16px; overflow: hidden; text-decoration: none !important; color: inherit !important;
  background: rgba(20, 13, 38, .8); border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid var(--d, #d4a843);
  transition: transform .35s ease, box-shadow .35s ease;
}
.tfm-secret-card:hover { transform: translateY(-3px); box-shadow: 0 0 30px -8px rgba(var(--d-rgb, 212, 168, 67), .6); }
.tfm-secret-card__img { display: block; height: 130px; background: radial-gradient(ellipse at 50% 60%, rgba(var(--d-rgb, 212, 168, 67), .35), transparent 70%), #160e28; }
.tfm-secret-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tfm-secret-card__body { display: block; padding: 12px 14px 14px; }
.tfm-secret-card b { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 1.25rem; color: var(--ink, #f6f1ea); }
.tfm-secret-card small { font-family: Jost, sans-serif; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--d-s, #e8c97a); }
/* nothing left here yet: the empty note takes the whole row */
.tfm-secret-cards > .tfm-secret-empty:first-child { grid-column: 1 / -1; min-height: 160px; }
.tfm-secret-empty {
  display: grid; place-items: center; min-height: 200px; padding: 20px; border-radius: 16px; text-align: center;
  border: 1px dashed rgba(var(--d-rgb, 212, 168, 67), .35);
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.15rem; color: var(--muted, #b6afc7);
}

/* ── Locked: the door (templates/tfm-secret-locked.php) ── */
.tfm-secret-lock {
  min-height: 70vh; display: grid; place-items: center; padding: 60px 20px 80px; text-align: center;
  background: radial-gradient(ellipse 50% 40% at 50% 55%, rgba(var(--d-rgb, 212, 168, 67), .12), transparent 70%);
}
.tfm-secret-door {
  position: relative; width: min(420px, 100%); padding: 70px 30px 30px; border-radius: 210px 210px 20px 20px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .2) 0 2px, transparent 2px 52px), linear-gradient(180deg, #221637, #120a20);
  border: 1px solid rgba(var(--d-rgb, 212, 168, 67), .4);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .6), 0 0 50px -14px rgba(var(--d-rgb, 212, 168, 67), .5);
}
/* keyhole */
.tfm-secret-door::before {
  content: ''; position: absolute; left: 50%; top: 64px; width: 18px; height: 26px; margin-left: -9px;
  border-radius: 9px 9px 3px 3px; border: 2px solid rgba(var(--d-rgb, 212, 168, 67), .8); box-shadow: 0 0 14px rgba(var(--d-rgb, 212, 168, 67), .5);
}
.tfm-secret-door h1 {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-style: italic;
  font-size: 1.7rem; line-height: 1.25; color: var(--ink, #f6f1ea); margin: 56px 0 8px;
}
.tfm-secret-door p { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; color: var(--muted, #b6afc7); margin: 0 0 14px; }
.tfm-secret-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tfm-secret-btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px; text-decoration: none !important;
  font-family: Jost, sans-serif; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--d, #d4a843); background: rgba(var(--d-rgb, 212, 168, 67), .2); color: var(--ink, #f6f1ea) !important;
  transition: box-shadow .3s ease;
}
.tfm-secret-btn:hover { box-shadow: 0 0 22px rgba(var(--d-rgb, 212, 168, 67), .45); }
.tfm-secret-btn.is-quiet { background: transparent; border-color: rgba(255, 255, 255, .2); color: var(--muted, #b6afc7) !important; }

/* ── Entering the place (js/tfm-secret.js) ──
   html.tfm-secret-entering is set in <head>, so nothing flashes before the veil. */
.tfm-secret-veil { position: fixed; inset: 0; z-index: 9990; pointer-events: none; background: #05030a; }
.tfm-secret-veil.go { animation: tfmSecretVeil 2.2s cubic-bezier(.5, 0, .2, 1) forwards; }
.tfm-secret-veil.is-quick.go { animation-duration: .9s; }
@keyframes tfmSecretVeil {
  0% { background: radial-gradient(circle at 50% 40%, rgba(var(--d-rgb, 212, 168, 67), .35) 0, #05030a 2%); }
  100% { background: radial-gradient(circle at 50% 40%, transparent 0, transparent 140%); opacity: 0; }
}
.tfm-secret-entering .tfm-secret-title .tfm-ch { opacity: 0; filter: blur(8px); transform: translateY(12px); }
.tfm-secret-entered .tfm-secret-title .tfm-ch {
  opacity: 1; filter: blur(0); transform: none;
  transition: opacity 1s ease, filter 1.2s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--tfm-ch-start, .9s) + var(--i) * var(--tfm-ch-step, 45ms));
}
.tfm-secret-entering .tfm-secret-greet, .tfm-secret-entering .tfm-secret-sigil, .tfm-secret-entering .tfm-secret-kicker { opacity: 0; }
.tfm-secret-entered .tfm-secret-greet, .tfm-secret-entered .tfm-secret-kicker { opacity: 1; transition: opacity 1.4s ease var(--tfm-ch-late, 1.6s); }
.tfm-secret-entered .tfm-secret-sigil { opacity: 1; transition: opacity 1.4s ease .7s; }
.tfm-secret-quick { --tfm-ch-start: .2s; --tfm-ch-step: 20ms; --tfm-ch-late: .5s; }

@media (max-width: 760px) {
  .tfm-secret-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tfm-secret-sigil .elementor-widget-container, .tfm-secret-sigil, .tfm-secret-glyph .elementor-widget-container, .tfm-secret-glyph { animation: none !important; }
  .tfm-secret-veil { display: none; }
}
