/* FUNKOUSH — coming soon */

:root {
  --cocoa: #2a150c;
  --chocolate: #3a1d12;
  --truffle: #55301f;
  --cream: #f8ead3;
  --caramel: #f1c56f;
  --caramel-deep: #e3ad4a;
  --blush: #f6c3bd;

  --display: "Baloo Bhaijaan 2", "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --body: "Readex Pro", "Segoe UI", Tahoma, sans-serif;

  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --stage: min(84vw, 44svh, 26rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pop: cubic-bezier(0.34, 1.45, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--truffle) 0%, var(--chocolate) 55%, var(--cocoa) 100%)
    var(--chocolate);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* tilted and drifting pieces may poke past the edge; never let them scroll the page */
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p,
h1,
figure {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--blush);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1rem, 2.4vw, 1.75rem) var(--gutter);
  padding-bottom: max(clamp(1rem, 2.4vw, 1.75rem), env(safe-area-inset-bottom));
  max-width: 96rem;
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fade 0.8s var(--ease) both;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.hero {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(1.25rem, 3.5svh, 2.25rem);
  padding-block: clamp(1rem, 3svh, 2rem);
  text-align: center;
}

.copy {
  order: 2;
  display: grid;
  justify-items: center;
  max-width: 34rem;
}

.stage {
  order: 1;
}

/* ---------- Language toggle ---------- */

.lang {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgb(248 234 211 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(248 234 211 / 0.16);
}

.lang__btn {
  appearance: none;
  border: 0;
  margin: 0;
  min-height: 2.25rem;
  padding: 0.25rem 0.95rem;
  border-radius: 999px;
  background: transparent;
  color: rgb(248 234 211 / 0.75);
  font: 500 0.875rem/1 var(--body);
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.lang__btn:hover {
  color: var(--cream);
}

.lang__btn[aria-pressed="true"] {
  background: var(--cream);
  color: var(--cocoa);
}

/* ---------- Copy ---------- */

.headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.35rem, 10.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--cream);
  text-wrap: balance;
  animation: rise 0.9s var(--ease) 0.35s both;
}

html[lang="ar"] .headline {
  line-height: 1.28;
  letter-spacing: 0;
}

/* script.js splits the headline into words and staggers them */
.headline.is-split {
  animation: none;
}

.word {
  display: inline-block;
  animation: word 0.8s var(--ease) both;
  animation-delay: calc(var(--from, 0.35s) + var(--i) * 0.08s);
}

.sub {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  line-height: 1.3;
  color: var(--caramel);
  animation: rise 0.8s var(--ease) 0.75s both;
}

html[lang="ar"] .sub {
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */

.cta {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 21rem);
  margin-top: clamp(1.25rem, 3svh, 2rem);
  animation: rise 0.8s var(--ease) 0.95s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--body);
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform 0.35s var(--ease),
    background-color 0.35s var(--ease),
    color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.btn__icon {
  flex: none;
  transition: transform 0.45s var(--pop);
}

.btn--primary {
  background: var(--caramel);
  color: var(--cocoa);
  box-shadow: 0 0.35rem 0 var(--caramel-deep), 0 1rem 1.6rem rgb(0 0 0 / 0.28);
}

.btn--ghost {
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgb(248 234 211 / 0.45);
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-3px);
  }

  .btn:hover .btn__icon {
    transform: rotate(-10deg) scale(1.12);
  }

  .btn--primary:hover {
    background: #f6d188;
    box-shadow: 0 0.55rem 0 var(--caramel-deep), 0 1.4rem 2rem rgb(0 0 0 / 0.3);
  }

  .btn--ghost:hover {
    background: var(--cream);
    color: var(--cocoa);
    box-shadow: inset 0 0 0 1.5px var(--cream);
  }
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary:active {
  box-shadow: 0 0.15rem 0 var(--caramel-deep), 0 0.6rem 1rem rgb(0 0 0 / 0.28);
}

/* ---------- Stage: disc, photo arch, mascot, sticker ----------
   Physical left/right on purpose: the mascot and photo are not mirrored in RTL. */

.stage {
  position: relative;
  width: var(--stage);
  aspect-ratio: 1;
  flex: none;
}

.stage__disc {
  position: absolute;
  left: 3%;
  top: 9%;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #f8d992, var(--caramel) 55%, var(--caramel-deep));
  animation: disc 1s var(--ease) both;
}

.arch {
  position: absolute;
  right: 0;
  top: 2%;
  width: 47%;
  aspect-ratio: 0.76;
  rotate: 4deg;
  border: clamp(4px, 1.1vw, 8px) solid var(--cream);
  border-radius: 999px 999px 1.5rem 1.5rem;
  overflow: hidden;
  background: var(--truffle);
  box-shadow: 0 1.5rem 2.5rem rgb(20 8 3 / 0.4);
  animation: arch 1s var(--ease) 0.15s both;
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* frame the jar; the mascot's place in the scene is taken by the cut-out */
  object-position: 100% 50%;
}

