/* ==========================================================================
   ADVASA — Base, layout and components
   Every value in this file references a token. No raw values. check.py
   enforces it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   RESET AND BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--action); text-underline-offset: 0.2em; }
a:hover { color: var(--action-hover); }

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--s-4);
  top: var(--s-4);
  z-index: 10;
  background: var(--bg);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--brand-800);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--s-4); max-width: var(--measure); }

.lede {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--n-600);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--brand-500);
  margin: 0 0 var(--s-3);
}

.note { font-size: var(--fs-sm); color: var(--text-muted); }
/* a caption under a full-width row is not running prose; let it breathe */
/* A sentence directly under a full-width row runs the row's full width,
   so it never looks cut off beneath boxes four times its length. */
.grid ~ p { max-width: none; }
.grid + p { margin-top: var(--s-4); }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.section { padding-block: var(--s-12); }
.section--tint { background: var(--bg-tint); }
.section--subtle { background: var(--bg-subtle); }

.section--inverse {
  background: var(--bg-inverse);
  color: var(--text-invert);
}
.section--inverse h1,
.section--inverse h2,
.section--inverse h3 { color: var(--text-invert); }
.section--inverse .lede { color: var(--brand-200); }
.section--inverse a { color: var(--brand-200); }

.grid { display: grid; gap: var(--s-6); }

/* --------------------------------------------------------------------------
   NAV AND LANGUAGE SWITCH
   -------------------------------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-6);
  padding-block: var(--s-3);
}

.nav__brand {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: var(--tracking-wide);
  color: var(--brand-800);
  text-decoration: none;
  margin-right: auto;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--n-600);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--brand-800); }

/* Narrow screens: brand, language and ☰ on one row; the menu opens below as a
   list with thumb-sized rows. Only once nav.js runs, so it never hides for good. */
.nav__toggle { display: none; }
.has-nav-toggle .nav__toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
  color: var(--brand-800);
  cursor: pointer;
  order: 3;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav__toggle span { position: relative; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after  { top: 7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span::after  { transform: translateY(-7px) rotate(-45deg); }

.has-nav-toggle .nav .lang { order: 2; }
.has-nav-toggle .nav nav { order: 4; width: 100%; display: none; }
.has-nav-toggle .nav.is-open nav { display: block; }
.has-nav-toggle .nav__links { flex-direction: column; gap: 0; padding-bottom: var(--s-2); }
.has-nav-toggle .nav__links a {
  display: block;
  padding: var(--s-3) 0;
  font-size: var(--fs-base, 1rem);
  border-top: 1px solid var(--rule);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--fs-xs);
  font-weight: 500;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: var(--s-1) var(--s-3);
  text-decoration: none;
  color: var(--n-600);
}
.lang:hover { border-color: var(--brand-500); color: var(--brand-800); }

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-sm);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-pill);
  border: 1px solid var(--action);
  color: var(--action);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.btn--primary { background: var(--action); color: var(--text-invert); }
.btn--sm { padding: var(--s-2) var(--s-4); font-size: var(--fs-xs); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); max-width: none; }
.btn--primary:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
  color: var(--text-invert);
}

.btn[disabled],
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }


/* --------------------------------------------------------------------------
   HERO — a three-slide carousel. One person, one place, one product surface.
   Slide 1 is the static fallback: without JavaScript the nav stays hidden and
   the other two slides stay closed, so the page still says one whole thing.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--bg-inverse);
}

.hero__slide[hidden] { display: none; }

.hero__slide {
  display: grid;
  grid-template-columns: 1fr;
}

/* With the script running, all three slides share one cell. The incoming
   slide fades in on top of the outgoing one, which stays put until the fade
   ends, so the navy never shows through mid-change. The tallest slide sets the
   height, so the page below never jumps. */
.hero--live .hero__track { display: grid; }
.hero--live .hero__slide {
  grid-area: 1 / 1;
  background: var(--bg-inverse);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s linear 700ms, visibility 0s linear 700ms;
}
.hero--live .hero__slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition: opacity 700ms ease, visibility 0s;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-4);
  padding: var(--s-12) var(--s-6) var(--s-16);
  color: var(--text-invert);
}

