/*
 * ITC Avant Garde Gothic is licensed and not bundled. If it is installed it is
 * used; otherwise URW Gothic (an open Avant Garde clone) is loaded as a stand-in.
 */
@font-face {
  font-family: "Avant Garde";
  font-weight: 600 700;
  src: local("ITC Avant Garde Gothic Std Demi"),
       local("ITCAvantGardeStd-Demi"),
       url("https://cdn.jsdelivr.net/gh/ArtifexSoftware/urw-base35-fonts@20200910/fonts/URWGothic-Demi.otf") format("opentype");
}

:root {
  --zoom: 1;
  --font-display: "Cal Sans", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-form: "IBM Plex Sans", sans-serif;
  --font-avant: "Avant Garde", "Century Gothic", sans-serif;
  --ink: #040387;
  --link: #128cff;
}

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

body {
  margin: 0;
  background: #fff;
  font-family: var(--font-body);
}

img {
  display: block;
  max-width: none;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header — always 60px tall; logos are centred and scaled to fit (see the media queries below). */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  max-height: 60px;
  padding: 0 clamp(16px, 3vw, 54px);
  background: #fff;
  overflow: hidden;
}

/* MyFutureJobs logo — 241 × 40.16 */
.brand {
  position: relative;
  flex: none;
  width: 241px;
  height: 40.16px;
}

.brand__wordmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 241px;
  height: 25.65px;
}

.brand__tagline {
  position: absolute;
  bottom: 0;
  left: 78.83px;
  width: 161.79px;
  height: 7.76px;
}

/* Partner logos — 119 × 74 and 74 × 74 in the design, scaled to fit the 60px bar */
.partners {
  display: flex;
  align-items: flex-start;
  flex: none;
  gap: 29px;
  zoom: 0.68;
}

/* Kementerian Sumber Manusia — 119 × 74 */
.moha {
  position: relative;
  flex: none;
  width: 119px;
  height: 74px;
}

.moha__emblem {
  position: absolute;
  top: 0.02px;
  left: 19.38px;
  width: 79.68px;
  height: 62.8px;
}

.moha__crest {
  position: absolute;
  top: 0;
  left: 0;
  width: 98.9px;
  height: 68.83px;
}

.moha__name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 119.01px;
  height: 5.27px;
}

/* PERKESO — 74.02 × 74.02 */
.perkeso {
  position: relative;
  flex: none;
  width: 74.02px;
  height: 74.02px;
}

.perkeso__logo {
  position: absolute;
  top: 0.78px;
  left: 7.56px;
  width: 58.9px;
  height: 72.34px;
}

/* ---------------------------------------------------------------------
 * Page layout
 *
 * The design is a 1920px canvas. Each section paints its background edge
 * to edge and holds a 1920px `.stage`; the stage is scaled down (see the
 * script at the bottom) on narrower viewports.
 *
 * Elements are placed with the Figma page coordinates: `--x`/`--y` are the
 * position on the page and `--o` is the page-y where the section starts.
 * ------------------------------------------------------------------ */
.stage {
  position: relative;
  width: 1920px;
  margin: 0 auto;
  zoom: var(--zoom);
}

.at {
  position: absolute;
  left: var(--x);
  top: calc(var(--y) - var(--o));
  width: var(--w);
  height: var(--h);
}

/* Child placed inside a positioned box (`--l`/`--t` are local offsets). */
.p {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
  height: var(--h);
}

.fill {
  width: 100%;
  height: 100%;
}

.crop {
  overflow: hidden;
}

.crop > img,
.step5__mascot > img {
  position: absolute;
}

