/* Journey page: scroll story. Loaded after site.css; uses its colour tokens. */
:root {
  --j-head: var(--header-h); /* height of the sticky site header */
  --app-bg: #1d324e; --app-bg2: #152740; --tile: #33465e; --tile-line: #4a5d75;
  --app-dim: #93a5ba; --sheet: #1c1c1e; --frame: #050b14;
  --j-green: #16884a; --j-green2: #22c06b; --j-amber: #e8a100; --j-red: #e23b3b;
}
.ro-journey-hero .ro-btn { margin-top: 1.5rem; }
/* Home page: the heading sits right above the sticky story. */
.ro-seeit { padding-bottom: 8px; }
.ro-seeit .ro-section__head { margin-bottom: 0; }
.ro-seeit__note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 18px; margin-bottom: 0; }

/* ---------- Shell ---------- */
.journey { position: relative; height: 930vh; }
.journey-sticky {
  position: sticky; top: var(--j-head); height: calc(100dvh - var(--j-head));
  overflow: hidden; display: flex; flex-direction: column;
}
.journey-sticky::before {
  content: ""; position: absolute; z-index: -1; width: 640px; height: 640px; right: 8%; top: 10%; border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 212, 116, .22), transparent 65%); filter: blur(40px); pointer-events: none;
}
.journey-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 4px; width: min(var(--wrap), 100%); margin: 0 auto; }
.journey-head small { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; color: var(--muted); }
.progress-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; flex: 1; margin: 0 16px; }
.progress-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--yellow)); box-shadow: 0 0 12px rgba(51, 212, 116, .6); }
.stage-count { font-weight: 800; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.journey-main {
  flex: 1; display: grid; grid-template-columns: 1fr 400px; grid-template-rows: minmax(0, 1fr); gap: 24px; align-items: center;
  width: min(var(--wrap), 100%); margin: 0 auto; padding: 6px 16px 20px; min-height: 0;
}

/* ---------- Stage copy ---------- */
/* All captions share one grid cell, so the box is as tall as the tallest one and nothing is clipped. */
.copy-stack { position: relative; display: grid; align-items: start; }
.stage-copy { grid-area: 1 / 1; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.stage-copy.active { opacity: 1; transform: none; pointer-events: auto; }
.stage-copy .num { font-size: 13px; font-weight: 800; letter-spacing: .16em; color: var(--mint); }
.stage-copy h2 { font-size: clamp(34px, 4.2vw, 56px); margin: 10px 0 12px; max-width: 12ch; }
.stage-copy p { font-size: 1.15rem; color: var(--muted); max-width: 36ch; margin: 0; }
.stage-copy .fact {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  font-weight: 600; font-size: 14px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong);
}
.stage-copy .fact::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dots { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.dots button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04);
  color: var(--muted); font: 800 .95rem var(--font); cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.dots button:hover { color: #fff; transform: translateY(-2px); }
.dots button.on { background: var(--green); color: #04210f; border-color: var(--green); box-shadow: var(--glow); }

/* ---------- Phone frame ---------- */
/* The phone is always drawn at one design size (356 x 653) and scaled as a whole to fit the space,
   so every tile and screen shows completely on any screen. journey.js sets --phone-scale. */
.stage-zone { position: relative; display: flex; justify-content: center; align-items: center; min-height: 0; height: 100%; overflow: hidden; }
.phone-fit { width: calc(356px * var(--phone-scale, 1)); height: calc(653px * var(--phone-scale, 1)); flex: 0 0 auto; }
.frame {
  position: relative; width: 356px; height: 653px; transform: scale(var(--phone-scale, 1)); transform-origin: 0 0;
  border-radius: 40px; padding: 9px; background: linear-gradient(160deg, #2a4a6e, var(--frame));
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .12), 0 0 80px rgba(51, 212, 116, .12);
}
.screen { position: relative; border-radius: 31px; overflow: hidden; height: 100%; background: var(--app-bg); color: #fff; font-family: var(--font); }

/* ---------- App layers (the app UI, rebuilt in code) ---------- */
.layer { position: absolute; inset: 0; will-change: opacity, transform; }
.layer-list { background: linear-gradient(180deg, var(--app-bg) 0%, var(--app-bg2) 100%); padding: 14px 12px 64px; display: flex; flex-direction: column; }
.app-top { display: flex; align-items: center; gap: 6px; padding: 2px 2px 10px; }
.app-top .back { font-size: 19px; line-height: 1; flex: 0 0 auto; }
.app-top .app-title { font-weight: 700; font-size: 16.5px; flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.store-pill { font-size: 9.5px; font-weight: 700; background: #e8f6df; color: #177a3d; border-radius: 999px; padding: 3px 7px; white-space: nowrap; opacity: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.app-top .help { width: 26px; height: 26px; border: 2px solid #c8d4e2; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #e6edf5; flex: 0 0 auto; }
.app-actions { display: flex; gap: 10px; }
.app-actions .btn-get { flex: 1.15; background: #159947; color: #fff; font-weight: 600; font-size: 15px; text-align: center; border-radius: 12px; padding: 10px 4px; }
.app-actions .btn-basket { flex: 1; background: #f0b90b; color: #221a02; font-weight: 600; font-size: 15px; text-align: center; border-radius: 12px; padding: 10px 4px; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 10px; }
.section-row .sec-name { font-size: 16px; font-weight: 600; border-left: 4px solid var(--j-green2); padding-left: 9px; }
.sort-pill { font-size: 12px; color: #dbe5ef; background: rgba(255, 255, 255, .13); border-radius: 8px; padding: 5px 10px; }
.tiles { display: flex; flex-direction: column; }
.tile-wrap { overflow: hidden; }
.tile { position: relative; display: flex; align-items: center; gap: 10px; background: var(--tile); border: 1px solid var(--tile-line); border-radius: 12px; padding: 8px 10px 8px 14px; height: 62px; margin-bottom: 8px; overflow: hidden; }
.tile .lifebar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--j-green2); border-radius: 4px 0 0 4px; }
.tile .thumb { width: 42px; height: 42px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.tile .t-main { flex: 1; min-width: 0; }
.tile .t-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.price-row { display: flex; align-items: center; gap: 5px; margin-top: 4px; will-change: transform, opacity; transform-origin: left center; }
.price { display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px 2px 2px; border-radius: 7px; border: 1.5px solid transparent; }
.price .logo { background: #fff; border-radius: 5px; padding: 1px 5px; font-size: 9.5px; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.logo.coles { color: #e01a22; text-transform: lowercase; letter-spacing: -.02em; }
.logo.wool { color: #146a35; font-weight: 700; }
.price .amount { font-size: 12.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.price.cheaper { background: #e3f4da; border-color: #5cb84a; }
.price.cheaper .amount { color: #177a3d; }
.bag-btn { width: 34px; height: 34px; border-radius: 50%; background: #142539; display: grid; place-items: center; flex: 0 0 auto; position: relative; }
.bag-btn svg { stroke: #fff; }
.bag-btn .bag-fill { position: absolute; inset: 0; border-radius: 50%; background: var(--j-green); opacity: 0; display: grid; place-items: center; }
.bag-section { margin-top: 4px; opacity: 0; }
.bag-section .sec-name { border-left-color: var(--j-amber); }
.bag-clone { overflow: hidden; display: flex; align-items: center; gap: 9px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; font-size: 13px; font-weight: 600; will-change: opacity, transform; }
.bag-clone .tick { width: 20px; height: 20px; border-radius: 50%; background: var(--j-green); display: grid; place-items: center; flex: 0 0 auto; }
.bag-clone .bc-price { margin-left: auto; font-size: 12px; color: var(--app-dim); font-weight: 600; }
.app-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; background: #101c2c; display: flex; align-items: flex-start; justify-content: space-around; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .07); }
.app-nav .nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9.5px; color: #8fa2b8; }
.app-nav .nav-item svg { display: block; }
.app-nav .nav-item.on { color: #fff; }
.app-nav .nav-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--j-green); display: grid; place-items: center; margin-top: -16px; border: 3px solid #101c2c; }

/* Basket sheet */
.basket-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--sheet); border-radius: 22px 22px 0 0; padding: 16px 16px 20px; transform: translateY(103%); will-change: transform; box-shadow: 0 -18px 40px rgba(0, 0, 0, .45); z-index: 8; }
.basket-sheet .grab { width: 38px; height: 4px; border-radius: 99px; background: #4a4a4e; margin: 0 auto 10px; }
.basket-sheet h3 { margin: 0 0 4px; font-size: 19px; text-align: center; color: #fff; }
.basket-sheet .bs-sub { margin: 0 0 12px; text-align: center; color: #a7b0ba; font-size: 12.5px; }
.bs-cards { display: flex; gap: 10px; }
.bs-card { flex: 1; background: #2a2a2e; border: 1px solid #3c3c42; border-radius: 14px; padding: 12px 8px; text-align: center; }
.bs-card .logo { display: inline-block; background: #fff; border-radius: 6px; padding: 2px 8px; font-size: 13px; font-weight: 800; }
.bs-card .bs-total { font-weight: 800; font-size: 23px; margin-top: 7px; color: #fff; }
.bs-card .bs-note { font-size: 11px; color: #9aa4ae; margin-top: 2px; }
.bs-banner { margin-top: 12px; background: #0c2417; border: 1.5px solid var(--green); border-radius: 12px; padding: 11px 12px; text-align: center; font-weight: 700; font-size: 15.5px; color: #4ade80; }
.bs-banner .logo { display: inline-block; background: #fff; border-radius: 5px; padding: 1px 7px; color: #e01a22; font-weight: 800; font-size: 13.5px; margin-right: 5px; }
.bs-fine { margin: 10px 2px 0; font-size: 11.5px; color: #9aa4ae; text-align: center; }

/* At home: consumption period */
.layer-home { background: linear-gradient(180deg, var(--app-bg) 0%, var(--app-bg2) 100%); padding: 16px 14px; opacity: 0; z-index: 5; }
.home-kicker { font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--app-dim); }
.layer-home h3, .layer-checkout h3 { font-size: 22px; margin: 6px 0 14px; color: #fff; }
.home-tile { position: relative; background: var(--tile); border: 1px solid var(--tile-line); border-radius: 16px; padding: 16px 16px 16px 24px; overflow: hidden; }
.home-tile .lifebar-big { position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--j-green2); }
.home-tile .ht-top { display: flex; align-items: center; gap: 12px; }
.home-tile .thumb { width: 56px; height: 56px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.home-tile .ht-name { font-weight: 700; font-size: 21px; }
.home-tile .ht-sub { font-size: 12.5px; color: var(--app-dim); }
.life-readout { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.life-readout .pct { font-weight: 800; font-size: 44px; line-height: 1; }
.life-readout .pct-label { font-size: 14px; color: #dbe5ef; font-weight: 600; }
.day-track { display: flex; justify-content: space-between; margin-top: 16px; padding: 0 2px; }
.day-track span { font-size: 11px; color: var(--app-dim); font-weight: 600; }
.day-track span.now { color: #fff; }
.relist-chip { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; background: #3d1512; border: 1.5px solid var(--j-red); color: #ffb3ab; border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 700; opacity: 0; }
.home-note { margin-top: 16px; font-size: 13.5px; color: var(--app-dim); max-width: 30ch; }

/* Checkout */
.layer-checkout { background: linear-gradient(180deg, #21395a 0%, var(--app-bg2) 100%); padding: 16px 14px; transform: translateY(102%); will-change: transform; z-index: 6; }
.layer-checkout h3 { margin-bottom: 4px; }
.layer-checkout .co-sub { font-size: 13.5px; color: var(--app-dim); margin: 0 0 18px; }
.wallet { position: relative; background: #0d1826; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; height: 118px; margin-top: 26px; }
.wallet .slot { position: absolute; left: 14px; right: 14px; top: 52px; height: 12px; border-radius: 99px; background: #000; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .9); z-index: 3; }
.loyalty-card { position: absolute; left: 14px; right: 14px; top: 8px; height: 168px; border-radius: 16px; background: linear-gradient(135deg, #2e5e4e 0%, #173f31 58%, #0f2d21 100%); color: #fff; padding: 15px 16px; box-shadow: 0 16px 30px rgba(0, 0, 0, .4); will-change: transform; z-index: 2; overflow: hidden; }
.loyalty-card::after { content: ""; position: absolute; right: -34px; top: -34px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.loyalty-card .lc-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .92; }
.loyalty-card .lc-chip { width: 34px; height: 25px; border-radius: 6px; background: linear-gradient(135deg, #f3d27a, #c9a13b); margin-top: 14px; }
.loyalty-card .lc-num { font-size: 16.5px; letter-spacing: .14em; margin-top: 10px; font-weight: 600; }
.loyalty-card .lc-name { font-size: 11.5px; opacity: .85; margin-top: 3px; letter-spacing: .05em; text-transform: uppercase; }
.scanner { margin-top: 104px; background: #fff; border-radius: 14px; padding: 12px; position: relative; overflow: hidden; }
.scanner .barcode-lines { height: 44px; background: repeating-linear-gradient(90deg, #141414 0 2px, transparent 2px 5px, #141414 5px 6px, transparent 6px 11px, #141414 11px 14px, transparent 14px 18px); }
.scanner .scanline { position: absolute; left: 8px; right: 8px; height: 3px; background: #ff3b30; border-radius: 99px; top: 10px; box-shadow: 0 0 14px rgba(255, 59, 48, .75); opacity: 0; }
.scanner .sc-label { text-align: center; color: #5b6b5e; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 8px; }
.points-chip { margin: 16px auto 0; display: flex; width: fit-content; align-items: center; gap: 8px; background: #e8f6df; color: #177a3d; border-radius: 999px; padding: 9px 15px; font-size: 13.5px; font-weight: 700; opacity: 0; }

/* Finish */
.layer-finish { background: radial-gradient(circle at 50% 35%, #1b5a37 0%, #0d2a1a 70%); z-index: 7; opacity: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 20px; will-change: opacity, transform; }
.finish-check { width: 104px; height: 104px; }
.finish-check .fc-circle { fill: none; stroke: var(--j-green2); stroke-width: 5; }
.finish-check .fc-tick { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.layer-finish h3 { font-size: 34px; margin: 20px 0 6px; color: #fff; }
.layer-finish .fin-save { font-weight: 800; font-size: 21px; color: #7ce6a3; margin: 0; }
.layer-finish .fin-line { font-size: 16px; color: #cfe6d6; margin: 6px 0 0; }
.layer-finish .fin-small { margin-top: 20px; font-size: 12px; color: #8fb89d; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }

/* ---------- After the journey ---------- */
.ro-replay { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.ro-replay span { color: var(--muted); font-size: .92rem; }
.price-note { max-width: 720px; margin: 28px auto 0; padding: 16px 18px; border-radius: 16px; font-size: .88rem; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-align: left; }
.price-note b { color: var(--text); }

/* ---------- Phones ---------- */
.stage-copy .ro-btn { margin-top: 16px; }

@media (max-width: 860px) {
  /* Phone on top (takes all spare height), short caption underneath. */
  .journey { height: 800vh; }
  .journey-head { padding: 10px 16px 2px; }
  .journey-head small { display: none; }
  .progress-track { margin-left: 0; }
  .journey-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 4px 16px 12px; align-items: stretch; }
  .copy-col { order: 2; text-align: center; }
  .stage-copy .num { font-size: 11px; }
  .stage-copy h2 { font-size: clamp(22px, 6.4vw, 28px); margin: 4px auto 4px; max-width: 18ch; }
  .stage-copy p { font-size: 14.5px; margin-inline: auto; }
  .stage-copy .fact { display: none; }
  .stage-copy .ro-btn { margin-top: 10px; }
  .dots { display: none; }
  .stage-zone { order: 1; }
}
@media (max-width: 860px) and (max-height: 640px) {
  .stage-copy p { display: none; }
}

/* ---------- Reduced motion (often on work / pooled virtual desktops): same scroll story,
   but journey.js jumps each step straight to its finished picture, and captions swap without sliding. ---------- */
@media (prefers-reduced-motion: reduce) {
  .stage-copy { transition: none; transform: none; }
}
/* Two loyalty cards: Flybuys scans, Everyday Rewards waits behind it */
.loyalty-card.lc-flybuys { background: linear-gradient(135deg, #2563eb 0%, #1238a8 58%, #0b2470 100%); }
.loyalty-card.lc-rewards { background: linear-gradient(135deg, #ff9a3c 0%, #f06a00 60%, #c44f00 100%); }
.loyalty-card--back { z-index: 1; transform: translate(16px, -30px) rotate(5deg); }
.loyalty-card--back .lc-top { justify-content: flex-end; gap: 10px; }