.hero__copy h1,
.hero__copy h2 { color: var(--text-invert); margin: 0; }
.hero__copy .lede { color: var(--brand-200); margin: 0; }
.hero__copy p { margin: 0; }
/* Headings break only between phrases: never "Paid / today", never "カ / ード". */
.ph { display: inline-block; }   /* a phrase that never breaks inside itself */

.eyebrow--invert { color: var(--brand-500); }

.hero__fig { margin: 0; overflow: hidden; }

.hero__fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__nav {
  position: relative;                 /* phones: a row under the photo */
  z-index: 2;                         /* above the active slide */
  padding: var(--s-4) var(--s-6) var(--s-6);
  background: var(--bg-inverse);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.hero__arrow {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--brand-500);
  border-radius: 50%;
  background: transparent;
  color: var(--text-invert);
  cursor: pointer;
}

.hero__arrow svg { width: 1.25rem; height: 1.25rem; }
.hero__arrow:hover { background: var(--brand-600); border-color: var(--brand-600); }

.hero__dots { display: flex; gap: 0; }

.hero__dot {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hero__dot::before {                  /* the visible dot; the button is the tap target */
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--brand-500);
  opacity: 0.45;
  transition: opacity 160ms ease, transform 160ms ease;
}
.hero__dot[aria-current="true"]::before { opacity: 1; transform: scale(1.35); }

.hero__pause .hero__icon-play,
.hero__pause.is-stopped .hero__icon-pause { display: none; }
.hero__pause.is-stopped .hero__icon-play { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hero__dot,
  .hero--live .hero__slide,
  .hero--live .hero__slide.is-active { transition: none; }
}

/* --------------------------------------------------------------------------
   STEPS — the three-step diagram, the product in one glance
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--s-6);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  counter-increment: step;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--s-8);
  height: var(--s-8);
  border-radius: var(--r-pill);
  background: var(--brand-600);
  color: var(--text-invert);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: var(--s-4);
}

.step h3 { margin-bottom: var(--s-2); }
.step p { margin-bottom: 0; font-size: var(--fs-sm); }

.step { display: flex; flex-direction: column; overflow: hidden; }

/* The top of the real screen for that step, rising from the bottom of the card. */
.step__shot {
  margin: var(--s-6) calc(-1 * var(--s-6)) calc(-1 * var(--s-6));
  padding-top: var(--s-6);
  height: 15rem;
  margin-top: auto;
  overflow: hidden;
  background: var(--bg-tint);
}
.step h3 + p { margin-bottom: var(--s-6); }   /* the gap above the shot, which then sits on the bottom edge */
.step__screen {
  display: block;
  width: 11rem;
  margin-inline: auto;
  filter: drop-shadow(var(--shadow-lg));
}

/* The illustrative caption is one size wherever a screen appears. */
.screen-note,
.screen-caption { font-size: 0.6875rem; color: var(--text-muted); opacity: 0.8; }
.steps__note { margin: var(--s-3) 0 0; }

/* Heading on the left, the section's one action on the right. */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-8);
  margin-bottom: var(--s-6);
}
.section-head h2 { margin-bottom: 0; }
.section-head .btn { flex: none; }

/* --------------------------------------------------------------------------
   PROMO — one product shown large, after JCB's card rows: the card sits on a
   tinted band that runs off the right edge, a large faint word behind the
   heading, three short lines with icons, and the button under the card.
   -------------------------------------------------------------------------- */
.promo { overflow: clip; }

.wallet { margin: 0; }

/* A photograph in a page header, beside the heading. */
.page-photo { margin: 0; }
.page-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.stack { display: grid; gap: var(--s-4); }

/* --------------------------------------------------------------------------
   DESTINATIONS — the boxes are buttons; choosing one selects the same option
   on the screen beside them. The classes restyle the inline SVG's options.
   -------------------------------------------------------------------------- */
