/* ─────────────────────────────────────────────────────────────
   اجمع واربح مع حليب ندى — single-screen kids campaign page
   Fits one viewport on desktop; compacts gracefully on phones.
   ───────────────────────────────────────────────────────────── */

:root {
  --blue:       #1170cf;
  --blue-dark:  #0a4c91;
  --navy:       #062e5c;
  --sky:        #bfe3ff;
  --yellow:     #ffcc22;
  --pink:       #ff5fa2;
  --green:      #34c46a;
  --purple:     #8b5cf6;
  --orange:     #ff8a3d;
  --white:      #fff;

  --display: 'Baloo Bhaijaan 2', 'Cairo', system-ui, sans-serif;
  --body:    'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--navy);
  background: linear-gradient(170deg, #d8efff 0%, #a9d9ff 45%, #7dc4ff 100%);
  overflow: hidden;                     /* one screen, no scrollbar */
}

img, svg { display: block; max-width: 100%; }

/* ── Stage ────────────────────────────────────────────────── */

.stage {
  position: relative;
  height: 100dvh;
  display: grid;
  /* minmax(0,1fr): the middle row may shrink, so the phone number in the
     bottom bar can never be pushed off the screen by long copy */
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(.6rem, 1.6vh, 1.4rem) clamp(1rem, 3vw, 2.5rem);
  isolation: isolate;
  overflow-x: clip;          /* the cast must never cause sideways scroll */
}

/* soft sun-glow behind everything */
.stage::before {
  content: '';
  position: absolute; inset: 0; z-index: -3;
  background: radial-gradient(60rem 34rem at 50% 4%, rgba(255,255,255,.85), transparent 62%);
  pointer-events: none;
}

/* ── Floating bubbles ─────────────────────────────────────── */

.bubbles { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bubbles span {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  animation: rise linear infinite;
}
.bubbles span:nth-child(1) { width: 46px; height: 46px; left:  6%; bottom: -60px; animation-duration: 17s; }
.bubbles span:nth-child(2) { width: 22px; height: 22px; left: 18%; bottom: -60px; animation-duration: 13s; animation-delay: -4s; }
.bubbles span:nth-child(3) { width: 64px; height: 64px; left: 31%; bottom: -80px; animation-duration: 21s; animation-delay: -9s; }
.bubbles span:nth-child(4) { width: 30px; height: 30px; left: 47%; bottom: -60px; animation-duration: 15s; animation-delay: -2s; }
.bubbles span:nth-child(5) { width: 52px; height: 52px; left: 62%; bottom: -70px; animation-duration: 19s; animation-delay: -12s; }
.bubbles span:nth-child(6) { width: 26px; height: 26px; left: 74%; bottom: -60px; animation-duration: 12s; animation-delay: -6s; }
.bubbles span:nth-child(7) { width: 40px; height: 40px; left: 86%; bottom: -60px; animation-duration: 16s; animation-delay: -15s; }
.bubbles span:nth-child(8) { width: 18px; height: 18px; left: 94%; bottom: -60px; animation-duration: 11s; animation-delay: -8s; }

@keyframes rise {
  0%   { transform: translateY(0) scale(.9);        opacity: 0; }
  12%  {                                            opacity: .7; }
  85%  {                                            opacity: .5; }
  100% { transform: translateY(-115dvh) scale(1.1); opacity: 0; }
}

/* ── Characters ───────────────────────────────────────────── */

.char {
  height: clamp(200px, 48dvh, 430px);
  width: auto;
  filter: drop-shadow(0 14px 26px rgba(6, 46, 92, .3));
  animation: bob 5.5s ease-in-out infinite;
}
/* بسمة stands still — the rope is part of her image and cannot turn, so any
   vertical motion makes the rope look stuck rather than skipped */
.char-basma {
  position: absolute; bottom: 0; z-index: -1;
  inset-inline-end: clamp(-1rem, 1vw, 3rem);
  animation: none;
}
.char-hamoudi {
  position: absolute; bottom: 0; z-index: -1;
  inset-inline-start: clamp(-1rem, 1vw, 3rem);
  animation-delay: -2.6s;
}

@keyframes bob {
  0%, 100% { transform: translateY(0)     rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(-1.2deg); }
}

/* ── حمودي's football ─────────────────────────────────────────
   Three nested layers so the motions compose cleanly:
     .ball-track → travels across the full width
     .ball-hop   → jumps up and down (with squash on landing)
     .ball       → spins
   ─────────────────────────────────────────────────────────── */

.ball-track {
  position: absolute; z-index: -1;
  left: 0; bottom: clamp(.4rem, 1.6dvh, 1.2rem);
  width: clamp(34px, 6dvh, 58px);
  animation: ball-travel 15s linear infinite alternate;
}
.ball-hop { animation: ball-hop 1.15s cubic-bezier(.35, 0, .65, 1) infinite; }
.ball {
  width: 100%; height: auto;
  filter: drop-shadow(0 5px 9px rgba(6, 46, 92, .35));
  animation: ball-spin 2.3s linear infinite;
}

@keyframes ball-travel {
  from { transform: translateX(2vw); }
  to   { transform: translateX(calc(100vw - 100% - 4vw)); }
}
@keyframes ball-hop {
  0%   { transform: translateY(0)     scaleY(.88) scaleX(1.12); }
  10%  { transform: translateY(-18%)  scaleY(1)   scaleX(1); }
  50%  { transform: translateY(-150%) scaleY(1.04) scaleX(.97); }
  90%  { transform: translateY(-18%)  scaleY(1)   scaleX(1); }
  100% { transform: translateY(0)     scaleY(.88) scaleX(1.12); }
}
@keyframes ball-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Bars ─────────────────────────────────────────────────── */

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* the logo sits on a white plate so it reads clearly against the blue sky */
.logo-plate {
  display: grid; place-items: center;
  padding: clamp(.3rem, .9dvh, .55rem) clamp(.5rem, 1.4vw, .9rem);
  background: #fff;
  border-radius: 22px;
  box-shadow:
    0 8px 22px rgba(6, 46, 92, .22),
    0 2px 6px rgba(6, 46, 92, .12);
}
.brand {
  height: clamp(52px, 9dvh, 88px); width: auto;
  display: block;
}

/* big, unmissable phone CTA */
.call {
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--yellow); color: var(--navy);
  padding: .45em 1.5em .5em; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 0 #d9a600, 0 12px 26px rgba(6, 46, 92, .26);
  transition: transform .15s ease, box-shadow .15s ease;
}
.call:hover { transform: translateY(3px); box-shadow: 0 3px 0 #d9a600, 0 8px 18px rgba(6,46,92,.24); }
.call svg {
  width: clamp(1.5rem, 3.4dvh, 2rem); height: clamp(1.5rem, 3.4dvh, 2rem);
  fill: none; stroke: var(--navy); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.call-txt { display: flex; flex-direction: column; line-height: 1.15; }
.call small {
  font-family: var(--body); font-weight: 700;
  font-size: clamp(.68rem, 1.5dvh, .85rem);
  color: #6b4d00;
}
.call strong {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.25rem, 3.4dvh, 1.9rem);
  letter-spacing: 1.5px;
}

/* ── Core content ─────────────────────────────────────────── */

.core {
  align-self: center;
  justify-self: center;
  min-height: 0;
  width: min(760px, 100%);
  text-align: center;
  display: flex; flex-direction: column;
  gap: clamp(.4rem, 1.3dvh, .95rem);
  padding-block: clamp(.3rem, 1.2dvh, .8rem);
}

.eyebrow {
  margin: 0; align-self: center;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(.72rem, 1.7dvh, .95rem);
  color: var(--blue-dark);
  background: rgba(255, 255, 255, .72);
  padding: .25em 1.1em; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(6, 46, 92, .12);
}

h1 {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.75rem, 6.4dvh, 3.7rem);
  line-height: 1.1;
  color: var(--white);
  text-shadow:
     0 3px 0 var(--blue-dark),
     0 6px 16px rgba(6, 46, 92, .32);
}
h1 span { display: block; color: var(--yellow); text-shadow: 0 3px 0 #b06d00, 0 6px 16px rgba(6,46,92,.3); }

.lede {
  margin: 0 auto;
  max-width: 52ch;
  font-size: clamp(.85rem, 1.95dvh, 1.1rem);
  font-weight: 600; line-height: 1.7;
  color: #0d3f70;
}
.lede b { color: var(--blue-dark); background: rgba(255,255,255,.6); padding: 0 .25em; border-radius: 5px; }

/* ── The two ways to win ──────────────────────────────────── */

.ways {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: clamp(.4rem, 1.4vw, 1rem);
}

/* Floating premium panels. Spacing is expressed as clamp(min, dvh, spec-max)
   so the spec's 32px rhythm lands at full size while the page keeps its
   one-screen promise on shorter windows. */
.way {
  --accent: var(--pink);
  --accent-glow: rgba(255, 95, 162, .38);

  position: relative;
  display: flex; flex-direction: column;
  gap: clamp(.5rem, 2.3dvh, 1.75rem);              /* 28px title → description */
  padding: clamp(1.1rem, 3.6dvh, 2rem) clamp(.9rem, 2.2vw, 2rem);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(247, 251, 255, .92) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
          backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, .95);
  border-top: 4px solid var(--accent);
  border-radius: 32px;
  box-shadow:
    0 18px 50px rgba(25, 70, 140, .15),
    0 6px 20px rgba(25, 70, 140, .08),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .25s ease, box-shadow .25s ease;
}
.way-open { --accent: var(--green); --accent-glow: rgba(52, 196, 106, .34); }

@media (hover: hover) {
  .way:hover {
    transform: translateY(-6px);
    box-shadow:
      0 28px 64px rgba(25, 70, 140, .2),
      0 10px 26px rgba(25, 70, 140, .12),
      inset 0 1px 0 rgba(255, 255, 255, .9);
  }
}

/* decorative outlines, behind the content */
.deco {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  border-radius: inherit;
  opacity: .045;
  fill: none; stroke: var(--navy); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.deco .fill { fill: var(--navy); stroke: none; }
/* lift content above .deco — .tag excluded, it keeps its own absolute position */
.way > :not(.deco, .tag) { position: relative; z-index: 1; }

/* the label sits half over the card's top edge, like an attached tab */
.tag {
  position: absolute; top: -.8em; inset-inline-start: 50%;
  transform: translateX(50%);
  white-space: nowrap;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(.65rem, 1.5dvh, .8rem);
  color: #fff; background: var(--accent);
  padding: .22em 1.15em; border-radius: 999px;
  z-index: 2;
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow:
    0 6px 16px var(--accent-glow),
    0 1px 0 rgba(255, 255, 255, .6) inset;
}

.way h2 {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.05rem, 2.9dvh, 1.65rem);
  color: var(--blue-dark);
}
/* hairline divider under the title */
.way h2::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: clamp(.45rem, 1.8dvh, 1.1rem);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .08), transparent);
}