/* Image fills that Figma rotates: natural-size image, positioned by an affine matrix. */
.tilt {
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

/* ---- Campaign: hero + steps (y 128 → 2487) ---- */
.campaign {
  --o: 128px;
  position: relative;
  overflow: hidden;
  background: #ec2826 url("assets/bg-hero.svg") 0 0 / 100% 100% no-repeat;
}

.campaign .stage {
  height: 2359px;
}

/* Paw pattern: the campaign artwork, overlay-blended and faded out by a gradient mask. */
.pattern {
  position: absolute;
  top: calc(62px - var(--o));
  mix-blend-mode: overlay;
  -webkit-mask: url("assets/hero-campaign-mask.svg") no-repeat;
  mask: url("assets/hero-campaign-mask.svg") no-repeat;
  -webkit-mask-size: 1920px 1544px;
  mask-size: 1920px 1544px;
}

.pattern--left {
  left: -182.32px;
  width: 1100.75px;
  height: 1375.85px;
  -webkit-mask-position: 181.322px 66px;
  mask-position: 181.322px 66px;
}

.pattern--right {
  left: 918.31px;
  width: 995.69px;
  height: 1376px;
  overflow: hidden;
  -webkit-mask-position: -919.31px 66px;
  mask-position: -919.31px 66px;
}

.pattern--left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pattern--right img {
  position: absolute;
  top: 0;
  left: -10.55%;
  width: 110.56%;
  height: 100%;
}

/* Hero */
.hero__copy {
  color: #fff;
}

.hero__title {
  font: 400 48px / normal var(--font-display);
}

.hero__copy p {
  font: 400 20px / 1.35 var(--font-body);
  letter-spacing: -0.0035em;
}

.hero__title + p {
  margin-top: 24px;
}

.hero__copy p + p {
  margin-top: 27px;
}

.hero__cta {
  font: 400 20px / 1.35 var(--font-display);
  color: #fff;
}

.badge {
  display: block;
}

.badge > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Steps */
.step-divider {
  position: absolute;
  left: var(--x);
  top: calc(var(--y) - 177px - var(--o));
  width: 1px;
  height: 177px;
}

.step-divider img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 177px;
  height: 1px;
  transform: translate(-50%, -50%) rotate(90deg);
}

.step__text {
  position: absolute;
  left: var(--x);
  top: calc(var(--y) - var(--o));
  width: var(--w);
  color: #fff;
}

.step__label {
  display: block;
  margin-left: 11px;
  font: 400 16px / normal var(--font-display);
}

.step__head {
  display: flex;
  align-items: center;
  gap: var(--gap, 13px);
  margin-top: 3px;
}

.step__num {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  font: 400 32px / normal var(--font-display);
}

.step__num img {
  position: absolute;
  inset: 0;
}

.step__num span {
  position: relative;
}

.step__title {
  font: 400 24px / normal var(--font-display);
  white-space: nowrap;
}

.step__desc {
  margin-top: 20px;
  padding-left: var(--dx, 2px);
  font: 400 16px / 1.35 var(--font-body);
  letter-spacing: -0.0035em;
}

.step__desc strong {
  font-weight: 700;
}

.step__desc .avant {
  font-family: var(--font-avant);
}

/* Profile screenshots (steps 2 and 3) */
.progress {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: 70px;
  height: 84px;
}

.progress > * {
  position: absolute;
}

.progress__ring {
  left: 0;
  top: 4px;
  width: 70px;
  height: 70px;
}

.progress__avatar {
  left: 3px;
  top: 7px;
  width: 64px;
  height: 64px;
}