.dest {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.dest:hover { border-color: var(--brand-500); }
.dest[aria-pressed="true"] {
  border-color: var(--brand-600);
  box-shadow: inset 0 0 0 1px var(--brand-600);
  background: var(--bg-tint);
}
.dest__title {
  display: block;
  margin-bottom: var(--s-2);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--brand-800);
}
html[lang="ja"] .dest__title { letter-spacing: 0; line-height: var(--lh-snug); }
.dest__text { display: block; }

.dst * { transition: fill 160ms ease, stroke 160ms ease, opacity 160ms ease; }
.dst .dst-box   { fill: var(--n-0);      stroke: var(--n-200); stroke-width: 1; }
.dst .dst-icon  { fill: var(--n-100); }
.dst .dst-g1    { fill: var(--brand-500); }
.dst .dst-g1s   { stroke: var(--brand-500); }
.dst .dst-g2    { fill: var(--brand-800); }
.dst .dst-g2s   { stroke: var(--brand-800); }
.dst .dst-title { fill: var(--n-600); }
.dst .dst-sub   { fill: var(--n-400); }
.dst .dst-radio { fill: var(--n-0); stroke: var(--n-300); }
.dst .dst-tick  { opacity: 0; }
.dst.is-on .dst-box   { fill: var(--bg-tint); stroke: var(--brand-600); stroke-width: 2; }
.dst.is-on .dst-icon  { fill: var(--brand-600); }
.dst.is-on .dst-g1    { fill: var(--n-0); }
.dst.is-on .dst-g1s   { stroke: var(--n-0); }
.dst.is-on .dst-g2    { fill: var(--brand-600); }
.dst.is-on .dst-g2s   { stroke: var(--brand-600); }
.dst.is-on .dst-title { fill: var(--brand-800); }
.dst.is-on .dst-sub   { fill: var(--brand-500); }
.dst.is-on .dst-radio { fill: var(--brand-600); stroke: var(--brand-600); }
.dst.is-on .dst-tick  { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .dest, .dst * { transition: none; }
}

/* Sub-heading inside a merged section, and room for the sticky header when a
   jump link lands on a section. */
.subhead { margin: var(--s-8) 0 var(--s-4); }
section[id] { scroll-margin-top: 4.5rem; }

/* --------------------------------------------------------------------------
   CALCULATOR — Getting paid early. The track fills to what you can request,
   then a paler stretch for wages earned above the ceiling.
   -------------------------------------------------------------------------- */
.calc { margin-top: var(--s-6); }
.calc__control[hidden] { display: none; }
.calc__label { display: block; font-weight: 600; color: var(--brand-800); margin-bottom: var(--s-3); }

.calc__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.6rem;
  margin: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg,
    var(--brand-600) 0 var(--p-avail, 15%),
    var(--brand-200) var(--p-avail, 15%) var(--p-earned, 15%),
    var(--n-200) var(--p-earned, 15%) 100%);
  cursor: pointer;
}
.calc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--n-0); border: 3px solid var(--brand-600);
  box-shadow: var(--shadow-sm);
}
.calc__range::-moz-range-thumb {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--n-0); border: 3px solid var(--brand-600);
  box-shadow: var(--shadow-sm);
}
.calc__range:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 6px; }

.calc__scale { position: relative; height: 2rem; }
.calc__mark {
  position: absolute;
  top: 0.5rem;
  transform: translateX(-50%);
  padding-top: 0.6rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--brand-600);
  white-space: nowrap;
}
.calc__mark::before {                       /* a tick up to the track */
  content: "";
  position: absolute;
  left: 50%;
  top: -0.5rem;
  width: 2px;
  height: 0.9rem;
  background: var(--brand-600);
}