.stage__shadow {
  position: absolute;
  left: 13%;
  bottom: 1.5%;
  width: 50%;
  height: 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(42 21 12 / 0.55), rgb(42 21 12 / 0));
  animation: fade 0.8s var(--ease) 0.6s both, shadow 6s ease-in-out 1.4s infinite;
}

.mascot {
  position: absolute;
  left: -7%;
  bottom: -3%;
  width: 82%;
  animation: pop 0.9s var(--pop) 0.35s both;
}

.mascot img {
  width: 100%;
  filter: drop-shadow(0 0.9rem 1.1rem rgb(42 21 12 / 0.3));
  animation: float 6s ease-in-out 1.4s infinite;
}

.sticker {
  position: absolute;
  right: 1%;
  bottom: 7%;
  padding: 0.5em 1em;
  white-space: nowrap;
  rotate: -5deg;
  border-radius: 999px;
  background: var(--blush);
  color: var(--cocoa);
  font: 600 clamp(0.72rem, 2.9vw, 0.95rem)/1.35 var(--body);
  text-align: center;
  box-shadow: 0 0.5rem 1rem rgb(20 8 3 / 0.3);
  animation: stamp 0.6s var(--pop) 1.05s both;
}

.flake {
  position: absolute;
  width: clamp(8px, 2.6%, 14px);
  height: clamp(3px, 0.9%, 5px);
  border-radius: 999px;
  background: var(--cream);
  opacity: 0.9;
  animation: fade 1s var(--ease) 1.2s both, drift 7s ease-in-out 1.2s infinite;
}

.flake--1 { left: 1%;  top: 14%; rotate: 28deg; }
.flake--2 { left: 30%; top: 1%;  rotate: -40deg; animation-delay: 1.3s, 2.1s; }
.flake--3 { left: -4%; top: 52%; rotate: 70deg;  animation-delay: 1.4s, 3s; }
.flake--4 { right: 4%; top: 68%; rotate: -18deg; animation-delay: 1.5s, 1.6s; }
.flake--5 { left: 44%; bottom: -3%; rotate: 12deg; animation-delay: 1.6s, 3.6s; }

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: rgb(248 234 211 / 0.72);
  animation: fade 0.8s var(--ease) 1.2s both;
}

/* ---------- Tablet ---------- */

@media (min-width: 600px) {
  :root {
    --stage: min(62vw, 46svh, 30rem);
  }

  .cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }

  .headline {
    font-size: clamp(3.2rem, 8vw, 4.25rem);
  }
}

/* ---------- Laptop and desktop: copy beside the stage ---------- */

@media (min-width: 960px) {
  :root {
    --stage: min(43vw, 72svh, 40rem);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    gap: clamp(2rem, 5vw, 5rem);
    text-align: start;
  }

  .copy {
    order: 1;
    justify-items: start;
    max-width: 46rem;
  }

  .cta {
    justify-content: flex-start;
  }

  .stage {
    order: 2;
    margin-inline-end: 2%;
  }

  .headline {
    font-size: clamp(3.4rem, 5.6vw, 5.75rem);
  }

  .sub {
    font-size: clamp(1.5rem, 2.1vw, 2rem);
  }

  .sticker {
    font-size: clamp(0.85rem, 1.05vw, 1.05rem);
  }
}

/* Laptop: narrower copy column, keep both buttons on one row */
@media (min-width: 960px) and (max-width: 1199px) {
  :root {
    --stage: min(40vw, 72svh, 40rem);
  }

  .hero {
    gap: 2rem;
  }

  .btn {
    gap: 0.5rem;
    padding-inline: 1.1rem;
    font-size: 0.9375rem;
  }
}

/* Short landscape screens: keep everything on one screen */
@media (min-width: 960px) and (max-height: 640px) {
  .headline {
    font-size: clamp(2.8rem, 4.4vw, 4rem);
  }
}

@media (max-width: 359px) {
  .lang__btn {
    padding-inline: 0.7rem;
  }

  .btn {
    padding-inline: 1rem;
    font-size: 0.9375rem;
  }
}

/* ---------- Motion ---------- */

@keyframes fade {
  from { opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(1.1rem); }
}

@keyframes word {
  from { opacity: 0; transform: translateY(0.55em) rotate(3deg); }
}

@keyframes disc {
  from { opacity: 0; transform: scale(0.7); }
}

@keyframes arch {
  from { opacity: 0; transform: translateY(2.5rem) rotate(-6deg); }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(1.5rem) scale(0.86); }
}

@keyframes stamp {
  from { opacity: 0; transform: scale(1.5); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2.2%) rotate(-1.2deg); }
}

@keyframes shadow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.88); opacity: 0.7; }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(4px, -9px) rotate(14deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
