/* ============================================================
   ROYAL LAYER — gates transitions, royal buttons, toran,
   shimmer, shop & about animations
   ============================================================ */

/* ---------- Palace gates as the page transition ---------- */
#gates.busy { pointer-events: auto; }
#gates.fast .gate { transition-duration: .8s; }
#gates.fast .gate-seal { transition-duration: .4s; }
#gates:not(.open) .gate-seal { transition-delay: .25s; }
.gate-seal { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(320px, 80vw); z-index: 3; }
.seal-emblem { width: min(190px, 44vw); }
.seal-emblem .emb-petals { transform-origin: 250px 250px; animation: spin 14s linear infinite; }
.seal-label {
  font-family: var(--display); color: var(--gold-light); letter-spacing: .26em; font-size: 12px; text-align: center; line-height: 1.6;
  padding: 10px 20px; background: rgba(42,4,8,.88); border: 1px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(42,4,8,.6), 0 0 0 5px var(--gold-dark);
}
.seal-label .hi { display: block; letter-spacing: 0; font-size: 21px; color: var(--gold); }
.seal-el { width: 110px; }
.gate-toran { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: center; overflow: hidden; z-index: 2; transition: opacity .4s; }
#gates.open .gate-toran { opacity: 0; }

/* ---------- Global royal FX ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 85; pointer-events: none; }
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); box-shadow: 0 0 10px rgba(230,199,123,.8); pointer-events: none; }
#progress::after { content: '◆'; position: absolute; right: -6px; top: -7px; font-size: 12px; color: var(--gold-light); }

/* Toran garland */
.toran-wrap { position: absolute; left: 0; right: 0; top: 66px; display: flex; justify-content: center; overflow: hidden; z-index: 3; pointer-events: none; }
.toran { flex: none; height: 62px; max-width: none; }
.t-leaf { transform-box: fill-box; transform-origin: 50% 0; animation: leafSway 3s ease-in-out infinite; }
@keyframes leafSway { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(-7deg); } }
.page-hero .toran-wrap { animation: toranDrop 1.2s var(--ease) both .3s; }
@keyframes toranDrop { from { transform: translateY(-70px); opacity: 0; } }

/* Royal elephants raise their trunks in salute */
.salute .trunk { animation: salute 7s ease-in-out infinite; }
@keyframes salute {
  0%, 50%, 100% { transform: rotate(0); } 18%, 32% { transform: rotate(-8deg); }
  62%, 76% { transform: rotate(-105deg); } 88% { transform: rotate(0); }
}

