/* =========================================================
   Win AED 50,000 worth of Gold Coins this Diwali — nesto x Unilever
   Layout is built on the 1080 x 1920 artboard:
   1 design pixel  =  var(--u)  =  page width / 1080
   ========================================================= */

@font-face {
  /* Drop the brand font files into assets/fonts/ to use the exact typeface */
  font-family: "Unilever Shilling";
  src: local("Unilever Shilling"), local("UnileverShilling-Regular"),
       url("../fonts/UnileverShilling-Regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Unilever Shilling";
  src: local("Unilever Shilling Medium"), local("UnileverShilling-Md"),
       url("../fonts/UnileverShilling-Medium.woff2") format("woff2");
  font-weight: 500 600; font-display: swap;
}
@font-face {
  font-family: "Unilever Shilling";
  src: local("Unilever Shilling Bold"), local("UnileverShilling-Bd"),
       url("../fonts/UnileverShilling-Bold.woff2") format("woff2");
  font-weight: 700 800; font-display: swap;
}

:root {
  --maroon: #351021;
  --cream: #f9f6e5;
  --cream-line: #ecdfc7;
  --yellow: #ffe06b;
  --blue-text: #388ccc;
  --card-fill: #e6f5fc;
  --err: #d0263b;
  --font: "Unilever Shilling", "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--maroon);
  background: #0574c4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* desktop: blurred campaign backdrop around the mobile artboard */
body::before {
  content: "";
  position: fixed; inset: -40px;
  background: #0574c4 url("../img/bg.jpg") center / cover no-repeat;
  filter: blur(28px) saturate(1.1) brightness(.85);
  z-index: -1;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- artboard ---------- */
.app {
  container-type: inline-size;
  width: min(100vw, max(420px, calc(100svh * 1080 / 1920)));
  margin: 0 auto;
}
.stage {
  --u: calc(100cqw / 1080);
  position: relative;
  display: flex; flex-direction: column;
  min-height: max(100svh, calc(var(--u) * 1920));
  overflow: hidden;
  background:
    url("../img/bg.jpg") center bottom / 100% auto no-repeat,
    url("../img/bg-top.jpg") center top / 100% 100% no-repeat,
    #0a86d6;
  box-shadow: 0 0 60px rgba(0, 30, 80, .35);
}
.lights {
  position: absolute; left: 0; top: 0; z-index: 1;
  width: calc(var(--u) * 434);
  mix-blend-mode: screen; opacity: .89;
  pointer-events: none;
}
.header {
  position: relative; z-index: 5;
  padding-top: calc(var(--u) * 142);
  pointer-events: none;
}
.header h1 { margin: 0; }
.headline { width: calc(var(--u) * 526); margin: 0 auto; }

.main {
  position: relative; z-index: 3;
  flex: 1 0 auto;
  display: flex; flex-direction: column;
}
/* products, podium & brand logos are part of bg.jpg — keep that space free */
.podium-space { flex: 0 0 calc(var(--u) * 665); }

.screen {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  margin: auto 0;
  /* design offsets inside the 492 → 1255 content band (below the headline) */
  padding-top: calc(var(--u) * var(--pt, 0));
  padding-bottom: calc(var(--u) * var(--pb, 0));
  animation: screenIn .45s ease both;
}
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   FORM
   ========================================================= */
.screen--form { --pt: 11; --pb: 8; }
.form-card {
  position: relative;
  width: max(calc(var(--u) * 739), min(calc(100% - 24px), 372px));
  background: #fff;
  border: max(calc(var(--u) * 2), 1.5px) solid #fff2c6;
  border-radius: max(calc(var(--u) * 28), 14px);
  padding: max(calc(var(--u) * 40), 16px) max(calc(var(--u) * 65), 16px) max(calc(var(--u) * 38), 16px);
  box-shadow: 0 8px 30px rgba(0, 40, 100, .18);
}
.form-card__eyebrow {
  margin: 0;
  font-size: max(calc(var(--u) * 17), 10px);
  font-weight: 600;
}
.form-card__title {
  margin: max(calc(var(--u) * 4), 2px) 0 max(calc(var(--u) * 16), 8px);
  font-size: max(calc(var(--u) * 41), 20px);
  font-weight: 700; line-height: 1.15; letter-spacing: -.01em;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: max(calc(var(--u) * 14), 8px);
  row-gap: max(calc(var(--u) * 16), 7px);
}
.field { position: relative; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label:not(.upload):not(.check) {
  display: block;
  margin-bottom: max(calc(var(--u) * 9), 4px);
  font-size: max(calc(var(--u) * 18.5), 11.5px);
  font-weight: 600;
}
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .select select {
  width: 100%;
  height: max(calc(var(--u) * 50), 36px);
  padding: 0 max(calc(var(--u) * 15), 10px);
  font: inherit;
  font-size: max(calc(var(--u) * 18.5), 13.5px); /* iOS input zoom is disabled via maximum-scale=1 */
  color: var(--maroon);
  background: var(--cream);
  border: 1.5px solid var(--cream-line);
  border-radius: max(calc(var(--u) * 8), 7px);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.field input::placeholder { color: #b9ada3; opacity: 1; }
.field input:focus, .select select:focus { border-color: #d9b54a; box-shadow: 0 0 0 3px rgba(255, 224, 107, .45); }
.select { position: relative; }
.select select { padding-right: 30px; cursor: pointer; }
.select select:invalid, .select select:disabled { color: #b9ada3; }
.select select option { color: var(--maroon); }
.select::after {
  content: ""; position: absolute; right: max(calc(var(--u) * 20), 12px); top: 50%;
  border: 4px solid transparent; border-top: 5px solid #6b5a5e; border-bottom: 0;
  transform: translateY(-50%); pointer-events: none;
}
.select select:disabled { cursor: not-allowed; opacity: .75; }

.upload {
  display: flex; align-items: center; gap: max(calc(var(--u) * 14), 8px);
  margin-top: max(calc(var(--u) * 18), 10px);
  min-height: max(calc(var(--u) * 62), 42px);
  padding: 6px max(calc(var(--u) * 22), 12px);
  background: var(--cream);
  border: 2px dashed #e8d6b6;
  border-radius: max(calc(var(--u) * 10), 8px);
  font-size: max(calc(var(--u) * 18.5), 12px);
  color: #85777a;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload:hover { border-color: #d9b54a; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload:focus-within { border-color: #d9b54a; box-shadow: 0 0 0 3px rgba(255, 224, 107, .45); }
.upload__icon { flex: 0 0 auto; width: max(calc(var(--u) * 28), 20px); height: max(calc(var(--u) * 28), 20px); color: #9a8c8c; }
.upload__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__text b { font-weight: 700; }
.upload.is-filled { border-style: solid; border-color: #9fcf9a; background: #f3f9ee; color: #2f5d2b; }
.upload.is-filled .upload__icon { color: #4f9a47; }

.check {
  display: flex; align-items: center; gap: max(calc(var(--u) * 14), 9px);
  margin-top: max(calc(var(--u) * 20), 10px);
  font-size: max(calc(var(--u) * 18.5), 12px);
  cursor: pointer; user-select: none;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: 0 0 auto;
  width: max(calc(var(--u) * 25), 17px); height: max(calc(var(--u) * 25), 17px);
  border: 1.5px solid #e0cba2; border-radius: 4px; background: #fff;
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.check input:checked + .check__box { background: var(--yellow); border-color: #d9b54a; }
.check input:checked + .check__box::after {
  content: ""; width: 34%; height: 60%;
  border: solid var(--maroon); border-width: 0 2px 2px 0;
  transform: translateY(-10%) rotate(45deg);
}
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px rgba(255, 224, 107, .6); }
.check a { color: var(--maroon); text-underline-offset: 2px; }

.btn-next {
  display: block; width: 100%;
  margin-top: max(calc(var(--u) * 19), 11px);
  height: max(calc(var(--u) * 63), 42px);
  border: 0; border-radius: 999px;
  background: var(--yellow);
  color: var(--maroon);
  font-size: max(calc(var(--u) * 22), 14px);
  font-weight: 800; letter-spacing: .04em;
  cursor: pointer;
  transition: transform .1s, filter .15s;
}
.btn-next:hover { filter: brightness(1.03); }
.btn-next:active { transform: scale(.985); }
.btn-next:disabled { opacity: .7; cursor: progress; }
.btn-next.is-loading span::after {
  content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .5em; vertical-align: -.1em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.err {
  display: block; min-height: 0;
  margin-top: 3px;
  font-size: max(calc(var(--u) * 15), 11px);
  color: var(--err); line-height: 1.25;
}
.err:empty { display: none; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--err); background: #fff6f6; }
.field.is-invalid .upload { border-color: var(--err); }
.field.is-invalid .check__box { border-color: var(--err); }
.form-msg { margin: 10px 0 0; font-size: 13px; color: var(--err); text-align: center; }
.form-msg:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* =========================================================
   WHEEL
   ========================================================= */
.screen--wheel { --pt: 70; --pb: 4; }
.wheel {
  position: relative;
  width: calc(var(--u) * 550); height: calc(var(--u) * 550);
}
.wheel__disc {
  width: 100%; height: 100%;
  transform: rotate(0deg);
  will-change: transform;
}
.wheel__pointer {
  position: absolute;
  left: calc(var(--u) * 225); top: calc(var(--u) * 225);
  width: calc(var(--u) * 100); height: calc(var(--u) * 100);
  pointer-events: none;
}
.wheel-btns {
  display: flex; justify-content: center; gap: calc(var(--u) * 45);
  margin-top: calc(var(--u) * 41);
  padding-left: calc(var(--u) * 19);
}
.img-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  width: calc(var(--u) * 193);
  min-width: 96px;
  border-radius: 8px;
  transition: transform .1s, filter .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.img-btn img { width: 100%; height: auto; }
.img-btn:hover:not(:disabled) { filter: brightness(1.08); }
.img-btn:active:not(:disabled) { transform: translateY(2px) scale(.98); }
.img-btn:disabled { cursor: default; filter: grayscale(.55); opacity: .55; }
.img-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.wheel-hint {
  margin: calc(var(--u) * 12) 0 0; min-height: 1.3em;
  text-align: center; color: #fff;
  font-size: max(calc(var(--u) * 20), 11px); font-weight: 500; opacity: .85;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

/* =========================================================
   RESULT CARD (gold / free sample / try again)
   ========================================================= */
.screen--card { --pt: 85; --pb: 129; }
.celebrate { position: relative; }
.card {
  position: relative; z-index: 2;
  width: calc(var(--u) * 807);
  min-height: calc(var(--u) * 549);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--u) * 40) calc(var(--u) * 50);
  text-align: center;
  color: var(--blue-text);
  background: rgba(230, 245, 252, .97);
  border: calc(var(--u) * 5.5) solid var(--yellow);
  border-radius: calc(var(--u) * 62);
  box-shadow:
    inset 0 calc(var(--u) * 4) calc(var(--u) * 16) rgba(88, 110, 130, .45),
    0 0 calc(var(--u) * 22) rgba(0, 45, 110, .35);
}
.ribbons { position: absolute; pointer-events: none; max-width: none; }
.ribbons--back  { z-index: 1; left: calc(var(--u) * -147); top: calc(var(--u) * -375); width: calc(var(--u) * 1080); }
.ribbons--front { z-index: 3; left: calc(var(--u) * -130); top: calc(var(--u) * -92);  width: calc(var(--u) * 986); }

.card__title {
  margin: 0;
  font-size: max(calc(var(--u) * 54), 20px);
  font-weight: 600; line-height: 1; text-transform: uppercase; letter-spacing: .005em;
}
.card__lead {
  margin: calc(var(--u) * 20) 0 0;
  font-size: max(calc(var(--u) * 30), 12.5px);
  font-weight: 600; line-height: 1.15;
}
.card__lead--sm { margin-top: calc(var(--u) * 20); font-size: max(calc(var(--u) * 27), 12px); }
.card__coin { width: calc(var(--u) * 184); margin: calc(var(--u) * 22) auto calc(var(--u) * 2); }
.card__small {
  margin: 0;
  font-size: max(calc(var(--u) * 23.5), 11px);
  line-height: 1.25;
}
.card__big {
  margin: calc(var(--u) * 50) 0 calc(var(--u) * 18);
  font-size: max(calc(var(--u) * 79), 28px);
  font-weight: 600; line-height: 1; text-transform: uppercase;
}
.card--sample .card__title { margin-top: calc(var(--u) * 6); }
.card--sorry { gap: calc(var(--u) * 66); }
.card__caps {
  margin: 0;
  font-size: max(calc(var(--u) * 25), 11px);
  font-weight: 600; line-height: 1.32; text-transform: uppercase;
}
.card__caps--lg { font-size: max(calc(var(--u) * 37.5), 14px); line-height: 1.22; }
.dh {
  display: inline-block; vertical-align: -.08em;
  width: 1.05em; height: .93em; margin: 0 .12em 0 .22em;
  background: currentColor;
  -webkit-mask: url("../img/dirham-mask.png") center / contain no-repeat;
          mask: url("../img/dirham-mask.png") center / contain no-repeat;
}

/* =========================================================
   APPROVED + SORRY (text on blue)
   ========================================================= */
.msg {
  width: calc(var(--u) * 960);
  max-width: calc(100% - 20px);
  text-align: center; color: #fff;
}
.screen--approved { --pt: 136; --pb: 140; }
.msg__title {
  margin: 0;
  font-size: max(calc(var(--u) * 61), 22px);
  font-weight: 600; line-height: 1; text-transform: uppercase;
}
.msg__caps {
  margin: calc(var(--u) * 16) 0 0;
  font-size: max(calc(var(--u) * 27), 11px);
  text-transform: uppercase; line-height: 1.1;
}
.msg__lead {
  margin: calc(var(--u) * 24) 0 0;
  font-size: max(calc(var(--u) * 33), 13px);
  color: var(--yellow); line-height: 1.1;
}
.msg__big {
  margin: calc(var(--u) * 8) 0 calc(var(--u) * 20);
  font-size: max(calc(var(--u) * 76), 26px);
  font-weight: 700; line-height: 1.05; text-transform: uppercase;
  color: var(--yellow);
}
.msg__body {
  margin: 0 auto calc(var(--u) * 14);
  max-width: calc(var(--u) * 930);
  font-size: max(calc(var(--u) * 27), 12px);
  line-height: 1.24;
}
.msg__body a { color: #fff; text-decoration: none; }
.msg__body b { font-weight: 700; }

.screen--sorry { --pt: 260; --pb: 277; }
.msg__sorry {
  margin: 0;
  font-size: max(calc(var(--u) * 75), 26px);
  font-weight: 600; line-height: 1; text-transform: uppercase;
}
.msg__text {
  margin: calc(var(--u) * 26) auto 0;
  max-width: calc(var(--u) * 880);
  font-size: max(calc(var(--u) * 31), 13px);
  line-height: 1.38;
}
.btn-ghost {
  margin-top: calc(var(--u) * 36);
  padding: 10px 22px;
  border: 2px solid var(--yellow); border-radius: 999px;
  background: transparent; color: var(--yellow);
  font-weight: 700; font-size: max(calc(var(--u) * 22), 13px); letter-spacing: .03em;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--yellow); color: var(--maroon); }

/* =========================================================
   MODAL + LOADER
   ========================================================= */
.modal {
  width: min(92vw, 520px); max-height: 86svh;
  padding: 0; border: 0; border-radius: 18px;
  color: var(--maroon); background: #fff;
  box-shadow: 0 20px 60px rgba(0, 20, 60, .4);
}
.modal { --u: 0px; } /* outside the artboard: sizes fall back to their px minimums */
.modal::backdrop { background: rgba(0, 25, 60, .55); backdrop-filter: blur(2px); }
.modal__inner { position: relative; display: flex; flex-direction: column; max-height: 86svh; padding: 26px 24px 20px; }
.modal__inner > .btn-next { flex: 0 0 auto; margin-top: 14px; }
.modal h2 { margin: 0 0 12px; font-size: 22px; }
.modal__body { flex: 1 1 auto; min-height: 0; overflow: auto; font-size: 13.5px; line-height: 1.5; padding-right: 6px; overscroll-behavior: contain; }
.modal__body .terms-lead { margin: 0 0 4px; font-weight: 700; color: #6b5a5e; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.modal__body h3 { margin: 18px 0 6px; font-size: 15px; line-height: 1.3; }
.modal__body p { margin: 0 0 8px; }
.modal__body ol { padding-left: 20px; margin: 0 0 4px; }
.modal__body li + li { margin-top: 5px; }
.modal__body a { color: var(--maroon); }
.terms-table { overflow: hidden; margin: 6px 0 10px; border: 1px solid var(--cream-line); border-radius: 10px; }
.terms-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.terms-table th, .terms-table td { padding: 7px 9px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--cream-line); }
.terms-table tr:last-child td { border-bottom: 0; }
.terms-table th { background: var(--cream); font-weight: 700; }
.terms-table td:first-child { font-weight: 600; min-width: 92px; }
.modal__close {
  position: absolute; right: 12px; top: 10px;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--cream); color: var(--maroon); font-size: 22px; line-height: 1; cursor: pointer;
}
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 40, 90, .25); }
.loader span {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--yellow); border-right-color: transparent;
  animation: spin .8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}
