/* Czech Royal Hunt — page transition veil */

.crh-pt {
  --crh-pt-void: #07100b;
  --crh-pt-mid: #101c14;
  --crh-pt-gold: #c89a58;
  --crh-pt-gold-soft: #e0c083;
  --crh-pt-gold-deep: #b88b4a;
  --crh-pt-line: rgba(200, 154, 88, 0.32);
  --crh-pt-ink: rgba(246, 243, 236, 0.48);

  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(22, 38, 28, 0.95), transparent 70%),
    linear-gradient(180deg, #07100b 0%, #101c14 48%, #070e0a 100%);
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.42s linear;
}

.crh-pt.is-visible,
html.crh-pt-pending .crh-pt {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.crh-pt-pending {
  background: var(--crh-pt-void, #07100b);
}

html.crh-pt-pending body {
  opacity: 0;
}

.crh-pt__glow {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(200, 154, 88, 0.09), transparent 42%),
    radial-gradient(ellipse 90% 50% at 50% 108%, rgba(8, 14, 10, 0.95), transparent 55%);
}

.crh-pt__grain {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.crh-pt__frame {
  position: absolute;
  inset: clamp(1.1rem, 3.2vw, 2rem);
  border: 1px solid var(--crh-pt-line);
  pointer-events: none;
  opacity: 0.55;
}

.crh-pt__corners {
  position: absolute;
  inset: clamp(1.1rem, 3.2vw, 2rem);
  pointer-events: none;
}

.crh-pt__corners span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--crh-pt-gold);
  border-style: solid;
  opacity: 0.78;
}

.crh-pt__corners span:nth-child(1) {
  top: -1px;
  left: -1px;
  border-width: 1.5px 0 0 1.5px;
}

.crh-pt__corners span:nth-child(2) {
  top: -1px;
  right: -1px;
  border-width: 1.5px 1.5px 0 0;
}

.crh-pt__corners span:nth-child(3) {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 1.5px 1.5px;
}

.crh-pt__corners span:nth-child(4) {
  bottom: -1px;
  right: -1px;
  border-width: 0 1.5px 1.5px 0;
}

.crh-pt__plate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  padding: 1.5rem;
  text-align: center;
  transform: translateY(12px);
  opacity: 0;
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.06s,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.06s;
}

.crh-pt.is-visible .crh-pt__plate,
html.crh-pt-pending .crh-pt__plate {
  opacity: 1;
  transform: translateY(0);
}

.crh-pt__logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.crh-pt__logo-wrap::before {
  content: "";
  position: absolute;
  width: 140%;
  height: 220%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 154, 88, 0.16), transparent 68%);
  animation: crh-pt-breathe 3.2s ease-in-out infinite;
  pointer-events: none;
}

.crh-pt__logo {
  position: relative;
  width: clamp(200px, 42vw, 300px);
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.4));
}

.crh-pt__ornament {
  position: relative;
  width: clamp(140px, 28vw, 200px);
  height: auto;
  opacity: 0.82;
  margin-top: -0.15rem;
}

.crh-pt__since {
  margin: 0;
  max-width: min(22rem, 86vw);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(0.72rem, 1.8vw, 0.84rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.45;
  color: var(--crh-pt-ink);
}

@keyframes crh-pt-breathe {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

html.crh-pt-pending.crh-pt-ready body {
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html.crh-pt-ready .crh-pt.is-hiding {
  opacity: 0;
  visibility: hidden;
}

html.crh-pt-ready .crh-pt.is-hiding .crh-pt__plate {
  opacity: 0;
  transform: translateY(-8px);
  transition-duration: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  .crh-pt,
  .crh-pt__plate,
  html.crh-pt-pending body,
  html.crh-pt-pending.crh-pt-ready body {
    transition: none !important;
  }
  .crh-pt__logo-wrap::before {
    animation: none !important;
  }
}
