/* Shared shell for every loader option. */
html.is-loading, html.is-loading body { overflow: hidden; }
.be-loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; color: #28372e; font-family: 'Barlow Condensed', Arial, sans-serif; }
.be-loader .bl-label { position: absolute; left: 0; right: 0; bottom: 42px; text-align: center; text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: .35em; }
.be-loader .bl-count { font-variant-numeric: tabular-nums; }

/* ---------- Option 1: Sunrise ---------- */
.be-loader--sunrise { background: #ebdcc1 url('../assets/paper.webp') repeat; transition: transform 900ms cubic-bezier(.76, 0, .24, 1); }
.bl-sunrise { width: min(560px, 80vw); position: relative; }
.bl-sunrise .bl-be { width: 100%; height: auto; display: block; transform: scale(.7); position: relative; z-index: 2; }
.bl-sunrise .bl-horizon { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 0 33% 0); }
.bl-sunrise .bl-sun { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateY(calc((1 - var(--p, 0)) * 60%)); }
.bl-sunrise .bl-line { position: absolute; left: 10%; right: 10%; top: 67%; height: 1px; background: #28372e; opacity: .35; transform: scaleX(var(--p, 0)); transform-origin: center; z-index: 1; }
.bl-sunrise-count { position: absolute; left: 0; right: 0; top: calc(50% + min(150px, 22vw)); text-align: center; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; transition: opacity 300ms ease-out; }
.is-revealing .be-loader--sunrise { transform: translateY(-100%); }
.is-revealing .be-loader--sunrise .bl-sunrise-count, .is-revealing .be-loader--sunrise .bl-label { opacity: 0; transition: opacity 250ms ease-out; }

/* ---------- Option 2: Circular text ---------- */
.be-loader--ring { background: #ebdcc1 url('../assets/paper.webp') repeat; transition: opacity 700ms ease-out 250ms; }
.bl-ring { --size: min(340px, 72vw); width: var(--size); height: var(--size); position: relative; }
.bl-ring-text { position: absolute; inset: 0; animation: bl-spin 22s linear infinite; transition: transform 700ms cubic-bezier(.22, 1, .36, 1), opacity 500ms ease-out; }
.bl-ring-text span { position: absolute; left: 50%; top: 0; height: 50%; transform-origin: bottom center; font-size: clamp(15px, 3.6vw, 19px); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.bl-ring-sun { position: absolute; inset: 28%; border-radius: 50%; background: #ad5637; display: grid; place-items: center; color: #f2e5cf; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(34px, 8vw, 46px); transform: scale(calc(.82 + var(--p, 0) * .18)); transition: transform 600ms cubic-bezier(.22, 1, .36, 1); }
.is-revealing .be-loader--ring { opacity: 0; }
.is-revealing .bl-ring-text { opacity: 0; scale: 1.5; }
.is-revealing .bl-ring-sun { transform: scale(1.25); }
@keyframes bl-spin { to { rotate: 360deg; } }

/* ---------- Option 3: Contours ---------- */
.be-loader--contours { background: transparent; }
.bl-panel { position: absolute; left: 0; right: 0; height: 50.5%; background: #28372e; transition: transform 950ms cubic-bezier(.76, 0, .24, 1); }
.bl-panel--top { top: 0; }
.bl-panel--bottom { bottom: 0; }
.bl-contours { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 400ms ease-out; }
.bl-contours path { fill: none; stroke: #ebdcc1; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; }
.bl-contour-mark { position: relative; width: min(420px, 70vw); aspect-ratio: 547 / 301; background: #ebdcc1; -webkit-mask: url('../assets/be-mark.svg') center / contain no-repeat; mask: url('../assets/be-mark.svg') center / contain no-repeat; opacity: var(--mark, 0); transform: scale(calc(.9 + var(--mark, 0) * .1)); transition: opacity 400ms ease-out; }
.be-loader--contours .bl-label { color: #ebdcc1; transition: opacity 300ms ease-out; }
.is-revealing .bl-panel--top { transform: translateY(-100%); }
.is-revealing .bl-panel--bottom { transform: translateY(100%); }
.is-revealing .bl-contours, .is-revealing .bl-contour-mark, .is-revealing .be-loader--contours .bl-label { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .bl-ring-text { animation: none; }
  .be-loader, .bl-panel, .bl-ring-text, .bl-ring-sun { transition: opacity 250ms ease-out !important; transform: none !important; }
  .is-revealing .be-loader { opacity: 0; }
}
