/* ================================================================
   yuu-rewards.html. Builds on css/ds.css + css/info.css.

   yuu partner brand: blue #2a7de1 carries this page (hero, rate card,
   closing band, accents). Co-branding per the yuu Merchant Guidelines:
   the yuu wordmark on the left, white on yuu blue; a thin white bar no
   taller than the wordmark; the Upward logo on the right in a box no
   bigger than the wordmark. "yuu" is always lower case, so nothing that
   can contain it is text-transformed to uppercase.

   White on yuu blue is 4.1:1, so every line of white text on blue is
   set at 24px+ (WCAG large text); smaller white text sits on yuu dark.
================================================================ */

.page-yuu {
  --yuu-blue:   #2a7de1;
  --yuu-dark:   #1a428a;  /* 9.6:1 with white */
  --yuu-yellow: #fae18c;
  --yuu-wash:   #e9f2fd;
  --sweep-h:    clamp(3.5rem, 2rem + 6vw, 7.5rem);
}
.page-yuu .eyebrow::before { background: var(--yuu-blue); }
.page-yuu .eyebrow .idx { color: var(--yuu-dark); }
.yr-hero :focus-visible, .yr-close :focus-visible, .yr-rate :focus-visible { outline-color: var(--yuu-yellow); }

/* ---------- Co-brand lockup ---------- */
.yuu-lockup { --yuu-h: clamp(2.25rem, 1.9rem + 1.2vw, 3.25rem); display: inline-flex; align-items: center; gap: calc(var(--yuu-h) * 0.4); }
.yuu-lockup-yuu { height: var(--yuu-h); width: auto; }
.yuu-lockup-bar { width: 2px; height: var(--yuu-h); background: var(--white); }
.yuu-lockup-box {
  display: flex; align-items: center; justify-content: center;
  height: var(--yuu-h); width: calc(var(--yuu-h) * 1.55);
  padding: calc(var(--yuu-h) * 0.08) calc(var(--yuu-h) * 0.1);
  background: var(--white); border-radius: calc(var(--yuu-h) * 0.16);
}
.yuu-lockup-box img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
/* The wordmark standing in for the word in a headline. */
.yuu-word { display: inline-block; height: 0.78em; width: auto; margin: 0 0.2em; vertical-align: -0.05em; }
.has-motion [data-split] .yuu-word { opacity: 0; transform: translateY(35%); transition: opacity 0.9s var(--ease-out) 0.25s, transform 1.1s var(--ease-out) 0.25s; }
.has-motion [data-split].is-in .yuu-word { opacity: 1; transform: none; }

/* ---------- Buttons on yuu blue ---------- */
.yr-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.yr-btn { font-weight: 700; font-size: 1.1875rem; } /* 19px bold: large text on blue */
.yr-btn.btn--light { --btn-fg: var(--yuu-dark); --btn-chip: var(--yuu-wash); --btn-hover: var(--yuu-yellow); }
.yr-btn--ghost { --btn-fg: var(--white); --btn-hover: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85); }

