/*
 * Blaze Goldburst — homepage hero and destination row.
 * Desktop: the 3D scene fills the screen; the rabbit guardian and portal sit left, the title sits right.
 * Portrait tablets and phones: the scene is a tall stage on top, the title and button sit below it.
 */

.hero { position: relative; isolation: isolate; min-height: max(640px, 100svh); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; overflow: hidden; background: radial-gradient(60% 70% at 38% 45%, #2c0c52 0%, #160832 45%, var(--void) 80%); }
.hero__stage { position: absolute; inset: 0; z-index: 0; }
.hero__stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10, 4, 20, 0), var(--void)); }
.webgl-ready .hero__fallback { display: none; }

.hero__copy { position: relative; z-index: 3; grid-column: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--header-h) + 24px) var(--gutter) clamp(150px, 18vh, 210px) 0; pointer-events: none; }
.hero__copy > * { pointer-events: auto; }
.hero__lotus { width: clamp(90px, 8vw, 130px); color: var(--gold); filter: drop-shadow(0 0 12px rgba(255, 190, 80, .7)); margin-bottom: 4px; }
.hero__title { margin: 0; display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-weight: 800; line-height: .98; letter-spacing: .01em; font-size: clamp(44px, 5.4vw, 112px); text-transform: uppercase; background: linear-gradient(180deg, #fff7d6 8%, #f6d27a 34%, #d9a441 48%, #8f5c16 54%, #e9be5e 70%, #fff0b8 94%); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #4a2a06) drop-shadow(0 12px 30px rgba(0, 0, 0, .7)) drop-shadow(0 0 26px rgba(255, 190, 90, .28)); }
.hero__title-line { display: block; position: relative; }
.hero__title-line + .hero__title-line { font-size: 1.02em; }
.hero__title::after { content: ""; display: block; width: min(80%, 520px); height: 14px; margin-top: 10px; background: radial-gradient(circle, #fff1c2 0 4px, transparent 4.5px) center / 14px 14px no-repeat, linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-hi) 50%, var(--gold) 80%, transparent) center / 100% 1.5px no-repeat; }
.hero__tagline { margin: 18px 0 14px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(21px, 2vw, 32px); line-height: 1.25; color: #fff4dc; text-shadow: 0 2px 18px rgba(0, 0, 0, .9); }
.hero__roles { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; font-family: var(--display); font-weight: 600; font-size: clamp(13px, 1vw, 16px); letter-spacing: .05em; color: var(--ink); text-shadow: 0 2px 10px #000; }
.hero__roles li { white-space: nowrap; }
.hero__roles li:not(:last-child)::after { content: "|"; margin: 0 12px; color: var(--gold); }
.hero__veil { position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; pointer-events: none; }
.intro-pending .hero__veil { opacity: 1; }

/* Intro states. Without JavaScript none of these apply and everything is visible. */
.intro-pending .hero__lotus,
.intro-pending .hero__title,
.intro-pending .hero__tagline,
.intro-pending .hero__roles,
.intro-pending .btn--portal { opacity: 0; }
.hero.show-title .hero__lotus { animation: rise 1s var(--ease) both; }
.hero.show-title .hero__title { animation: materialize 1.6s var(--ease) both; }
.hero.show-tagline .hero__tagline { animation: rise 1s var(--ease) both; }
.hero.show-tagline .hero__roles { animation: rise 1s .25s var(--ease) both; }
.hero.show-button .btn--portal { animation: ignite 1.2s var(--ease) both; }
@keyframes materialize { 0% { opacity: 0; letter-spacing: .4em; filter: blur(14px) drop-shadow(0 0 0 transparent); } 60% { opacity: 1; } 100% { opacity: 1; letter-spacing: .01em; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ignite { 0% { opacity: 0; transform: scale(.92); box-shadow: none; } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }

.skip-intro { position: absolute; z-index: 6; right: var(--gutter); bottom: 28px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .05em; color: var(--gold-hi); background: rgba(10, 4, 20, .6); box-shadow: inset 0 0 0 1px var(--line); }
.skip-intro:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.hero__hint { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(150px, 17vh, 190px); margin: 0; text-align: center; font-size: 14px; color: var(--muted); opacity: 0; transition: opacity .8s; pointer-events: none; }
.webgl-ready.intro-done .hero__hint { opacity: .85; }
.hint-gone .hero__hint { opacity: 0 !important; }

/* Fallback (no WebGL, script blocked, or still loading): layered 2.5D presentation of the same artwork */
.hero__fallback { position: absolute; inset: 0; overflow: hidden; }
.fb-portal { position: absolute; left: 41%; top: 46%; width: min(62svh, 44vw); aspect-ratio: 1; transform: translate(-50%, -50%); }
.fb-portal span { position: absolute; border-radius: 50%; }
.fb-portal__nebula { inset: 12%; background: radial-gradient(circle at 50% 50%, #ffd7ff 0, #b54dff 14%, #5b1a9a 38%, #1a0733 66%, transparent 70%); filter: saturate(1.2); box-shadow: 0 0 120px 30px rgba(155, 77, 255, .5); }
.fb-portal__ring { inset: 0; border: 3px solid rgba(255, 210, 120, .85); box-shadow: 0 0 30px rgba(255, 200, 100, .6), inset 0 0 30px rgba(255, 200, 100, .4); }
.fb-portal__ring--2 { inset: 5%; border-style: dashed; border-width: 2px; animation: spin 50s linear infinite; }
.fb-portal__ring--3 { inset: -6%; border-width: 1px; opacity: .6; animation: spin 90s linear infinite reverse; }
.fb-guardian { position: absolute; left: 3vw; bottom: 0; width: min(40vw, 68svh); aspect-ratio: 1137 / 1383; }
@media (max-width: 1279px) { .fb-guardian { width: min(42vw, 70svh); } }
.fb-guardian img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fb-guardian__body { transform-origin: 50% 100%; animation: breathe 4.6s ease-in-out infinite; }
.fb-guardian__medallion { position: absolute; left: 44.59%; top: 30.22%; width: 45.56%; height: 39.33%; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px #b8862a, 0 18px 40px rgba(0, 0, 0, .6), 0 0 40px rgba(255, 200, 100, .35); animation: medal 6s ease-in-out infinite; }
.fb-guardian__medallion img { position: absolute; width: 105.2%; height: 105.2%; max-width: none; left: -1.51%; top: -2.01%; inset: auto; }
.fb-guardian__paws { pointer-events: none; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.006, 1.012); } }
@keyframes medal { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-.8deg); } }

/* Destination row (eight portals, as in the homepage reference) */
.dest-row { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(10px, 1vw, 16px); max-width: 1680px; margin: calc(-1 * clamp(130px, 16vh, 170px)) auto 0; padding: 0 var(--gutter) clamp(40px, 5vw, 72px); }
.dest-row .dest-card { padding: 18px 10px 18px; gap: 6px; min-height: 196px; justify-content: flex-start; background: radial-gradient(120% 70% at 50% 0%, rgba(155, 77, 255, .3), transparent 60%), linear-gradient(180deg, rgba(25, 10, 42, .94), rgba(8, 4, 14, .97)); }
.dest-row .dest-card__icon { width: 72px; height: 72px; }
.dest-row .dest-card__icon .bg-icon { width: 46px; height: 46px; }
.dest-row .dest-card__title { font-size: clamp(14px, 1.05vw, 17px); line-height: 1.15; }
.dest-row .dest-card__text { font-size: 13px; line-height: 1.35; }
@media (max-width: 1279px) {
	.dest-row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; padding-top: 28px; background: linear-gradient(180deg, var(--void), var(--night)); }
	.hero__copy { padding-bottom: 72px; }
	.hero__hint { bottom: 22px; }
	.skip-intro { bottom: 20px; }
}
@media (max-width: 599px) {
	.dest-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.dest-row .dest-card { min-height: 0; padding: 16px 10px; }
	.dest-row .dest-card__icon { width: 56px; height: 56px; }
	.dest-row .dest-card__icon .bg-icon { width: 38px; height: 38px; }
	.dest-row .dest-card__title { font-size: 15px; }
}

/* Stacked layout: phones and portrait tablets */
@media (max-width: 767px), (max-aspect-ratio: 9/10) {
	.hero { display: block; min-height: 0; background: radial-gradient(90% 50% at 50% 30%, #2c0c52 0%, #12071f 55%, var(--void) 90%); }
	.hero__stage { position: relative; inset: auto; height: clamp(420px, 70svh, 760px); margin-top: calc(var(--header-h) - 8px); }
	.hero__copy { padding: 0 var(--gutter) 48px; margin-top: -10px; }
	.hero__lotus { width: 84px; }
	.hero__title { font-size: clamp(44px, 13vw, 96px); }
	.hero__tagline { font-size: clamp(20px, 5.4vw, 28px); }
	.hero__roles { font-size: 13px; max-width: 360px; }
	.hero__roles { gap: 4px 18px; }
	.hero__roles li:not(:last-child)::after { content: none; }
	.hero__roles li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--gold); vertical-align: middle; }
	.btn--portal { width: min(100%, 360px); }
	.hero__hint { bottom: auto; top: calc(var(--header-h) + clamp(420px, 70svh, 760px) - 70px); }
	.skip-intro { bottom: auto; top: calc(var(--header-h) + 8px); }
	.fb-portal { left: 50%; top: 36%; width: min(84vw, 52svh); }
	.fb-guardian { left: 50%; bottom: 1%; width: min(84vw, 54svh); transform: translateX(-58%); }
}
@media (max-width: 767px) and (orientation: landscape) {
	.hero__stage { height: 92svh; }
	.hero__copy { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.fb-guardian__body, .fb-guardian__medallion, .fb-portal__ring { animation: none !important; }
}

/* With the 3D universe running, the hero is a window onto it */
.universe-ready .hero { background: transparent; }
.universe-ready .hero__stage::after { display: none; }
.universe-ready .dest-row { background: none; }

/* Cinematic letterbox during the opening, and a living gold sheen on the title */
.letterbox span { position: absolute; left: 0; right: 0; z-index: 7; height: 10vh; background: #000; pointer-events: none; transition: transform 1.8s cubic-bezier(.7, 0, .2, 1); }
.letterbox span:first-child { top: 0; transform: translateY(-101%); }
.letterbox span:last-child { bottom: 0; transform: translateY(101%); }
.intro-pending .letterbox span { transform: none; }
.hero__title { background: linear-gradient(100deg, #b8862a 0%, #f2cd72 18%, #fff8de 28%, #e8bb55 38%, #946016 50%, #e9be5e 64%, #fff3c4 80%, #c9932e 100%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; animation: sheen 11s ease-in-out 2s infinite; }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hero.show-title .hero__title { animation: materialize 2.2s var(--ease-film, ease) both, sheen 11s ease-in-out 2.2s infinite; }
@keyframes materialize { 0% { opacity: 0; letter-spacing: .22em; filter: blur(16px); transform: translateY(14px) scale(1.04); } 55% { opacity: 1; } 100% { opacity: 1; letter-spacing: .01em; filter: drop-shadow(0 2px 0 #3a1a04) drop-shadow(0 12px 30px rgba(0, 0, 0, .7)) drop-shadow(0 0 26px rgba(255, 190, 90, .28)); transform: none; } }
.hero__tagline { letter-spacing: .01em; }
@media (prefers-reduced-motion: reduce) { .hero__title { animation: none !important; } }
@media (max-width: 767px), (max-aspect-ratio: 9/10) {
	.universe-ready .hero__copy { background: linear-gradient(180deg, rgba(10, 4, 20, 0), rgba(10, 4, 20, .62) 22%, rgba(10, 4, 20, .5) 100%); }
}
.hero { background: radial-gradient(60% 70% at 38% 45%, #1c0833 0%, #0b0416 45%, var(--void) 80%); }
.hero__tagline { color: #fff6e2; text-shadow: 0 2px 18px #000, 0 0 2px #000; }
.hero__roles { color: #f6efe2; }
@media (max-width: 767px), (max-aspect-ratio: 9/10) {
	.hero { background: radial-gradient(90% 50% at 50% 30%, #1c0833 0%, #0b0416 55%, var(--void) 90%); }
	.universe-ready .hero__copy { background: linear-gradient(180deg, rgba(5, 2, 10, 0), rgba(5, 2, 10, .74) 22%, rgba(5, 2, 10, .62) 100%); }
}

/* Fallback (no WebGL): the painted temple set with the guardian layered on it */
.hero__fallback { background-color: var(--void); background-size: cover; background-position: 3% 50%; }
.fb-portal { display: none; }
.fb-guardian { left: 5vw; bottom: 2%; height: 88%; width: auto; aspect-ratio: 1137 / 1383; }
@media (max-width: 1279px) { .fb-guardian { left: 3vw; height: 86%; width: auto; } }
@media (max-width: 767px), (max-aspect-ratio: 9/10) {
	.hero__fallback { background-position: 26% 50%; }
	.fb-guardian { left: 50%; bottom: 1%; height: 96%; width: auto; transform: translateX(-52%); }
}