.way-body {
  margin: 0;
  font-size: clamp(.8rem, 2dvh, 1.1rem);
  font-weight: 600; line-height: 1.6; color: #40607f;
}
.way-body b { color: var(--blue-dark); }

/* reward panel */
.way-win {
  margin: auto 0 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(.9rem, 2.25dvh, 1.22rem);
  color: #6b4400;
  background: linear-gradient(180deg, #FFEFA8 0%, #FFD86A 100%);
  border-radius: 20px;
  padding: clamp(.5rem, 1.9dvh, 1rem) clamp(.6rem, 1.4vw, 1rem);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(176, 122, 0, .18),
    0 4px 14px rgba(214, 158, 0, .22);
}
.way-win b { color: #5a3800; }

/* the أو between the two cards */
.or {
  align-self: center;
  display: grid; place-items: center;
  width: clamp(2.1rem, 5dvh, 2.8rem); aspect-ratio: 1;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(.85rem, 2dvh, 1.1rem);
  color: var(--navy); background: var(--yellow);
  border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(6, 46, 92, .25);
}

/* prize chips, in their own reward panel */
.prizes {
  list-style: none; margin: auto 0 0;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(.25rem, .7vw, .42rem);
  padding: clamp(.45rem, 1.6dvh, .85rem) clamp(.5rem, 1.2vw, .85rem);
  background: linear-gradient(180deg, #FFEFA8 0%, #FFD86A 100%);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(176, 122, 0, .18),
    0 4px 14px rgba(214, 158, 0, .22);
}
.prizes li {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(.7rem, 1.6dvh, .88rem);
  color: #fff;
  padding: .26em .85em; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .14), 0 5px 12px rgba(6, 46, 92, .2);
  animation: wiggle 4s ease-in-out infinite;
}
.pop-1 { background: var(--pink);   animation-delay: 0s; }
.pop-2 { background: var(--green);  animation-delay: -.6s; }
.pop-3 { background: var(--blue);   animation-delay: -1.2s; }
.pop-4 { background: var(--purple); animation-delay: -1.8s; }
.pop-5 { background: var(--orange); animation-delay: -2.4s; }
.pop-6 { background: #0fb5c9;       animation-delay: -3s; }

@keyframes wiggle {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(1.5deg); }
}

/* QR note */
.qr {
  margin: 0 auto; max-width: 60ch;
  font-size: clamp(.72rem, 1.65dvh, .9rem);
  font-weight: 600; line-height: 1.65;
  color: #0d3f70;
  background: rgba(255, 255, 255, .55);
  border: 2px dashed rgba(17, 112, 207, .45);
  border-radius: 14px;
  padding: .5em 1em;
}
.qr b { color: var(--pink); }

/* ── Bottom bar ───────────────────────────────────────────── */

.bar-end { justify-content: center; gap: clamp(.7rem, 2.4vw, 1.6rem); flex-wrap: wrap; }

.winners {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(.72rem, 1.7dvh, .95rem);
  color: var(--navy);
  background: rgba(255, 255, 255, .78);
  padding: .3em 1em; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(6, 46, 92, .12);
}
.winners b { color: var(--blue-dark); }

.social { list-style: none; margin: 0; padding: 0; display: flex; gap: .45rem; }
.social a {
  display: grid; place-items: center;
  width: clamp(2rem, 4.4dvh, 2.5rem); height: clamp(2rem, 4.4dvh, 2.5rem);
  background: #fff; border-radius: 50%;
  box-shadow: 0 4px 10px rgba(6, 46, 92, .2);
  transition: transform .15s ease;
}
.social a:hover { transform: translateY(-3px) scale(1.06); }
.social svg {
  width: 58%; height: 58%;
  fill: none; stroke: var(--blue); stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Medium widths: shrink the cast so cards never clip a face ── */

@media (max-width: 1400px) {
  .char { height: clamp(200px, 42dvh, 370px); }
  .core { width: min(700px, 100%); }
}

/* ── Phones and tablets ───────────────────────────────────────
   This page is scanned off a milk carton, so the phone view is the
   main view: it also has to hold everything on one screen. Sizes
   stay in dvh so they shrink with the window instead of overflowing,
   and the page is left scrollable purely as a safety valve on
   unusually short or zoomed-in viewports — there is normally
   nothing below the fold to scroll to.
   ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  body { overflow-x: hidden; overflow-y: auto; }
  .stage { height: auto; min-height: 100dvh; }
  .core { width: 100%; }
  .char { height: clamp(160px, 29dvh, 290px); }
}

/* stack the two ways once they'd get too narrow to read side by side */
@media (max-width: 760px) {
  .ways { grid-template-columns: 1fr; gap: clamp(.5rem, 1.6dvh, 1rem); }
  .or { justify-self: center; }
  .way-win, .prizes { margin-top: .3rem; }
  .way { padding: clamp(.85rem, 2.2dvh, 1.2rem) .9rem clamp(.6rem, 1.5dvh, .9rem); }
}

@media (max-width: 620px) {
  .stage { padding-inline: .7rem; }
  .core { gap: clamp(.3rem, .9dvh, .6rem); padding-block: clamp(.3rem, 1dvh, .7rem); }

  /* keep the header on one line */
  .winners span { display: none; }
  .winners { font-size: clamp(.62rem, 1.4dvh, .76rem); }
  .brand { height: clamp(40px, 6.4dvh, 58px); }
  .logo-plate { padding: .25rem .45rem; border-radius: 16px; }

  .eyebrow { font-size: clamp(.66rem, 1.4dvh, .8rem); padding: .2em .9em; }
  h1 { font-size: clamp(1.55rem, 5dvh, 2.3rem); }
  .lede { font-size: clamp(.74rem, 1.65dvh, .9rem); }

  /* the two ways stay the hero of the page, just tighter */
  .ways { gap: clamp(.4rem, 1dvh, .7rem); }
  .way {
    padding: clamp(.8rem, 2.1dvh, 1.1rem) .85rem clamp(.55rem, 1.4dvh, .8rem);
    gap: clamp(.25rem, .8dvh, .5rem);
    border-radius: 26px;
  }
  .way h2   { font-size: clamp(.92rem, 2.15dvh, 1.15rem); }
  .way h2::after { margin-top: clamp(.3rem, .9dvh, .5rem); }
  .way-body { font-size: clamp(.74rem, 1.7dvh, .92rem); line-height: 1.5; }
  .way-win  { font-size: clamp(.82rem, 1.95dvh, 1.02rem); padding: .4em .6em; border-radius: 16px; }
  .prizes   { padding: .4rem .45rem; border-radius: 16px; }
  .or { width: clamp(1.75rem, 3.6dvh, 2.2rem); font-size: clamp(.75rem, 1.7dvh, .95rem); }
  .prizes { gap: .22rem; }
  .prizes li { font-size: clamp(.62rem, 1.4dvh, .76rem); padding: .2em .65em; }

  .qr { font-size: clamp(.64rem, 1.4dvh, .78rem); padding: .35em .7em; line-height: 1.55; }

  /* the cast tucks into the corners, clear of the phone number */
  .char { height: clamp(130px, 21dvh, 210px); }
  .char-basma   { inset-inline-end: 0; }
  .char-hamoudi { inset-inline-start: 0; }
  .ball-track { width: clamp(24px, 4dvh, 38px); }

  /* footer must stay a single row so the number is never pushed down */
  .bar-end { flex-wrap: nowrap; gap: .5rem; }
  .call { padding: .35em 1em .4em; gap: .45rem; }
  .call svg    { width: clamp(1.2rem, 2.6dvh, 1.5rem); height: clamp(1.2rem, 2.6dvh, 1.5rem); }
  .call small  { font-size: clamp(.6rem, 1.3dvh, .72rem); }
  .call strong { font-size: clamp(1.05rem, 2.6dvh, 1.4rem); letter-spacing: .5px; }
  .social { gap: .35rem; }
  .social a { width: clamp(1.7rem, 3.6dvh, 2.1rem); height: clamp(1.7rem, 3.6dvh, 2.1rem); }
}

/* shorter phones — shed decoration, in order of expendability, to keep
   everything above the fold. Essentials (the two ways + the phone number)
   are the last things to give ground. */

@media (max-width: 620px) and (max-height: 820px) {
  .way h2::after { display: none; }            /* the hairline dividers go first */
  .brand { height: clamp(34px, 5.4dvh, 46px); }
  .logo-plate { padding: .2rem .4rem; border-radius: 14px; }
}

@media (max-width: 620px) and (max-height: 700px) {
  .eyebrow { display: none; }
  .way { padding: .6rem .75rem .5rem; }
  .prizes { padding: .3rem .35rem; }
}

/* very narrow phones — text wraps onto more lines, so step the type down */
@media (max-width: 380px) {
  h1 { font-size: clamp(1.4rem, 4.6dvh, 2rem); }
  .lede { font-size: clamp(.68rem, 1.5dvh, .82rem); }
  .way-body { font-size: clamp(.7rem, 1.6dvh, .86rem); }
  .way-win { font-size: clamp(.76rem, 1.8dvh, .95rem); }
  .prizes li { font-size: clamp(.58rem, 1.3dvh, .7rem); padding: .18em .6em; }
  .qr { font-size: clamp(.6rem, 1.3dvh, .72rem); }
  .call strong { font-size: clamp(.95rem, 2.4dvh, 1.25rem); }
  .call small { font-size: clamp(.55rem, 1.2dvh, .66rem); }
}

/* smallest devices still in use (320×568) — last squeeze */
@media (max-width: 380px) and (max-height: 620px) {
  h1 { font-size: clamp(1.25rem, 4.2dvh, 1.7rem); }
  .core { gap: .25rem; }
  .ways { gap: .35rem; }
  .way { padding: .5rem .6rem .45rem; }
  .qr { line-height: 1.35; padding: .28em .5em; font-size: .58rem; }
  .prizes { padding: .25rem .3rem; }
  .prizes li { font-size: .55rem; padding: .16em .5em; }
  .social a { width: 1.55rem; height: 1.55rem; }
  .stage { padding-block: .35rem; }
}

/* ── Accessibility ────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .char, .prizes li, .bubbles span,
  .ball-track, .ball-hop, .ball { animation: none; }
}

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