.progress__pill {
  left: 25px;
  top: 0;
  width: 20px;
  height: 13px;
  border: 1px solid var(--pill, #898989);
  border-radius: 6.5px;
  background: #000;
}

.progress__dot {
  left: 25px;
  top: 64px;
  width: 20px;
  height: 20px;
}

.progress__icon {
  left: 30px;
  top: 70px;
  width: 10px;
  height: 8px;
  object-fit: cover;
}

.progress__value {
  left: 36px;
  top: 3px;
  transform: translateX(-50%);
  color: #fff;
  font: 400 5px / normal var(--font-display);
  white-space: nowrap;
}

.step2 .task {
  position: absolute;
  left: 14px;
  width: 9px;
  height: 9px;
}

.step2__box {
  position: absolute;
  left: 8px;
  top: 210px;
  width: 189px;
  height: 136px;
  border: 1px solid red;
  border-radius: 7px;
}

.step3__veil {
  position: absolute;
  left: 129.18px;
  top: 0.18px;
  width: 202px;
  height: 436px;
  background: #fff;
  opacity: 0.5;
}

/* Mini form (step 4) */
.mock {
  color: #fff;
  pointer-events: none;
}

.mock > * {
  position: absolute;
}

.mock__input {
  left: 13.08px;
  width: 234.87px;
  height: 33.41px;
  border: 2px solid #c7c7c7;
  border-radius: 10px;
  background: #fff;
}

.mock__label {
  font: 400 12px / normal var(--font-display);
}

.mock__hint {
  font: 400 10px / normal var(--font-body);
  color: #cacaca;
}

.mock__drop {
  left: 14.25px;
  top: 219.49px;
  width: 229.08px;
  height: 100.89px;
  border: 4px dashed #c7c7c7;
  border-radius: 10px;
  background: #fff;
}

.mock__drop-text {
  font: 400 10px / normal var(--font-display);
  color: #666;
}

.mock__check {
  left: 23.91px;
  top: 332.04px;
  width: 11.75px;
  height: 11.75px;
  border: 2px solid #c7c7c7;
  border-radius: 5px;
  background: #fff;
}

.mock__terms {
  font: 400 10px / normal var(--font-body);
}

.mock__submit {
  left: 14.55px;
  top: 392.08px;
  width: 86.57px;
  height: 31.42px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #f04924 5.833%, #ec2627 146.67%);
}

.mock__submit-text {
  font: 400 12px / normal var(--font-display);
  text-align: center;
}

.link-text {
  color: var(--link);
}

/* Feedback card (step 5) */
.step5__card {
  position: absolute;
  left: -1px;
  top: 145.5px;
  width: 356px;
  height: 156px;
  border: 2px solid #c7c7c7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.step5__mascot {
  position: absolute;
  left: 174px;
  top: 24.5px;
  width: 159px;
  height: 210px;
  overflow: hidden;
  -webkit-mask: url("assets/mascot-feedback-mask.svg") -5.5px -24.5px / 181px 182.5px no-repeat;
  mask: url("assets/mascot-feedback-mask.svg") -5.5px -24.5px / 181px 182.5px no-repeat;
}


/* Submit button (step 6) */
.step6__button {
  position: absolute;
  left: 50px;
  top: 119px;
  width: 273px;
  height: 81.9px;
  border-radius: 10px;
  background: #0047b9;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.step6__label {
  position: absolute;
  left: 129.17px;
  top: 147px;
  width: 105.1px;
  color: #fff;
  font: 400 24px / normal var(--font-display);
  text-align: center;
}

/* ---- Prizes (y 2487 → 3339) ---- */
.prizes {
  --o: 2487px;
  position: relative;
  overflow: hidden;
  background: #0047ba url("assets/bg-prizes.svg") 0 0 / 100% 100% no-repeat;
}

.prizes .stage {
  height: 852px;
}

.prizes__title {
  color: #fff;
  letter-spacing: 0.6px;
  font: 700 48px / normal var(--font-avant);
  text-align: center;
  white-space: nowrap;
}

.prize {
  position: absolute;
  left: var(--x);
  top: calc(var(--y) - var(--o));
  width: var(--w);
  height: var(--h);
}

.prize__name {
  color: var(--ink);
  font: 400 32px / normal var(--font-display);
  white-space: nowrap;
}

.prize__item {
  color: #000;
  font: 400 24px / normal var(--font-display);
}

.prize__count {
  position: absolute;
  left: var(--l);
  top: var(--t);
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: #fff;
  font: 400 24px / normal var(--font-display);
}

.prize__count img {
  position: absolute;
  inset: 0;
}

.prize__count span {
  position: relative;
}

.prize__count--small {
  font-size: 20px;
}

/* Wrapper for the first card's 340 × 520 content: transparent to layout except on mobile. */
.prize__body {
  --fit-on: 0;
  display: contents;
}

.prize--1 .prize__name,
.prize--1 .prize__item {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
}

.grab__note {
  position: absolute;
  color: #00b14f;
  font-family: var(--font-display);
  white-space: nowrap;
}

.prize__each {
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.2582;
}

/* ---- Submit form (y 3339 → 4311) ---- */
.submit {
  --o: 3339px;
  position: relative;
  background: #343434 url("assets/bg-form.svg") 0 0 / 100% 100% no-repeat;
}

.submit .stage {
  height: 972px;
}

.submit__title {
  color: #fff;
  letter-spacing: 0.46px;
  font: 700 48px / normal var(--font-avant);
  text-align: center;
  white-space: nowrap;
}

.form {
  display: grid;
  grid-template-columns: 520px 520px;
  column-gap: 42px;
  align-items: start;
  color: #fff;
}

.form__messages {
  grid-column: 1 / -1;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  font: 600 15px / 1.5 var(--font-body);
}

.form__messages--success {
  background: #dff8e8;
  color: #11643f;
}

.form__messages--error {
  background: #3f0d14;
  color: #ffd6de;
}

.form__messages p + p {
  margin-top: 6px;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 14, 31, 0.68);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-loader__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: min(280px, 100%);
  padding: 28px 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  color: #182033;
  text-align: center;
  font: 600 17px / 1.4 var(--font-body);
}