.calc__rows { margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.calc__rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--rule);
}
.calc__rows dt { color: var(--text-muted); }
.calc__rows dd { margin: 0; font-weight: 600; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.calc__result { border-bottom: 0 !important; }
.calc__result dt { color: var(--brand-800); font-weight: 600; }
.calc__result dd { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--brand-600); }
.calc__why { margin: var(--s-2) 0 var(--s-4); font-size: var(--fs-sm); color: var(--text-muted); }
.calc.is-capped .calc__why { color: var(--brand-600); font-weight: 600; }

/* --------------------------------------------------------------------------
   WAGE DIAGRAMS — Not a loan. Adapted from the adbt.io EWA page: daily wages
   held until payday, beside the same wages available once worked.
   -------------------------------------------------------------------------- */
.wage-figs { display: grid; gap: var(--s-6); margin: var(--s-8) 0; }
.wage-fig { margin: 0; }
.wage-fig__svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.wage-fig__label { font-family: var(--font-body); font-size: 14px; }
.wage-fig figcaption {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--n-600);
}
.wage-fig figcaption strong { color: var(--brand-800); }

/* --------------------------------------------------------------------------
   FLOW — For employers, How it works. Four icons on the same grid as the four
   stage boxes below, so each sits over its stage; arrows sit in the gaps.
   -------------------------------------------------------------------------- */