/* Shimmering gold-leaf headings */
.sec-head h2 {
  background: linear-gradient(110deg, var(--crimson) 0 42%, #D9B45C 50%, var(--crimson) 58% 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
.sec-head.light h2 { background-image: linear-gradient(110deg, var(--gold-light) 0 42%, #FFF6D8 50%, var(--gold-light) 58% 100%); }
.page-hero h1 { background: linear-gradient(110deg, var(--gold) 0 40%, #FFF3C9 50%, var(--gold) 60% 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; animation: shimmer 6s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
.sec-head .divider { transform: scaleX(0); transition: transform 1.2s var(--ease) .35s; }
.sec-head.in .divider { transform: scaleX(1); }

/* Page hero: scalloped Mughal edge */
.page-hero { padding: 178px 0 84px; border-bottom: 0; }
.page-hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 16px; z-index: 2;
  background: radial-gradient(circle at 50% 100%, var(--cream) 0 12px, var(--gold) 12.5px 14px, transparent 14.5px) 0 0 / 30px 16px repeat-x;
}
.page-hero .spice-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- Royal plaque buttons ---------- */
.royal-btn { display: inline-block; position: relative; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); transition: transform .35s var(--ease), filter .35s; }
.royal-btn:hover { transform: translateY(-3px) scale(1.04); filter: drop-shadow(0 0 18px rgba(230,199,123,.6)) drop-shadow(0 12px 20px rgba(0,0,0,.45)); }
.royal-btn:active { transform: scale(.97); }
.royal-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 6px; }
.rb-frame { display: block; padding: 2px; background: linear-gradient(180deg, #FBE6A8, var(--gold-dark)); clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%); }
.rb-inner {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 19px 46px; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(17px 0, calc(100% - 17px) 0, 100% 50%, calc(100% - 17px) 100%, 17px 100%, 0 50%);
}
.rb-inner::before { content: ''; position: absolute; inset: 5px 14px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; opacity: .35; pointer-events: none; }
.rb-inner::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-20deg); animation: rbShine 4s ease-in-out infinite; }
@keyframes rbShine { 0%, 60% { left: -60%; } 85%, 100% { left: 130%; } }
.rb-inner .ico { width: 20px; height: 20px; }
.royal-btn.gold .rb-inner { background: linear-gradient(180deg, #F8E2A0 0%, #D9B45C 45%, #B48A36 100%); color: var(--maroon-800); }
.royal-btn.maroon .rb-inner { background: linear-gradient(180deg, #82192a, #3a0710); color: var(--gold-light); }
.royal-btn.maroon .rb-inner::after { animation-delay: 2s; }
.royal-btn.gold { animation: rbGlow 2.8s ease-in-out infinite; }
@keyframes rbGlow {
  0%, 100% { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)) drop-shadow(0 0 0 rgba(230,199,123,0)); }
  50% { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)) drop-shadow(0 0 18px rgba(230,199,123,.75)); }
}
.hero-cta { gap: 22px; margin-top: 30px; align-items: center; }
.hero-content::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: min(1100px, 130%); height: 120%; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(42,4,8,.78) 0%, rgba(42,4,8,.5) 45%, transparent 72%);
}

/* ---------- Shop: product card animations ---------- */
.card.reveal { opacity: 0; transform: none; }
.card.reveal.in { opacity: 1; animation: unveil 1.1s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 120ms); }
@keyframes unveil {
  from { clip-path: inset(100% 0 0 0 round 200px 200px 10px 10px); transform: translateY(50px); }
  to { clip-path: inset(0 0 0 0 round 200px 200px 10px 10px); transform: none; }
}
.card.tilting { transition: transform .12s linear, box-shadow .5s; box-shadow: 0 30px 50px -24px rgba(74,10,20,.6); }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,240,200,.38), transparent 45%); }
.card:hover::after { opacity: 1; }
.card-art::before { animation: spin 50s linear infinite; }
.spice-art .lid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .6s var(--ease); }
.card:hover .spice-art .lid, .modal-art .spice-art .lid { transform: translateY(-7px) rotate(-10deg); }
.spice-art .aroma path { stroke-dasharray: 46 60; stroke-dashoffset: 60; opacity: 0; }
.card:hover .aroma path, .modal-art .aroma path { animation: aroma 2.6s ease-in-out infinite; }
.spice-art .aroma path:nth-child(2) { animation-delay: .8s; }
.spice-art .aroma path:nth-child(3) { animation-delay: 1.6s; }
@keyframes aroma {
  0% { stroke-dashoffset: 60; opacity: 0; transform: translateY(8px); }
  30% { opacity: .75; }
  100% { stroke-dashoffset: -50; opacity: 0; transform: translateY(-14px); }
}
@media (hover: none) { .card.in .aroma path { animation: aroma 3s ease-in-out infinite; } }
.spice-art.shake { animation: shake .7s var(--ease); }
@keyframes shake { 15% { transform: rotate(-7deg) scale(1.06); } 35% { transform: rotate(6deg) scale(1.06); } 55% { transform: rotate(-3deg); } 75% { transform: rotate(2deg); } }
.btn.added { background: linear-gradient(180deg, #F0D58E, var(--gold)); color: var(--maroon-800); border-color: var(--gold); }
.card-tag { animation: tagIn .8s var(--ease) backwards .6s; }
@keyframes tagIn { from { transform: translate(-50%, 20px); opacity: 0; } }
.price { display: inline-block; }
.pack:active { transform: scale(.92); }
.shop-sec-head i { transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .3s; }
.shop-sec-head.in i { transform: scaleX(1); }
.shop-sec-head.in .dia { animation: diaIn 1.2s var(--ease); }
@keyframes diaIn { from { transform: rotate(-315deg) scale(0); } }
.tab.on { animation: tabOn .5s var(--ease); }
@keyframes tabOn { from { transform: scale(.88); } }
.soon-seal { animation: sealPulse 3s ease-in-out infinite; }
@keyframes sealPulse { 0%, 100% { transform: translate(-50%, -50%) rotate(-12deg); } 50% { transform: translate(-50%, -50%) rotate(-8deg) scale(1.06); } }

/* ---------- Pillars flip in like royal seals ---------- */
.pillar.reveal { transform: perspective(900px) rotateY(75deg) translateY(30px); }
.pillar.reveal.in { transform: none; }
.pillar:hover .p-ico { animation: icoSpin 1s var(--ease); }
@keyframes icoSpin { 50% { transform: rotateY(180deg) scale(1.12); } 100% { transform: rotateY(360deg); } }

/* ---------- About ---------- */
.story-emblem { width: min(440px, calc(100% - 130px)); }
.story-emblem.reveal { transform: scale(.6) rotate(-120deg); transition: transform 1.6s var(--ease), opacity 1.2s; }
.story-emblem.reveal.in { transform: none; }
.orbit { position: absolute; inset: -60px; border-radius: 50%; animation: spin 26s linear infinite; pointer-events: none; }
.orbit.o2 { inset: -34px; animation-duration: 44s; animation-direction: reverse; }
.orbit i { position: absolute; inset: 0; transform: rotate(var(--a)); }
.orbit i::before { content: ''; position: absolute; left: 50%; top: 0; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.orbit.o2 i::before { width: 5px; height: 5px; margin-left: -2.5px; }

.stats { color: var(--cream); padding: 74px 0; border-block: 2px solid var(--gold-dark); overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-n { font-family: var(--display); font-weight: 700; font-size: clamp(42px, 5vw, 66px); line-height: 1; background: linear-gradient(180deg, #FBE6A8, var(--gold) 60%, var(--gold-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .divider { width: 120px; margin: 12px auto; }
.stat-l { font-family: var(--display); letter-spacing: .2em; font-size: 12px; color: var(--gold-light); }
.stat.reveal { transform: translateY(40px) scale(.9); }
.stat.reveal.in { transform: none; }

.gaja { padding-bottom: 240px; }
.gaja::after { content: ''; position: absolute; left: 0; right: 0; bottom: 20px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-dark) 15%, var(--gold-dark) 85%, transparent); }
.gaja .petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.parade { position: absolute; bottom: 21px; left: 0; display: flex; gap: 34px; align-items: flex-end; animation: caravan 42s linear infinite -6s; }
.parade > div { width: 130px; } .parade > .royal { width: 168px; } .parade > .calf { width: 80px; }
.parade .elephant { width: 100%; filter: drop-shadow(0 6px 6px rgba(0,0,0,.4)); }
.gaja-art .elephant { animation: floaty 5s ease-in-out infinite; }

.words span { display: inline-block; opacity: 0; transform: translateY(24px) rotateX(70deg); filter: blur(4px); transition: opacity .8s, transform .9s var(--ease), filter .8s; transition-delay: calc(var(--w) * 110ms + .2s); }
.quote-band.in .words span { opacity: 1; transform: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero-cta { flex-direction: column; gap: 14px; }
  .rb-inner { padding: 15px 30px; font-size: 12px; letter-spacing: .14em; }
  .page-hero { padding: 150px 0 64px; }
  .toran { height: 46px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .parade > div { width: 96px; } .parade > .royal { width: 124px; } .parade > .calf { width: 60px; }
  .gaja { padding-bottom: 190px; }
  .seal-label { font-size: 10px; letter-spacing: .18em; }
}
@media (prefers-reduced-motion: reduce) {
  .parade { animation: none; transform: translateX(5vw); }
}

/* Shorter laptop screens: tighten the hero text so the mountains have room */
@media (max-height: 860px) and (min-width: 761px) {
  .hero-content { padding-top: 96px; }
  .hero-title { font-size: min(8.4vw, 11.5vh); margin-top: 4px; }
  .hero-hindi { font-size: clamp(20px, 3.6vh, 32px); margin-top: 0; }
  .hero .divider { margin: 8px auto; }
  .hero-cta { margin-top: 18px; }
  .rb-inner { padding: 16px 40px; }
}

/* ---------- Footer bottom row: copyright left, designer credit right ---------- */
#footer .foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; text-align: left; padding: 18px 0; border-top: 1px solid rgba(201,162,74,.25); opacity: 1; }
#footer .foot-bottom .copy { opacity: .8; }
.designer { display: inline-flex; align-items: center; gap: 4px 10px; color: var(--gold-light); opacity: .8; transition: opacity .3s; letter-spacing: normal; }
.designer .hi { color: var(--gold); font-size: 14px; line-height: 1; }
.dz-dot { color: var(--gold); font-size: 7px; }
.dz-label { font-family: var(--display); font-size: 10px; letter-spacing: .25em; }
.designer img { height: 15px; width: auto; transition: filter .3s, transform .3s var(--ease); }
.designer:hover, .designer:focus-visible { opacity: 1; }
.designer:hover img, .designer:focus-visible img { filter: drop-shadow(0 0 6px rgba(230,199,123,.8)); transform: translateY(-1px); }
.designer:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
@media (max-width: 760px) {
  #footer .foot-bottom { flex-direction: column; text-align: center; }
  .dz-label { font-size: 9px; letter-spacing: .16em; } .designer img { height: 13px; }
}
