/* Walmart Canada Creator — site styles */

/* Walmart's Bogle typeface, self-hosted (Latin subset). Weight 600 uses Bold. */
@font-face {
  font-family: "Bogle";
  src: url("/fonts/bogle-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bogle";
  src: url("/fonts/bogle-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bogle";
  src: url("/fonts/bogle-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #041e42;
  --blue: #0071ce;
  --blue-dark: #00539b;
  --yellow: #ffc220;
  --rule: #7c8496;
  --field-border: #a9a9a9;
  --muted: #6b6b6b;
  --font: "Bogle", "Helvetica Neue", Arial, sans-serif;
  --font-ui: Arial, "Helvetica Neue", Helvetica, sans-serif;
  /* Content column width; the split sections line their text up with it */
  --cw: calc(100vw - 48px);
}

@media (min-width: 1100px) {
  :root { --cw: min(72vw, 1180px); }
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; }

.container {
  width: var(--cw);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 8px 14px;
  background: #fff;
  color: var(--navy);
}

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

/* ---------- Header ---------- */

.site-header {
  background: var(--navy);
  color: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px clamp(16px, 4.2vw, 64px);
}

.brand img {
  height: 40px;
  width: auto;
}

/* English / Français menus: open on hover (mouse) or click/tap, list right-aligned under the label */
.site-nav__menus {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-ui);
  font-size: 15px;
}

.site-nav__menu { position: relative; }

.site-nav__toggle {
  padding: 6px 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  text-underline-offset: 4px;
  cursor: pointer;
}

.site-nav__toggle.is-current,
.site-nav__toggle:hover,
.site-nav__menu.is-open .site-nav__toggle {
  text-decoration: underline;
}

.site-nav__dropdown {
  position: absolute;
  top: 100%;
  right: -16px;
  z-index: 20;
  min-width: 210px;
  margin: 0;
  padding: 10px 16px 16px;
  list-style: none;
  background: var(--navy);
  text-align: right;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav__menu.is-open .site-nav__dropdown,
html:not(.has-js) .site-nav__menu:focus-within .site-nav__dropdown {
  visibility: visible;
  opacity: 1;
  transform: none;
}

@media (hover: hover) {
  .site-nav__menu:hover .site-nav__dropdown {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
}

.site-nav__dropdown a {
  display: block;
  padding: 3px 0;
  color: #fff;
  text-decoration: none;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.site-nav__dropdown a:hover,
.site-nav__dropdown a[aria-current="page"] {
  text-decoration: underline;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 32px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--white { background: #fff; color: #000; }
.btn--white:hover { background: #e3effa; }

.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); }

.btn--wide { min-width: min(100%, 14.5rem); }
.btn--wider { min-width: min(100%, 24rem); }

/* ---------- Split (image + text) sections ---------- */

.split {
  display: grid;
  grid-template-columns: 41% 1fr;
  min-height: 600px;
}

.split--half { grid-template-columns: 1fr 1fr; min-height: 470px; }
.split--wide-text { grid-template-columns: 56% 1fr; min-height: 500px; }

/* The photo fills its panel; the text side sets the section height */
.split__media { position: relative; }

.split__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 64px clamp(24px, 3vw, 48px);
  background: var(--blue);
  color: #fff;
}

.split__body--white {
  background: #fff;
  color: var(--navy);
}

/* Text lines up with the content column rather than the panel edge */
.split__body--aligned {
  padding-left: max(24px, calc((100vw - var(--cw)) / 2));
  padding-right: clamp(24px, 4vw, 56px);
}

.display {
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.split__body .display { max-width: 10.5em; margin-bottom: 26px; }

.split__body p {
  max-width: 37em;
  margin: 0 0 24px;
  font-size: 15px;
}

.split__body--aligned p { max-width: 31em; }

/* ---------- Steps (Apply / Approval / Reward) ---------- */

.steps { padding: 52px 0; }

.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-block: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 18px 20px;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
}

.step h2 {
  margin-bottom: 4px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
}

.step p {
  margin: 0;
  font-size: 15px;
}

/* ---------- FAQ ---------- */

.faq { padding: 60px 0 48px; }

.faq h2 {
  margin-bottom: 26px;
  font-size: clamp(34px, 3.7vw, 52px);
  font-weight: 900;
  line-height: 1.1;
}

.faq__list { border-top: 1px solid var(--rule); }

.faq details { border-bottom: 1px solid var(--rule); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-family: var(--font-ui);
  font-size: 16px;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }

.faq__answer {
  max-width: 44em;
  padding: 4px 0 34px;
  font-size: 15px;
}

.faq__answer p { margin: 0; }

/* ---------- Rakuten page ---------- */

.links-band {
  padding: 56px 0 62px;
  background: var(--blue);
  color: #fff;
}

.links-band h2 {
  margin-bottom: 40px;
  font-family: var(--font-ui);
  font-size: clamp(24px, 2.5vw, 33px);
  font-weight: 400;
  text-align: center;
}

.links-band__grid {
  display: grid;
  grid-template-columns: minmax(200px, max-content) 1fr;
  gap: 40px;
  align-items: stretch;
}

.links-band__buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.links-band__buttons .btn {
  max-width: 290px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
}

.support-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  color: var(--navy);
  text-align: center;
}

.support-box h3 {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.support-box p {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.publishers { padding: 56px 0 64px; }

.publishers h2 {
  margin-bottom: 26px;
  font-family: var(--font-ui);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  color: #000;
}

/* Fills the left column first (11 rows), like the original two-column list */
.publishers ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(11, auto);
  grid-auto-flow: column;
  column-gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
}

.publishers li {
  padding: 5px 0;
  overflow-wrap: anywhere;
}

/* ---------- Terms page ---------- */

.terms { padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 140px); }

.terms h1 {
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 700;
}

.terms ol {
  margin: 0;
  padding-left: 2.6em;
  font-size: 16px;
  line-height: 1.85;
}

.terms li { margin-bottom: 8px; }

/* ---------- Application form ---------- */

.form-page { padding: clamp(64px, 10vw, 150px) 0 clamp(64px, 9vw, 130px); }

.form-wrap {
  width: min(100% - 40px, 560px);
  margin-inline: auto;
}

.apply-form { padding: 0 34px; }

.apply-form fieldset {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.apply-form legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: #000;
}

.field { margin-bottom: 22px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field label,
.check {
  font-size: 15px;
  font-weight: 600;
  color: #000;
}

.field label:not(.check) {
  display: block;
  margin-bottom: 6px;
}

.req {
  font-weight: 400;
  color: #3a3a3a;
}

.apply-form input:not([type="checkbox"]),
.apply-form select,
.apply-form textarea {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 16px;
}

.apply-form textarea {
  min-height: 116px;
  resize: vertical;
}

.apply-form select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10'%3E%3Cpath d='M1 1l8 8 8-8' fill='none' stroke='%23041e42' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.apply-form select:has(option[value=""]:checked) { color: var(--muted); }
.apply-form select option { color: #000; }

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 2px rgb(0 113 206 / 0.25);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 22px;
  cursor: pointer;
}

.field .check { margin: 10px 0 0; }

.check input {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--field-border);
  border-radius: 50%;
  background: #fff center / 10px no-repeat;
  cursor: pointer;
}

.check input:checked {
  border-color: var(--blue);
  background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E");
}

.check input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.btn--submit {
  display: flex;
  width: 78%;
  min-height: 50px;
  margin: 30px auto 0;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
}

.btn--submit:disabled { opacity: 0.7; cursor: progress; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  display: none;
  margin: 0 34px 24px;
  padding: 12px 16px;
  border-left: 4px solid #c8102e;
  background: #fdf0f2;
  color: #7a0a1c;
  font-size: 15px;
}

.form-error:target,
.form-error.is-visible { display: block; }

.form-thanks {
  display: none;
  padding: 0 34px;
  text-align: center;
}

.form-thanks:target,
.form-thanks.is-visible { display: block; }

/* No-JS fallback: the server redirects to #thanks after a successful submit */
.form-thanks:target ~ .apply-form,
.form-thanks:target ~ .form-error { display: none; }

.form-thanks h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 900;
}

.form-thanks p { margin: 0 0 8px; }

.form-terms-link {
  margin: 44px 0 0;
  font-size: 18px;
}

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

.site-footer {
  padding: 72px 0 64px;
  background: var(--navy);
  color: #fff;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 46% auto 1fr;
  align-items: start;
}

.social {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: block;
  color: #fff;
}

.social svg {
  display: block;
  width: 20px;
  height: 20px;
}

.site-footer__logo {
  height: 35px;
  width: auto;
  margin-right: 50px;
}

.site-footer address {
  font-size: 14px;
  font-style: normal;
  line-height: 2.3;
  margin-top: -6px;
}

/* ---------- 404 ---------- */

.not-found { padding: 120px 0 140px; }
.not-found h1 { margin-bottom: 16px; font-size: clamp(34px, 4vw, 52px); font-weight: 900; }
.not-found p { margin: 0 0 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .split,
  .split--half,
  .split--wide-text {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .split__media img {
    position: static;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .split__body,
  .split__body--aligned {
    padding: 48px 24px 56px;
  }

  .steps__grid,
  .links-band__grid {
    grid-template-columns: 1fr;
  }

  .steps__grid { gap: 16px; }

  .publishers ul {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .brand img { height: 32px; }
  .site-nav__menus { gap: 10px; font-size: 14px; }

  .apply-form { padding: 0; }
  .form-error { margin-inline: 0; }
  .form-thanks { padding: 0; }
  .field-row { grid-template-columns: 1fr; gap: 22px; }
  .btn--submit { width: 100%; }
}

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