.flow {
  --icon: 3.25rem;
  list-style: none;
  margin: var(--s-8) 0 var(--s-6);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
}
.flow__node { position: relative; display: grid; justify-items: center; gap: var(--s-2); text-align: center; }
.flow__icon {
  display: grid;
  place-items: center;
  width: var(--icon);
  height: var(--icon);
  border-radius: calc(var(--icon) * .28);
  background: var(--bg);
  border: 1px solid var(--rule);
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}
.flow__icon svg { width: calc(var(--icon) / 2); height: calc(var(--icon) / 2); }
.flow__node--app .flow__icon { background: var(--brand-800); border-color: var(--brand-800); }
.flow__brand {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--text-invert);
}
.flow__label { font-size: 0.72rem; font-weight: 600; color: var(--brand-800); line-height: 1.3; }
.flow__node:not(:last-child)::after {      /* the arrow to the next stage */
  content: "";
  position: absolute;
  top: calc(var(--icon) / 2);
  left: calc(50% + var(--icon) / 2 + var(--s-2));
  right: calc(-50% - var(--s-6) + var(--icon) / 2 + var(--s-2));
  height: 2px;
  background: var(--brand-200);
}
.flow__node:not(:last-child)::before {
  content: "";
  position: absolute;
  top: calc(var(--icon) / 2 - 5px);
  right: calc(-50% - var(--s-6) + var(--icon) / 2 + var(--s-2));
  width: 0; height: 0;
  border-left: 8px solid var(--brand-200);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   FORM — Contact. Two columns on wide screens, full-width message.
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--s-4); margin-top: var(--s-6); max-width: 46rem; }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; color: var(--brand-800); font-size: var(--fs-sm); }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--n-300);
  border-radius: 10px;
  padding: var(--s-3) var(--s-4);
  width: 100%;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: calc(var(--s-4) + 1.5rem);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23172258' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
  background-size: 1.125rem;
  cursor: pointer;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--brand-600);
  outline-offset: 1px;
  border-color: var(--brand-600);
}
.form__note { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.form .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.form .btn[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
.field .req { color: var(--alert); margin-left: 0.25em; }
.form__status {
  margin: 0;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--brand-200);
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-800);
  font-size: var(--fs-sm);
}
.form__status--error { border-color: #f3b0b2; background: #fdf0f0; color: #a3262b; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   LEGAL — long-form policy text.
   -------------------------------------------------------------------------- */
.legal h2 { font-size: var(--fs-lg); margin: var(--s-8) 0 var(--s-3); }
.legal h2:first-child { margin-top: 0; }
.legal ul { max-width: var(--measure); padding-left: 1.2em; margin: 0 0 var(--s-4); }
.legal li { margin-bottom: var(--s-2); }
.footer__privacy a { color: inherit; }

/* --------------------------------------------------------------------------
   REVEAL — scroll-in motion, set up by js/reveal.js. Only applies once the
   script has added .reveal-on, so nothing is hidden without it.
   -------------------------------------------------------------------------- */
.reveal-on [data-reveal] {
  opacity: 0;
  transition: opacity 650ms cubic-bezier(.2, .7, .2, 1), transform 650ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-on [data-reveal="row"]  { transform: translateX(-32px); }
.reveal-on [data-reveal="lift"] { transform: translateY(18px); }
.reveal-on [data-reveal="rise"] { transform: translateY(36px) scale(.98); }
.reveal-on [data-reveal].is-in  { opacity: 1; transform: none; }

/* In-page links at the top of a long page. */
.jump ul { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.jump a {
  display: inline-block;
  padding: var(--s-1) var(--s-4);
  border: 1px solid var(--brand-600);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
}
.jump a:hover { background: var(--brand-600); color: var(--text-invert); }

/* --------------------------------------------------------------------------
   COMING SOON — further cards, shown and not described. The faces are drawn
   in CSS and the details are blanked bars, so nothing is claimed about them.
   -------------------------------------------------------------------------- */
.soon { overflow: clip; }
.tiers {
  list-style: none;
  margin: var(--s-12) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-8);
}
.tier { display: grid; justify-items: start; gap: var(--s-3); }
.tier h3 { margin: var(--s-3) 0 0; }

.tier__card {
  position: relative;
  width: 100%;
  max-width: 20rem;
  aspect-ratio: 1.586;
  border-radius: 14px;
  padding: 7% 8%;
  box-shadow: 0 16px 28px var(--tier-shadow);
  overflow: hidden;
  color: var(--tier-ink);
}
.tier__card::after {                     /* a sheen across the face */
  content: "";
  position: absolute;
  inset: -40% -10%;
  background: linear-gradient(115deg, transparent 38%, var(--tier-sheen) 48%, transparent 60%);
}
/* On hover a band of light sweeps across the face once. The card itself
   does not move. */
.tier__card::before {
  content: "";
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg,
    transparent 40%, var(--tier-shine) 50%, transparent 60%);
  transform: translateX(-70%);
  pointer-events: none;
  z-index: 1;
}
.tier__card:hover::before {
  transform: translateX(70%);
  transition: transform 900ms cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .tier__card:hover::before { transition: none; transform: translateX(-70%); }
}

.tier--standard .tier__card { background: linear-gradient(135deg, var(--tier-standard-1), var(--tier-standard-2) 55%, var(--tier-standard-3)); }
.tier--gold .tier__card     { background: linear-gradient(135deg, var(--tier-gold-1), var(--tier-gold-2) 55%, var(--tier-gold-3)); }
.tier--platinum .tier__card { background: linear-gradient(135deg, var(--tier-platinum-1), var(--tier-platinum-2) 55%, var(--tier-platinum-3)); }

.tier__brand {
  display: block;
  width: 34%;
  height: auto;
  filter: brightness(0) invert(1);      /* the orange wordmark, printed white */
  opacity: 0.92;
}
.tier__chip {
  position: absolute;
  left: 8%;
  top: 40%;
  width: 14%;
  aspect-ratio: 1.3;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--tier-chip-1), var(--tier-chip-2));
  opacity: 0.9;
}
.tier__name {
  position: absolute;
  right: 8%;
  bottom: 9%;
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
}

.tier__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); width: 100%; max-width: 20rem; }
.tier__perks li {
  height: 0.7rem;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--n-200), var(--n-100));
}
.tier__perks li:nth-child(1) { width: 82%; }
.tier__perks li:nth-child(2) { width: 64%; }
.tier__perks li:nth-child(3) { width: 72%; }

.tier__soon {
  margin: var(--s-2) 0 0;
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--brand-600);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brand-600);
}
.wallet__screen { max-width: 15rem; }

.promo__grid { display: grid; gap: var(--s-12); align-items: center; }

.promo__copy { position: relative; }
.promo__copy > :not(.promo__mark) { position: relative; }
.promo h2 { text-wrap: balance; }