/* ---------- Hero ---------- */
.yr-hero {
  position: relative; isolation: isolate; z-index: 1; /* the photo's shadow falls over the next section */
  background: var(--yuu-blue); color: var(--white);
  padding: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) 0 calc(var(--sweep-h) + clamp(2rem, 1.5rem + 2vw, 3.5rem));
}
.yr-hero__grid { position: relative; z-index: 1; display: grid; gap: clamp(2.5rem, 2rem + 2vw, 4rem); }
.yr-hero__title {
  margin-top: clamp(1.75rem, 1.25rem + 2vw, 3rem);
  font: 600 clamp(2.75rem, 1rem + 5.6vw, 7rem)/0.94 var(--font-display);
  letter-spacing: -0.05em; color: var(--white);
  text-wrap: balance;
}
.yr-hero__sub {
  margin-top: 1.75rem;
  font: 500 clamp(1.5rem, 1.25rem + 0.7vw, 1.875rem)/1.3 var(--font-display); letter-spacing: -0.02em;
  color: var(--white); max-width: 30ch;
}
.yr-hero__media {
  aspect-ratio: 4 / 3;
  margin-bottom: calc(var(--sweep-h) * -0.75 - clamp(2rem, 1.5rem + 2vw, 3.5rem));
  box-shadow: 0 40px 80px -40px rgba(10, 30, 70, 0.6);
}
.yr-hero__media img { object-position: 72% 50%; }
@media (min-width: 1000px) {
  .yr-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: clamp(2.5rem, 5vw, 6rem); }
  .yr-hero__media { aspect-ratio: 4 / 5; }
}
/* The white sweep with the yellow edge from the yuu posters. */
.yr-sweep { position: absolute; left: 0; right: 0; bottom: -1px; height: var(--sweep-h); overflow: hidden; pointer-events: none; }
.yr-sweep span {
  position: absolute; left: -15%; right: -15%; top: 0; bottom: 0;
  background: var(--white); border-top: 6px solid var(--yuu-yellow);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* ---------- Earn rate ---------- */
.yr-earn-sec { padding-top: clamp(3.5rem, 2.5rem + 3vw, 6rem); }
.yr-earn-sec .sec-head .serif, .yr-how .sec-head .serif { color: var(--yuu-blue); padding-right: 0.04em; }
.yr-earn { display: grid; gap: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 1000px) { .yr-earn { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch; gap: clamp(2.5rem, 5vw, 6rem); } }

.yr-rate {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
  min-height: 26rem;
  padding: clamp(1.75rem, 1.25rem + 2.5vw, 3.5rem);
  border-radius: var(--radius-lg);
  background: var(--yuu-blue); color: var(--white);
}
.yr-rate::after { /* yellow ring: echoes the sweep's edge */
  content: ''; position: absolute; z-index: -1;
  width: 12rem; height: 12rem; right: -6rem; top: -6rem; border-radius: 50%;
  border: 6px solid var(--yuu-yellow); opacity: 0.9;
}
@media (min-width: 700px) { .yr-rate::after { width: 22rem; height: 22rem; right: -9rem; top: -9rem; } }
.yr-rate-big { font: 600 clamp(2.75rem, 1.5rem + 4vw, 5.75rem)/0.92 var(--font-display); letter-spacing: -0.05em; max-width: 9ch; }
.yr-rate-big span, .yr-rate-plus small {
  display: block; margin-top: 1.1rem;
  font: 500 1.5rem/1.3 var(--font-display); letter-spacing: -0.015em; /* 24px: large text on blue */
  max-width: 22ch;
}
.yr-rate-plus {
  padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.45);
  font: 600 clamp(2.1rem, 1.5rem + 2vw, 3.4rem)/1 var(--font-display); letter-spacing: -0.04em;
}
.yr-rate-plus small { margin-top: 0.6rem; }