.page-loader__card p {
  margin: 0;
}

.page-loader__spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(0, 23, 147, 0.18);
  border-top-color: #001793;
  border-radius: 50%;
  animation: page-loader-spin 0.75s linear infinite;
}

body.is-submitting {
  overflow: hidden;
}

@keyframes page-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.form__col {
  display: flex;
  flex-direction: column;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 90px;
  margin: 0;
  overflow: clip;
  font-family: var(--font-form);
  letter-spacing: 0.16px;
}

.field + .field {
  margin-top: 6px;
}

.field__label {
  position: relative;
  top: -2px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.field__label b {
  font-weight: 400;
  color: #ed0131;
}

.field__label i {
  font-style: normal;
  color: #6f7482;
}

.field__control {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 12px;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  color: #3b4256;
  font: 400 16px / 1.5 var(--font-form);
  letter-spacing: 0.16px;
}

.field__control::placeholder {
  color: #b8bcca;
  opacity: 1;
}

.field--area {
  height: 293px;
}

.field--area .field__control {
  flex: 1;
  padding: 12px;
  line-height: 1.43;
  resize: none;
}

.upload-field {
  display: flex;
  flex-direction: column;
}

.upload-field .upload__label {
  margin-top: 13px;
}

.upload__label {
  display: block;
  font: 600 16px / normal var(--font-avant);
}

/* The "(Upload both to qualify • View Sample)" part of the label is set a size down so the whole
   label stays on one line in the 520px column. */
.upload__note {
  display: inline-block;
  font-size: 14px;
}

/* "View Sample" inside the upload label: an underlined text button that opens #sample-modal. */
.upload__sample {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.upload__sample:hover {
  color: var(--link);
}

.upload__sample:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  width: 520px;
  height: 165px;
  margin-top: 6px;
  padding: 45px 105px;
  border: 4px dashed #d5d5d5;
  border-radius: 10px;
  background: #fff;
  color: #666;
  font: 400 16px / normal var(--font-body);
  white-space: nowrap;
  cursor: pointer;
}

.upload:focus-within,
.upload.is-over {
  border-color: var(--link);
}

.upload img {
  flex: none;
}

.upload__text {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.upload__text u {
  color: var(--link);
  text-decoration: none;
}

.upload.has-error {
  border-color: #ed0131;
}

.upload__hint {
  width: 499px;
  margin: 13px 0 0 1px;
  color: #9d9d9d;
  font: 400 12px / normal var(--font-body);
}

/* Selected files: reserves one chip row so the form does not jump when files are added. */
.upload__files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  margin: 11px 0 0;
}

.file {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 162px;
  max-width: 100%;
  height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  background: #001793;
  color: #fff;
  font: 400 10px / normal var(--font-body);
}

.file__remove {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Larger tap area around the 8px icon. */
.file__remove::after {
  content: "";
  position: absolute;
  inset: -14px -8px;
}

.file__remove img {
  width: 8.71px;
  height: 8.71px;
}

.file__remove:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.file__name {
  position: relative;
  top: -1px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload__errors {
  margin-top: 8px;
  color: #ff8a8a;
  font: 400 12px / 1.4 var(--font-body);
}

.upload__errors:empty {
  display: none;
}

.upload__errors p + p {
  margin-top: 2px;
}

.terms {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 21px 0 0 1px;
  font: 400 16px / normal var(--font-body);
}

.terms input {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin: -1px;
  border: 2px solid #c7c7c7;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.terms input:checked {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23343434' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.terms span {
  position: relative;
  top: -1px;
}

.terms a {
  color: var(--link);
}

.form__submit {
  grid-column: 1 / -1;
  justify-self: center;
  width: 200px;
  height: 60px;
  margin-top: 21px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(to bottom, #f04924 5.833%, #ec2627 146.67%);
  color: #fff;
  font: 600 24px / normal var(--font-avant);
  padding-top: 4px;
  padding-bottom: 0;
  cursor: pointer;
}

.field__control:focus-visible,
.form__submit:focus-visible,
.terms input:focus-visible,
.terms a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* ---- Footer (y 4311 → 4407) ---- */
.footer {
  --o: 4311px;
  position: relative;
  background: #001793;
}

.footer .stage {
  height: 96px;
}

.footer__site {
  color: #fff;
  font: 600 20px / normal var(--font-avant);
  text-decoration: none;
  white-space: nowrap;
}

.footer__icon {
  display: block;
}

.footer__icon img {
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------------
 * Responsive layout
 *
 *   >= 1280px  the 1920px canvas above, scaled to the viewport
 *   <  1280px  content reflows into the layouts below; the composed
 *              illustrations stay at design size and are scaled to fit
 *              their container by the script (see `data-fit`)
 *
 *   1024 – 1279  three-column steps, two-column hero
 *    768 – 1023  two-column steps, prize board scaled to fit
 *          < 768  single column, prizes stacked in rank order
 * ------------------------------------------------------------------ */

/* Wrappers that only exist to group elements for the reflowed layouts. */
.pattern-layer,
.hero__body,
.hero__badges,
.step__art,
.prizes__board,
.footer__social {
  display: contents;
}

@media (max-width: 1279px) {
  .stage {
    width: auto;
    margin: 0;
    zoom: 1;
  }

  /* The absolute canvas coordinates no longer apply; boxes keep their design size. */
  .at {
    position: relative;
    left: auto;
    top: auto;
  }

  /* -- Campaign -- */
  .campaign .stage {
    height: auto;
    padding: 40px 24px 72px;
  }

  /* Keep the paw pattern centred on the 1920px artwork, behind the content. */
  .pattern-layer {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    width: 1920px;
    height: 1544px;
    margin-left: -960px;
    pointer-events: none;
  }

  .hero,
  .steps {
    position: relative;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 60px);
    max-width: 1240px;
    margin: 0 auto;
  }

  .hero__art {
    width: 100%;
    max-width: 646px;
    height: auto;
    margin: 0 auto;
    aspect-ratio: 646 / 589;
  }

  .hero__body {
    display: block;
  }

  .hero__copy.at {
    width: auto;
  }

  .hero__title {
    font-size: clamp(30px, 3.6vw, 48px);
  }

  .hero__copy p {
    font-size: clamp(16px, 1.7vw, 20px);
  }

  .hero__cta.at {
    width: auto;
    height: auto;
    margin-top: 32px;
    font-size: clamp(17px, 1.7vw, 20px);
  }

  .hero__badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 173px));
    gap: 12px;
    margin-top: 14px;
  }

  .hero__badges > .at {
    width: 100%;
    height: auto;
    aspect-ratio: 173 / 51.5;
  }

  /* -- Steps -- */
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 64px 24px;
    max-width: 1240px;
    margin: 64px auto 0;
  }

  .step-divider {
    display: none;
  }

  .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .step__art {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(440px * var(--z, 1));
  }

  .step__art > .at {
    --fit-on: 1;
    flex: none;
  }

  .step__text {
    position: relative;
    left: auto;
    top: auto;
    align-self: center;
    width: 100%;
    max-width: var(--w);
  }

  .step__title {
    font-size: clamp(20px, 2.2vw, 24px);
    white-space: normal;
  }

  /* Divider between neighbouring steps in the same row. */
  .step__text::before {
    content: "";
    display: none;
    position: absolute;
    top: 3px;
    left: -12px;
    width: 1px;
    height: 177px;
    background: #fff;
  }

  .step:nth-of-type(3n + 2) .step__text::before,
  .step:nth-of-type(3n + 3) .step__text::before {
    display: block;
  }

  /* -- Prizes -- */
  .prizes .stage {
    height: auto;
    padding: 56px 24px 88px;
  }

  .prizes__mascot.at {
    display: block;
    margin: 0 auto 8px;
    zoom: 0.55;
  }

  .prizes__title.at {
    width: auto;
    height: auto;
    padding: 0 8px;
    font-size: clamp(26px, 4.6vw, 48px);
    white-space: normal;
    text-wrap: balance;
  }

  /* The five-card board keeps its layout and scales to the available width. */
  .prizes__board {
    --o: 2697px;
    --bx: 285px;
    --fit-on: 1;
    display: block;
    position: relative;
    width: 1410px;
    height: 590px;
    margin: 40px auto 0;
  }

  .prizes__board > .at {
    position: absolute;
    left: 0;
    top: 0;
  }

  .prizes__board .prize {
    left: calc(var(--x) - var(--bx));
  }

  /* -- Submit form -- */
  .submit .stage {
    height: auto;
    padding: 64px 24px 88px;
  }

  .submit__title.at {
    width: auto;
    height: auto;
    padding: 0 8px 48px;
    font-size: clamp(26px, 4.6vw, 48px);
    letter-spacing: 0.3px;
    white-space: normal;
    text-wrap: balance;
  }

  .form.at {
    width: 100%;
    max-width: 1082px;
    height: auto;
    margin: 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(20px, 3vw, 42px);
  }

  .upload {
    width: 100%;
    height: auto;
    min-height: 165px;
    padding: 32px 16px;
    text-align: center;
    white-space: normal;
  }

  .upload__text {
    overflow: visible;
  }

  .upload__hint {
    width: auto;
  }

  /* -- Footer -- */
  .footer .stage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
    height: auto;
    padding: 24px 16px;
  }

  .footer__bg {
    display: none;
  }

  .footer__site.at {
    display: flex;
    align-items: center;
    width: auto;
    height: 44px;
  }

  .footer__social {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .footer__social > .at {
    flex: none;
  }

  /* 44px touch targets around the 38px icons. */
  .footer__social {
    gap: 6px;
  }

  .footer__icon.at {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
  }

  .footer__icon img {
    width: var(--w);
    height: var(--h);
  }

  .footer__social > img.at {
    box-sizing: content-box;
    padding: calc((44px - var(--h)) / 2) calc((44px - var(--w)) / 2);
  }
}