.promo__mark {
  position: absolute;
  top: -0.35em;
  left: -0.04em;
  margin: 0;
  max-width: none;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(4.5rem, 11vw, 9rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--brand-50);
  pointer-events: none;
  user-select: none;
}

.perks { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.perks li { display: flex; align-items: center; gap: var(--s-3); font-weight: 600; color: var(--brand-800); }
.perks__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--brand-600);
  border-radius: 50%;
  color: var(--brand-600);
}
.perks__icon svg { width: 1.35rem; height: 1.35rem; }

.promo__fig { position: relative; display: grid; justify-items: center; gap: var(--s-6); padding-block: var(--s-8); }
.promo__fig::before {
  content: "";
  position: absolute;
  inset: 38% -100vw 0 15%;
  background: var(--brand-100);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.promo__fig > * { position: relative; margin: 0; }
.promo__fig img {
  width: 100%;
  max-width: 26rem;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(10, 14, 34, 0.22));
}

/* --------------------------------------------------------------------------
   CARDS
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: var(--s-2); }
.card p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   PRODUCT ILLUSTRATIONS
   -------------------------------------------------------------------------- */
.screen--step {
  max-width: 11.5rem;
  margin-top: auto;          /* pinned to the bottom of the step, so the three line up */
}
.step p:has(+ .screen--step) { margin-bottom: var(--s-6); }

.shots figure { margin: 0; }
.shots figcaption {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
}

.screen {
  display: block;
  width: 100%;
  max-width: 17.5rem;
  margin-inline: auto;
  filter: drop-shadow(var(--shadow-lg));
}

.screen-caption {
  display: block;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--s-3);
}

/* --------------------------------------------------------------------------
   FAQ — disclosure list
   -------------------------------------------------------------------------- */
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: var(--s-4) 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-800);
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  float: right;
  color: var(--brand-500);
}

.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: var(--s-3) 0 0; color: var(--text-muted); }

/* the slot the fee figure drops into once it is known */
.slot {
  margin-top: var(--s-8);
  padding: var(--s-6);
  border: 1px dashed var(--brand-200);
  border-radius: var(--r-lg);
  background: var(--bg-tint);
}

.slot p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-inverse);
  color: var(--brand-200);
  padding-block: var(--s-12);
  font-size: var(--fs-sm);
}

.footer a { color: var(--brand-200); text-decoration: none; }
.footer a:hover { color: var(--text-invert); text-decoration: underline; }

.footer__grid { display: grid; gap: var(--s-8); }