/* Table: no uppercase anywhere (the yuu name is never YUU). */
.yr-table-wrap { display: flex; flex-direction: column; justify-content: center; }
.yr-table { width: 100%; border-collapse: collapse; }
.yr-table caption {
  caption-side: top; text-align: left; padding-bottom: 1.1rem;
  font: 600 clamp(1.5rem, 1.15rem + 1.1vw, 2.25rem)/1.05 var(--font-display); letter-spacing: -0.035em; color: var(--ink);
}
.yr-table th {
  padding: 0.9rem 0.75rem; border-bottom: 1.5px solid var(--ink); text-align: left;
  font: 600 0.8125rem/1.2 var(--font-body); color: var(--ink-2);
}
.yr-table td {
  padding: 1.1rem 0.75rem; border-bottom: 1px solid var(--line);
  font: 500 clamp(1.1rem, 1rem + 0.4vw, 1.4rem)/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--ink);
}
.yr-table th:first-child, .yr-table td:first-child { padding-left: 0; }
.yr-table th:last-child, .yr-table td:last-child { text-align: right; padding-right: 0; }
.yr-table td:last-child {
  font: 600 clamp(1.9rem, 1.3rem + 1.8vw, 3rem)/1 var(--font-display); letter-spacing: -0.045em;
  color: var(--yuu-dark); font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.yr-table tbody tr:hover td:last-child { color: var(--yuu-blue); }
.yr-table-note { margin-top: 1.4rem; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; max-width: 54ch; }

/* ---------- How to earn ---------- */
.yr-steps { display: grid; border-top: 1.5px solid var(--ink); }
.yr-step {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0;
  border-bottom: 1px solid var(--line-strong);
}
@media (min-width: 1000px) {
  .yr-steps { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line-strong); }
  .yr-step { border-bottom: 0; padding-right: clamp(2rem, 4vw, 5rem); }
  .yr-step + .yr-step { border-left: 1px solid var(--line-strong); padding-left: clamp(2rem, 4vw, 5rem); padding-right: 0; }
}
@media (max-width: 599.98px) {
  .yr-step { grid-template-columns: minmax(0, 1fr); }
}
.yr-step__num {
  font: 600 clamp(3.5rem, 2.5rem + 3.5vw, 7rem)/0.8 var(--font-display); letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px var(--yuu-blue);
  min-width: 1.6ch;
}
.yr-step__title { font: 600 clamp(1.5rem, 1.15rem + 1.2vw, 2.25rem)/1.1 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; }
.yr-step__body p { margin-top: 0.9rem; color: var(--ink-2); max-width: 48ch; }
.yr-step__body p strong { color: var(--ink); font-weight: 600; }
.yr-step__body .yr-step__lead { font: 600 1.0625rem/1.4 var(--font-display); color: var(--yuu-dark); }
.yr-substeps { margin-top: 1.25rem; border-top: 1px solid var(--line); counter-reset: sub; }
.yr-substeps li {
  position: relative;
  counter-increment: sub;
  padding: 0.9rem 0 0.9rem 2.75rem; border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.yr-substeps li::before {
  content: counter(sub, decimal-leading-zero);
  position: absolute; left: 0; top: 0.9rem;
  font: 600 var(--fs-micro)/1.9 var(--font-body); color: var(--yuu-dark);
}
.yr-substeps strong { color: var(--ink); font-weight: 600; }
.yr-wa { margin-top: 1.75rem; white-space: normal; text-align: left; line-height: 1.2; }
.yr-wa .btn__chip { background: var(--emerald); color: var(--night); }
.yr-wa:hover .btn__chip { transform: scale(1.06); }

.yr-set {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  text-align: center;
  font: 600 clamp(2rem, 1.2rem + 3.4vw, 4.75rem)/1 var(--font-display); letter-spacing: -0.045em;
  color: var(--yuu-dark);
}
.yr-set .spark { display: inline-block; color: var(--yuu-blue); font-size: 0.55em; vertical-align: 0.3em; }

/* ---------- FAQ ---------- */
.yr-faq__grid { display: grid; gap: 3rem; }
.yr-faq__aside .h2 { margin-top: 1.25rem; }
.yr-faq__aside .serif { color: var(--yuu-blue); }
.page-yuu .faq-q .faq-num { color: var(--yuu-dark); }
.page-yuu .faq-q[aria-expanded="true"] .faq-sign { background: var(--yuu-blue); color: var(--white); }
@media (min-width: 1000px) {
  .yr-faq__grid { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; }
  .yr-faq__aside { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* ---------- Closing band ---------- */
.yr-close { position: relative; overflow: hidden; isolation: isolate; background: var(--yuu-blue); color: var(--white); }
.yr-close::before { /* yellow ring, as on the rate card */
  content: ''; position: absolute; z-index: -1;
  width: 16rem; aspect-ratio: 1; right: -9rem; top: -10rem;
  border-radius: 50%; border: 6px solid var(--yuu-yellow); opacity: 0.85;
}
@media (min-width: 700px) {
  .yr-close::before { width: clamp(22rem, 40vw, 44rem); right: clamp(-16rem, -12vw, -6rem); top: clamp(-16rem, -14vw, -8rem); }
}
.yr-close__inner { display: grid; justify-items: start; gap: clamp(1.75rem, 1rem + 2vw, 3rem); padding-block: clamp(4rem, 3rem + 5vw, 8.5rem) clamp(3rem, 2rem + 3vw, 5rem); }
.yr-close__title { font: 600 clamp(3.4rem, 1rem + 9vw, 11rem)/0.86 var(--font-display); letter-spacing: -0.055em; color: var(--white); }
.yr-close .yr-actions { margin-top: 0; }
.yr-close__fine { background: var(--yuu-dark); padding-block: 1.25rem; }
.yr-fine { font-size: 0.875rem; line-height: 1.5; color: var(--white); }
