/* Home page — Sunrise Pure "Swadkahon" design */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fcc80a;
  font-family: "Poppins", Arial, sans-serif;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }

/* ---------- Desktop / landscape: fills the whole window ----------
   --u = 1% of the artboard width at the reference 2:1 ratio; it shrinks with
   the height on wide screens so logos never get too big or overlap. */
.stage {
  --u: min(1vw, 2vh);
  --lu: min(1.25vw, 2vh);   /* centre logo can grow a bit on 4:3 / 16:10 screens */
  position: relative;
  width: 100%;
  height: 100vh; height: 100svh;
  min-height: 320px;
  background: url("../images/home/bg.webp") center / 100% 100% no-repeat;
  overflow: hidden;
}

.stage > * { position: absolute; }

/* Ornamental border used on portrait screens (desktop BG image has its own frame) */
.hm-frame { display: none; inset: 0; z-index: 5; pointer-events: none; }
.hm-frame i { position: absolute; display: block; }
.hm-frame .t { top: 6px; left: 6px; right: 6px; height: 16px;
  background: url("../images/home/frame-top.webp") center top / 240px 16px repeat-x; }
.hm-frame .l, .hm-frame .r { top: 22px; bottom: 0; width: 16px; background-repeat: repeat-y; background-size: 16px 240px; }
.hm-frame .l { left: 6px;  background-image: url("../images/home/frame-left.webp"); }
.hm-frame .r { right: 6px; background-image: url("../images/home/frame-right.webp"); }

.chadmala    { top: 4.5%;  height: calc(var(--u) * 22); width: auto; }
.chadmala-l  { left: 4%; }
.chadmala-r  { right: 4%; }
.itc         { top: 8%;    left: calc(4% + var(--u) * 6.6); width: calc(var(--u) * 7); }
.sunrise     { top: 7.5%;  right: calc(4% + var(--u) * 6.6); width: calc(var(--u) * 12); }

.swoosh      { left: 0; bottom: 0; width: 82%; height: auto; z-index: 1; }
/* lotus scales with the width exactly like the swoosh, so it always sits inside the red wave */
.lotus       { left: 6%;   bottom: 0;  width: 63%; z-index: 2; pointer-events: none; }
.kashful     { right: 2%;  bottom: 4%;  width: calc(var(--u) * 15); z-index: 2; pointer-events: none; }

.logo        { margin: 0; top: 10%;   left: 50%;   width: calc(var(--lu) * 43); transform: translateX(-50%); z-index: 3; }

.actions {
  left: 50%; bottom: 7%;
  transform: translateX(-50%);
  display: flex; gap: 2.5vw;
  z-index: 4;
}
.actions a img { width: clamp(140px, calc(var(--lu) * 15), 280px); transition: transform .2s ease, filter .2s ease; }
.actions a:hover img,
.actions a:focus-visible img { transform: translateY(-3px) scale(1.03); filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }

.terms {
  left: 50%; bottom: max(6px, 1.6%); transform: translateX(-50%);
  z-index: 4; margin: 0;
  font-size: 12px; font-weight: 600; letter-spacing: .6px; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.terms a { color: #fff; text-decoration: none; }
.terms a:hover { text-decoration: underline; }

/* ---------- Mobile / portrait: stacked layout ---------- */
@media (max-aspect-ratio: 1/1) {
  .stage {
    aspect-ratio: auto;
    width: 100%; height: auto;
    min-height: 100vh; min-height: 100svh;
    max-height: none;
    background:
      radial-gradient(ellipse 90% 30% at 50% 18%, rgba(255, 246, 170, .95), rgba(255, 246, 170, 0) 70%),
      linear-gradient(180deg, #fde047 0%, #fcc80a 45%, #f9b908 100%);
    display: flex; flex-direction: column; align-items: center;
    padding: 0 30px;
  }
  .hm-frame   { display: block; }
  /* hangings sit just under the top border, inside the side borders */
  .chadmala   { top: 20px; height: min(22vh, 150px); }
  .chadmala-l { left: 26px; }
  .chadmala-r { right: 26px; }
  /* logos sit inside the frame, clear of the hangings */
  .itc        { top: 38px; left: max(15%, 76px);  width: min(15%, 80px); }
  .sunrise    { top: 34px; right: max(15%, 76px); width: min(24%, 120px); }

  .logo, .actions { position: relative; left: auto; top: auto; bottom: auto; transform: none; }
  /* centre logo starts just below the Sunrise logo (top 34px + its height) */
  .logo    { width: 92%; max-width: min(480px, 36vh); margin-top: calc(34px + min(24vw, 120px) * 1.23 + 10px); }
  .actions { flex-direction: column; align-items: center; gap: 10px; margin: 18px 0 calc(var(--wave-h) + 40px); }
  .actions a img { width: min(64vw, 270px, 34vh); }

  /* Bottom scene: red wave with the lotus inside it, kash inside the right border, links below */
  .stage   { --wave-h: clamp(150px, 40vw, 240px); }
  /* like the reference: wave narrows to the right, lotus stem runs down to the bottom edge,
     kash grows from the yellow bottom-right corner */
  .swoosh  { width: 90%; height: var(--wave-h); }
  /* flower sits in the red wave; the stem is tilted so it curves down to the bottom edge */
  .lotus   { --lw: min(125vw, 640px);
             left: 14px; bottom: calc(var(--wave-h) * .74 - var(--lw) / 3.97);
             width: var(--lw); max-width: none;
             transform: rotate(13deg); transform-origin: 6% 18%; }
  .kashful { right: 22px; bottom: 0; width: min(34%, 200px); }
  /* links sit just above the wave, on the yellow */
  .terms   { bottom: calc(var(--wave-h) + 8px); text-shadow: none; }
  .terms a { color: #8b1a14; }
}