.footer__brand {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: var(--tracking-wide);
  color: var(--text-invert);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.footer__legal {
  border-top: 1px solid var(--brand-600);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   JAPANESE TYPOGRAPHY
   Applied by the document's lang attribute, so the English pages are
   untouched. Japanese needs more leading and no negative tracking.
   -------------------------------------------------------------------------- */
html[lang="ja"] body { line-height: 1.8; }

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3 {
  letter-spacing: 0;
  line-height: var(--lh-snug);
}

/* The copy column holds about 384px. At the English sizes the first phrase of
   two of the Japanese headlines is wider than that and breaks mid-phrase, so the
   Japanese hero headlines share one smaller size and each phrase gets a line. */
@media (min-width: 48rem) {
  html[lang="ja"] .hero__copy h1,
  html[lang="ja"] .hero__copy h2 { font-size: clamp(1.1rem, 2.22vw, 2rem); }
}

html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3,
html[lang="ja"] .dest__title { font-weight: 700; }   /* ヒラギノ W6 */

html[lang="ja"] .nav__brand,
html[lang="ja"] .footer__brand { letter-spacing: var(--tracking-wide); }

/* --------------------------------------------------------------------------
   WIDE
   -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  /* Headings scale with the width up to their desktop size (52px and 36px at
     1440), so a narrower screen keeps the desktop layout without breaking them. */
  h1 { font-size: clamp(2rem, 3.61vw, var(--fs-3xl)); }

  .flow { --icon: 4.5rem; }
  .flow__label { font-size: var(--fs-sm); }
  .flow__brand { font-size: 0.7rem; letter-spacing: 0.18em; }
  h2 { font-size: clamp(1.4rem, 2.5vw, var(--fs-2xl)); }

  .section { padding-block: var(--s-24); }

  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps--4 { grid-template-columns: repeat(4, 1fr); }
  .promo__grid { grid-template-columns: 1fr 1.15fr; }
  /* Steps and the card read as one run, not two islands. */
  .section--steps { padding-bottom: var(--s-16); }
  .promo--after-steps { padding-top: var(--s-12); }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .wage-figs { grid-template-columns: 1fr 1fr; }
  .form { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }

  /* Tight spacing: 4rem between sections instead of 6rem. Hayate reads the
     default as empty bands. Same cut as the TOP page's steps-to-card gap. */
  .page--tight .section { padding-block: var(--s-16); }
  .page--tight .section + .section { padding-top: var(--s-12); }
  .page--tight .tiers { margin-top: var(--s-8); }

  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .media-row { align-items: center; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }





  /* One third copy, two thirds photo, height tied to width: at 1440x900 this is
     the original 480 / 960 split and 792px height, and at any narrower width
     (the TOP page on a phone lays out at 768px) it is the same composition,
     smaller, with the same crop of the photo. */
  .hero__slide { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); min-height: min(88vh, 55vw); }
  /* Heading left, button right, as on desktop: the heading wraps instead of the
     button dropping underneath it. */
  .section-head { flex-wrap: nowrap; }
  .section-head > div { min-width: 0; }
  /* The hero scales as one piece: spacing and type are fractions of the width,
     equal to the desktop values at 1440px, so a narrower screen shows the same
     composition smaller. The clamps keep text from shrinking past legible. */
  .hero__copy { padding: 4.44vw 3.33vw; gap: clamp(0.5rem, 1.1vw, 1rem); }
  .hero__copy h1 { font-size: clamp(1.5rem, 3.61vw, 3.25rem); }
  .hero__copy h2 { font-size: clamp(1.25rem, 2.5vw, 2.25rem); }
  .hero__copy .lede { font-size: clamp(0.8rem, 1.39vw, 1.25rem); }
  .hero__arrow { width: clamp(2rem, 3.06vw, 2.75rem); height: clamp(2rem, 3.06vw, 2.75rem); }
  .hero__nav { position: absolute; left: 3.33vw; bottom: 3.33vw; padding: 0; background: none; }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* The full header menu needs about 1024px; below that the ☰ menu stays. */
@media (min-width: 64rem) {
  .has-nav-toggle .nav__toggle { display: none; }
  .has-nav-toggle .nav nav { display: block; order: 0; width: auto; }
  .has-nav-toggle .nav .lang { order: 0; }
  .has-nav-toggle .nav__links { flex-direction: row; gap: var(--s-2) var(--s-4); padding-bottom: 0; }
  .has-nav-toggle .nav__links a { display: inline; padding: 0; font-size: var(--fs-sm); border-top: 0; }
}

/* ==========================================================================
   PHONES — the TOP page. Every section fits about one screen, so its heading
   is still in view while its content is read.
   ========================================================================== */
.swipe-dots { display: none; }

@media (max-width: 47.99rem) {
  /* Hero, after the Emirates NBD app: photo on top, copy on navy below. */
  .hero__slide { display: flex; flex-direction: column; }
  .hero__fig { order: -1; }
  .hero__fig img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 55% 50%; }
  .hero__copy { justify-content: flex-start; gap: var(--s-3); padding: var(--s-6) var(--s-6) var(--s-2); }
  .hero__copy .eyebrow { display: none; }   /* Received / Spent / Requested: desktop only */
  .hero__copy h1, .hero__copy h2 { font-size: 1.75rem; line-height: 1.25; }
  html[lang="ja"] .hero__copy h1, html[lang="ja"] .hero__copy h2 { font-size: 1.5rem; line-height: 1.4; }
  .hero__copy .lede { font-size: 1rem; }
  .hero__copy p:last-child { margin-top: var(--s-2); }
  .hero__copy .btn { display: block; width: 100%; text-align: center; padding: var(--s-4) var(--s-6); font-size: 1rem; }
  .hero__nav { display: flex; justify-content: center; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-6) var(--s-6); }
  .hero__arrow:not(.hero__pause) { display: none; }
  .hero__pause { width: 2rem; height: 2rem; }

  /* Tighter sections on the TOP page. */
  .section--steps, .promo, .top-rows, main > .section--inverse, main > .section:last-child { padding-block: var(--s-8); }
  main > .section h2 { font-size: 1.375rem; margin-bottom: var(--s-3); }
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-2); margin-bottom: var(--s-4); }
  .section-head .btn, main > .section .btn-row .btn, .promo__fig .btn { padding: var(--s-2) var(--s-4); font-size: var(--fs-xs); }
  .top-rows .lede { font-size: 1rem; margin-bottom: var(--s-3); }

  /* Three steps: one row that swipes, the next card peeking in. */
  [data-swipe] {
    display: flex !important;
    gap: var(--s-3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--s-4));   /* the phone gutter, so the row runs edge to edge and no further */
    padding: var(--s-1) var(--s-4) var(--s-2);
    scroll-padding-inline: var(--s-4);
    scrollbar-width: none;
  }
  [data-swipe]::-webkit-scrollbar { display: none; }
  [data-swipe] > * { flex: 0 0 80%; scroll-snap-align: start; }
  .section--steps .step__shot { height: 10rem; }
  .section--steps .step { padding: var(--s-4); }
  .section--steps .step::before { margin-bottom: var(--s-2); }
  .swipe-dots { display: flex; justify-content: center; gap: var(--s-2); margin-top: var(--s-3); }
  .swipe-dots span { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--brand-500); opacity: 0.35; transition: opacity 160ms ease, transform 160ms ease; }
  .swipe-dots span.is-on { opacity: 1; transform: scale(1.3); }

  /* Card section: the card on top at a modest size, perks as a tight list. */
  .promo__grid { gap: var(--s-2); }
  .promo__fig { padding-block: var(--s-4) 0; gap: var(--s-3); }
  .promo__fig img { max-width: 13rem; }
  .promo__fig::before { inset: 35% -100vw 0 20%; }
  .perks { margin-top: var(--s-4); gap: var(--s-3); }
  .perks li { font-size: 0.9375rem; }

  /* 返済なし・利息なし・働いた分だけ: rows, not tall boxes. */
  .top-rows .grid--3 { gap: var(--s-2); }
  .top-rows .card {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    column-gap: var(--s-3);
    padding: var(--s-4);
    box-shadow: none;
  }
  .top-rows .card::before {
    content: "";
    grid-row: 1 / span 2;
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: var(--brand-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
  }
  .top-rows .card h3 { margin: 0 0 var(--s-1); font-size: 1rem; }
  .top-rows .card p { font-size: 0.875rem; margin: 0; }
}

@media (max-width: 47.99rem) {
  /* Intro text reads as body copy on phones, not as a second heading. */
  .lede { font-size: 1rem; }
  .wide-only { display: none; }

  /* Where the money goes: the choices beside the phone, so tapping one
     visibly changes the screen. Heading and intro stay full width above. */
  #where-it-goes .media-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--s-4);
    align-items: start;
  }
  #where-it-goes .media-row > div:first-child { display: contents; }
  #where-it-goes h2, #where-it-goes .lede { grid-column: 1 / -1; }
  #where-it-goes .stack { grid-column: 1; align-self: center; gap: var(--s-2); }
  #where-it-goes .dest { padding: var(--s-3) var(--s-3); }
  #where-it-goes .dest__title { margin: 0; font-size: 0.9375rem; }
  #where-it-goes .dest__text { display: none; }
  #where-it-goes .media-row > div:last-child { grid-column: 2; }
  #where-it-goes .screen { max-width: 100%; }
}