/* Hero stacks before the step grid does. */
@media (max-width: 899px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 640px;
  }

  .hero__art {
    max-width: 420px;
  }
}

@media (max-width: 1023px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 780px;
  }

  /* Only the right-hand step of each pair has a divider. */
  .step:nth-of-type(n) .step__text::before {
    display: none;
  }

  .step:nth-of-type(2n) .step__text::before {
    display: block;
  }
}

@media (max-width: 767px) {
  .campaign .stage {
    padding: 32px 16px 56px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
    margin-top: 48px;
  }

  .step__art {
    min-height: 0;
  }

  /* Extra breathing room above the "download the app" graphic (built around assets/app-icon.png). */
  .step__art--app-download {
    margin-top: 100px;
  }

  .step:nth-of-type(n) .step__text::before {
    display: none;
  }

  .hero__badges {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  /* Prizes: one card per row, in rank order (1st, 2nd, 3rd, 4th, consolation). */
  .prizes .stage {
    padding: 48px 16px 64px;
  }

  .prizes__board {
    --fit-on: 0;
    width: auto;
    height: auto;
    padding: 14px;
    border-radius: 36px;
    background: linear-gradient(#f15922, #ec2627);
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.5);
  }

  .prizes__board > .at {
    display: none;
  }

  .prizes__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .prizes__board .prize {
    --fit-on: 1;
    position: relative;
    left: auto;
    top: auto;
    flex: none;
    order: var(--rank, 0);
  }

  /*
   * First prize: the white card is as wide as the other cards (their 488px design width,
   * capped at the column) while its portrait content keeps its size and stays centred.
   */
  .prizes__board .prize--1 {
    --fit-on: 0;
    width: min(488px, 100%);
    height: auto;
    border-radius: 12.4px;
    background: #fff;
  }

  .prize--1 > .fill {
    display: none;
  }

  .prize--1 .prize__body {
    --fit-on: 1;
    display: block;
    position: relative;
    width: 340px;
    height: 520px;
    margin: 0 auto;
  }

  /* Form: single column, fields in reading order. */
  .submit .stage {
    padding: 48px 16px 64px;
  }

  .form.at {
    grid-template-columns: minmax(0, 1fr);
  }

  .form__col {
    display: contents;
  }

  .field--name {
    order: 1;
  }

  .field--phone {
    order: 2;
  }

  .field--email {
    order: 3;
  }

  .field--feedback {
    order: 4;
  }

  .upload-field {
    order: 5;
  }

  .terms {
    order: 6;
  }

  .form__submit {
    order: 7;
  }

  .field--area {
    height: 220px;
  }

  .terms {
    align-items: flex-start;
    min-height: 44px;
    margin: 20px 0 0;
  }

  .terms span {
    top: 0;
  }

  .form__submit {
    margin-top: 32px;
  }

  /* Footer: address above the icons. */
  .footer .stage {
    flex-direction: column;
    gap: 12px;
  }

  .footer__sep {
    display: none;
  }
}

/* Header logos shrink so the 60px bar never overflows. */
@media (max-width: 640px) {
  .header {
    padding-inline: 16px;
  }

  .brand {
    zoom: 0.75;
  }

  .partners {
    zoom: 0.55;
  }
}

@media (max-width: 380px) {
  .brand {
    zoom: 0.62;
  }

  .partners {
    zoom: 0.48;
  }
}

/* ---------------------------------------------------------------------
 * Terms and Conditions page (terms.html)
 *
 * Reuses the fonts, header, footer and paw-pattern layers above. Measurements come from the
 * Figma frame "Term and conditions" (1920px wide):
 *   - text column: 1386px wide, starting 294px from the left
 *   - section headings: Cal Sans 32px; body: Inter 20px / 135% line height, white
 *   - one blank line (27px) between a heading and its text and around lists
 *   - 62px between sections (35px between sections 5, 6 and 7)
 * ------------------------------------------------------------------ */

.legal {
  --o: 128px; /* page-y where the pattern artwork starts in the design (see .pattern in styles.css) */
  --gutter: clamp(16px, 4vw, 48px);
  --fs: 16px;
  --line: calc(var(--fs) * 1.35);
  --section-gap: 40px;
  --section-gap-tight: 28px;
  --top: clamp(40px, 7.6vw, 146px);
  --bottom: clamp(48px, 6.8vw, 130px);

  position: relative;
  overflow: hidden;
  padding: var(--top) 0 var(--bottom);
  background: #ec2826 url("assets/bg-terms.svg") 0 0 / 100% 100% no-repeat;
  color: #fff;

  /* Light text on a saturated background: grayscale smoothing keeps the strokes as thin as in the design. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Same paw pattern as the home hero, centred on the 1920px artwork and fading out down the page. */
.legal .pattern-layer {
  display: block;
  position: absolute;
  top: 0;
  left: 50%;
  width: 1920px;
  height: 1544px;
  margin-left: -958px;
  pointer-events: none;
}

/* Text column: 1386px wide at 294px from the left on a 1920px screen, fluid below that. */
.legal__inner {
  position: relative;
  width: min(1386px, calc(100% - 2 * var(--gutter)));
  margin-left: clamp(var(--gutter), calc(50% - 666px), calc(100% - 1386px - var(--gutter)));
}

.legal__section + .legal__section {
  margin-top: var(--section-gap);
}

.legal__section + .legal__section--tight {
  margin-top: var(--section-gap-tight);
}

.legal h2 {
  margin-bottom: var(--line);
  font: 400 24px / 1.34 var(--font-display);
}

.legal p,
.legal li {
  font: 400 var(--fs) / 1.35 var(--font-body);
}

.legal ol,
.legal ul {
  margin: 0;
  padding-left: calc(var(--fs) * 1.55);
}

.legal ol {
  list-style: decimal;
}

.legal ul {
  list-style: disc;
}

/* One blank line after a block. */
.legal .gap-after {
  margin-bottom: var(--line);
}

@media (min-width: 768px) {
  .legal {
    --fs: 18px;
    --section-gap: 48px;
    --section-gap-tight: 30px;
  }

  .legal h2 {
    font-size: 28px;
  }
}

@media (min-width: 1280px) {
  .legal {
    --fs: 20px;
    --section-gap: 62px;
    --section-gap-tight: 35px;
  }

  .legal h2 {
    font-size: 32px;
  }
}

/* ---------------------------------------------------------------------
 * "View Sample" modal (index.php, opened from the upload label)
 *
 * A native <dialog>, kept outside .stage so the page's zoom scaling does not shrink it. Sizes to
 * the viewport on mobile and caps at 560px wide on larger screens.
 * ------------------------------------------------------------------ */
html.is-modal-open {
  overflow: hidden;
}

.sample-modal {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  overflow: visible;
}

.sample-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.sample-modal__card {
  position: relative;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 56px 24px 24px;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.sample-modal__image {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto;
}

.sample-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #001793;
  cursor: pointer;
}

.sample-modal__close:hover {
  background: #0023d6;
}

.sample-modal__close:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .sample-modal__card {
    padding: 52px 16px 16px;
    border-radius: 12px;
  }
}
