/* TNG eWallet payment page: handoff layout on top of the shared sections,
   plus the illustrative checkout, wallet and order UI. TNG's brand blue and
   yellow only appear on the wallet's own screens. */

:root {
  --tng-blue: #0754b4;
  --tng-yellow: #eecb38;
  --tng-ui-border: var(--color-secondary-dark);
}

.tng-benefits h2,
.tng-compare h2,
.tng-closing h2 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Hero */
section.tng-hero {
  background:
    radial-gradient(ellipse 48% 65% at 82% 48%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 76%),
    linear-gradient(105deg, #f8faff 0%, color-mix(in srgb, var(--color-primary) 6%, var(--color-white)) 100%);
}

@media (min-width: 998px) {
  section.tng-hero {
    padding-block: 4rem;
  }
}

section.tng-hero .hero-logo {
  width: auto;
  max-width: 100%;
  height: 3.25rem;
  max-height: none;
  margin: 0 0 2rem;
  padding: 0;
}

section.tng-hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.4vw, 3.25rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

section.tng-hero h1 + h3 {
  max-width: 31rem;
  margin: 1.5rem 0 1.6rem;
  padding: 0;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}

.tng-hero-media {
  position: relative;
  width: 100%;
  max-width: 32.25rem;
  margin: 0 auto;
  aspect-ratio: 516 / 540;
}

.tng-hero-photo {
  position: absolute;
  top: 4.4%;
  left: 0;
  width: 83.7%;
  height: 91.1%;
  object-fit: cover;
  object-position: 73% center;
  border-radius: 1.5rem;
}

.tng-hero-media .tng-qr-card {
  position: absolute;
  top: 6.7%;
  right: 3.5%;
  width: 46.5%;
}

.tng-float-paid {
  position: absolute;
  top: 77%;
  left: 13.6%;
  width: 55%;
}

.tng-float-notice {
  position: absolute;
  top: -1.5%;
  right: -6.8%;
  white-space: nowrap;
}

@media (max-width: 767px) {
  section.tng-hero .hero-logo {
    height: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .tng-hero-media {
    height: 23.5rem;
    aspect-ratio: auto;
  }

  .tng-hero-photo {
    top: 0;
    width: 100%;
    height: 19.75rem;
    object-position: 70% center;
    border-radius: 1.25rem;
  }

  .tng-hero-media .tng-qr-card {
    top: 4.9rem;
    right: -0.3rem;
    width: 9rem;
    border-radius: 1rem;
  }

  .tng-hero-media .tng-qr-head {
    padding: 0.6rem 0.75rem;
    font-size: 0.65rem;
  }

  .tng-hero-media .tng-qr-head strong {
    font-size: 1.15rem;
  }

  .tng-hero-media .tng-qr-body {
    padding: 0.6rem;
  }

  .tng-float-paid {
    top: auto;
    bottom: 0;
    left: 0;
    width: 12.5rem;
  }

  .tng-float-notice {
    top: 0.5rem;
    right: 0;
    left: auto;
  }

  .tng-float {
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.7rem;
  }

  .tng-float strong {
    font-size: 0.8rem;
  }

  .tng-float .tng-float-icon {
    width: 1.75rem;
    height: 1.75rem;
  }
}

/* Benefits: header split over a photo and a 2 × 2 card grid */
section.tng-benefits {
  padding-block: 5rem;
}

section.tng-benefits > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  column-gap: 2.5rem;
}

section.tng-benefits h2,
section.tng-benefits h2 + p {
  margin: 0 0 2.5rem;
  text-align: left;
}

section.tng-benefits h2 + p {
  max-width: none;
}

section.tng-benefits > div > div {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 0.82fr 1fr;
  align-items: stretch;
  gap: 1.5rem;
}

section.tng-benefits > div > div > div {
  width: auto;
}

section.tng-benefits .story-media {
  height: 100%;
  max-width: none;
}

section.tng-benefits .story-media::before {
  display: none;
}

.tng-benefits-media {
  position: relative;
  height: 100%;
  margin: 0;
}

section.tng-benefits .tng-benefits-media > img {
  height: 100%;
  min-height: 24rem;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: none;
}

section.tng-benefits ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 100%;
  margin: 0;
}

section.tng-benefits li {
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--tng-ui-border);
  border-radius: 1rem;
  background: var(--color-white);
  font-size: 1rem;
  line-height: 1.6;
}

section.tng-benefits .story-item-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
}

section.tng-benefits li strong {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.tng-proof {
  position: absolute;
  bottom: 8%;
  left: 5%;
  width: 22.5rem;
  max-width: 90%;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  background: var(--color-white);
  box-shadow: 0 8px 24px rgba(15, 35, 70, 0.16);
  font-size: 0.85rem;
  line-height: 1.3;
}

.tng-proof-main,
.tng-proof-order {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tng-proof-order {
  justify-content: space-between;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  color: var(--color-gray-500);
}

@media (max-width: 997px) {
  section.tng-benefits > div,
  section.tng-benefits > div > div {
    grid-template-columns: 1fr;
  }

  section.tng-benefits h2 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 767px) {
  section.tng-benefits {
    padding-block: 3rem;
  }

  section.tng-benefits ul {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Platform and FAQ: handoff type sizes */
section.tng-platform h2 {
  font-size: clamp(2.25rem, 4vw, 3.33rem);
}

section.tng-platform .fh-subtitle {
  max-width: 49rem;
  margin-inline: auto;
}

section.tng-faq h2 {
  font-size: clamp(2.25rem, 3.4vw, 2.75rem);
  line-height: 1.1;
}

section.tng-faq .btn {
  display: inline-flex;
}

/* Closing: full-bleed florist photo under a navy overlay instead of the rounded card */
section.tng-closing {
  isolation: isolate;
  padding-block: 4rem;
  background: var(--color-blue-darker);
}

section.tng-closing::before,
section.tng-closing::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
}

section.tng-closing::before {
  background: url('/assets/tng-ewallet/closing-florist.webp') 100% 20% / 125% auto no-repeat;
}

section.tng-closing::after {
  background:
    linear-gradient(90deg, rgba(5, 20, 62, 0.68), rgba(9, 36, 100, 0.78) 48%, rgba(8, 37, 105, 0.68)),
    linear-gradient(0deg, rgba(5, 19, 58, 0.35), transparent 62%);
}

@media (max-width: 997px) {
  section.tng-closing::before {
    background-position: 70% center;
    background-size: cover;
  }
}

section.tng-closing .bg-blue {
  border-radius: 0;
  background: transparent;
}

section.tng-closing h2 + h5 {
  max-width: 45rem;
  margin-top: 1.5rem;
  color: color-mix(in srgb, var(--color-white) 92%, var(--color-primary));
  font-size: 1.125rem;
  line-height: 1.65;
}

section.tng-closing .signup-card-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin: 1.9rem 0 0;
  padding: 0;
}

section.tng-closing .signup-card-points li {
  display: block;
  margin: 0;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(235, 244, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  font-size: 0.95rem;
  line-height: 1.4;
}

section.tng-closing .signup-card-points svg {
  display: none;
}

section.tng-closing .btn-white {
  color: var(--color-primary);
}

section.tng-closing small {
  max-width: 45.5rem;
  margin: 1.6rem auto 0;
  color: color-mix(in srgb, var(--color-white) 92%, var(--color-primary));
  font-size: 0.875rem;
}

/* Shared mock UI */
.tng-status {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-green) 14%, transparent);
  color: color-mix(in srgb, var(--color-green) 70%, var(--color-black));
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.tng-status svg {
  width: 0.8rem;
  height: 0.8rem;
}

.tng-float {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--tng-ui-border);
  border-radius: 0.875rem;
  background: var(--color-white);
  box-shadow: 0 8px 24px rgba(15, 35, 70, 0.12);
  color: var(--color-black);
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: left;
}

.tng-float > span:last-child {
  min-width: 0;
}

.tng-float strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 1rem;
}

.tng-float small {
  display: block;
  color: var(--color-gray-500);
}

.tng-float small.is-blue {
  color: var(--color-primary);
  font-weight: 600;
}

.tng-float-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.tng-float-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

img.tng-logo,
section.tng-benefits .story-media img.tng-logo {
  width: auto;
  height: 2.25rem;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}

.tng-qr-head img.tng-logo {
  align-self: flex-start;
}

.tng-proof img.tng-logo,
section.tng-benefits .story-media .tng-proof img.tng-logo {
  height: 1.95rem;
}

.tng-qr-card {
  overflow: hidden;
  border-radius: 1.375rem;
  background: var(--color-white);
  box-shadow: 0 16px 32px rgba(8, 21, 45, 0.15);
  text-align: left;
}

.tng-qr-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  background: var(--tng-blue);
  color: var(--color-white);
  font-size: 0.75rem;
  line-height: 1.2;
}

.tng-qr-head strong {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.tng-qr-body {
  padding: 1.25rem;
}

.tng-qr-frame {
  position: relative;
  padding: 0.6rem;
  background:
    linear-gradient(var(--tng-blue) 0 0) top left / 1.1rem 3px,
    linear-gradient(var(--tng-blue) 0 0) top left / 3px 1.1rem,
    linear-gradient(var(--tng-blue) 0 0) top right / 1.1rem 3px,
    linear-gradient(var(--tng-blue) 0 0) top right / 3px 1.1rem,
    linear-gradient(var(--tng-blue) 0 0) bottom left / 1.1rem 3px,
    linear-gradient(var(--tng-blue) 0 0) bottom left / 3px 1.1rem,
    linear-gradient(var(--tng-blue) 0 0) bottom right / 1.1rem 3px,
    linear-gradient(var(--tng-blue) 0 0) bottom right / 3px 1.1rem;
  background-repeat: no-repeat;
}

img.tng-qr {
  display: block;
  width: 100%;
  height: auto;
}

.tng-qr-scanline {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  left: 0.6rem;
  height: 2px;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
  .tng-qr-scanline {
    animation: tng-scan 2.4s ease-in-out infinite alternate;
  }
}

@keyframes tng-scan {
  to {
    top: calc(100% - 0.6rem - 2px);
  }
}

/* How it works: cards on the step-cards stage */
.tng-ui-card {
  width: 100%;
  max-width: 17.875rem;
  overflow: hidden;
  border: 1px solid var(--tng-ui-border);
  border-radius: 1rem;
  background: var(--color-white);
  box-shadow: 0 12px 28px rgba(0, 17, 56, 0.13);
  color: var(--color-black);
  text-align: left;
}

.tng-checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--tng-ui-border);
  color: var(--color-gray-500);
  font-size: 0.75rem;
}

.tng-checkout-head img {
  height: 1.3rem;
  width: auto;
}

.tng-checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.25rem;
  color: var(--color-gray-500);
  font-size: 0.8rem;
}

.tng-checkout-total strong {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.tng-checkout-qr {
  width: 8.5rem;
  margin: 0.5rem auto 0.75rem;
}

.tng-checkout-method {
  margin: 0;
  padding: 0.6rem;
  border-top: 1px solid var(--tng-ui-border);
  color: var(--color-gray-500);
  font-size: 0.75rem;
  text-align: center;
}

.tng-pay-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--tng-blue);
  color: var(--color-white);
  font-size: 0.95rem;
}

.tng-rows {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
}

.tng-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}

.tng-rows dt {
  color: var(--color-gray-500);
}

.tng-rows dd {
  margin: 0;
  font-weight: 600;
}

.tng-rows .is-total {
  margin-top: 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--tng-ui-border);
}

.tng-rows .is-total dd {
  color: var(--tng-blue);
  font-size: 1.05rem;
  font-weight: 700;
}

.tng-placeholder {
  display: block;
  width: 5.5rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--tng-ui-border);
}

.tng-placeholder.is-short {
  width: 3.5rem;
}

.tng-pay-action {
  display: block;
  margin: 0 1rem;
  padding: 0.55rem;
  border-radius: 0.625rem;
  background: var(--tng-yellow);
  color: var(--color-black);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
}

.tng-pay-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.6rem 1rem 0.8rem;
  color: var(--color-gray-500);
  font-size: 0.7rem;
}

.tng-pay-note svg {
  width: 0.8rem;
  height: 0.8rem;
}

.tng-matched {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 17.875rem;
}

.tng-matched-notice {
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
}

.tng-matched-notice strong {
  font-size: 0.85rem;
}

.tng-bridge {
  position: relative;
  height: 2.75rem;
  margin: -0.6rem 0;
}

.tng-bridge::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(color-mix(in srgb, var(--color-primary) 45%, var(--color-white)), var(--color-white) 55%, color-mix(in srgb, var(--color-primary) 45%, var(--color-white)));
  opacity: 0.4;
}

.tng-bridge::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: 0 0 10px var(--color-white);
  opacity: 0;
}

.tng-matched.is-ready.is-matching .tng-bridge::after {
  animation: tng-flow-down 0.78s ease-in forwards;
}

@keyframes tng-flow-down {
  12%,
  90% {
    opacity: 1;
  }

  to {
    top: calc(100% - 12px);
    opacity: 0;
  }
}

.tng-matched .tng-matched-notice {
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-gray-300));
  background: var(--color-blue-darker);
  color: var(--color-white);
  box-shadow: none;
}

.tng-matched-notice small {
  color: color-mix(in srgb, var(--color-white) 70%, var(--color-primary));
}

.tng-matched-notice .tng-float-icon {
  width: 1.8rem;
  height: 1.8rem;
  background: var(--color-white);
}

.tng-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.25rem;
  font-size: 0.875rem;
}

/* How it works: payment animation (states set by payment-journey-script) */
.tng-order-status {
  display: flex;
  align-items: center;
  transition: opacity 0.26s ease;
}

.tng-awaiting,
.tng-updating {
  display: none;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.tng-awaiting {
  background: var(--color-secondary);
  color: var(--color-gray-500);
}

.tng-awaiting i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tng-updating {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.tng-updating::before {
  content: '';
  width: 9px;
  height: 9px;
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 30%, var(--color-white));
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: tng-spin 0.85s linear infinite;
}

.tng-matched.is-ready .tng-matched-notice,
.tng-matched.is-ready .tng-bridge {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.tng-matched.is-ready.is-playing .tng-matched-notice,
.tng-matched.is-ready.is-matching .tng-bridge {
  opacity: 1;
  transform: none;
}

.tng-matched.is-ready:not(.is-paid) .tng-paid {
  display: none;
}

.tng-matched.is-ready:not(.is-playing) .tng-awaiting,
.tng-matched.is-ready.is-playing:not(.is-paid) .tng-updating {
  display: inline-flex;
}

.tng-matched.is-ready.is-paid .tng-paid {
  animation: tng-pop 0.42s cubic-bezier(0.2, 1.5, 0.5, 1) both;
}

.tng-matched.is-ready.is-paid .tng-order-head {
  animation: tng-order-received 0.65s ease-out both;
}

.tng-matched.is-event-clearing .tng-matched-notice,
.tng-matched.is-event-clearing .tng-bridge {
  opacity: 0;
}

.tng-matched.is-status-switching .tng-order-status {
  opacity: 0;
}

.tng-pay-card .is-total dd,
.tng-pay-action {
  transition: color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tng-pay-card.is-amount-focused .is-total dd {
  transform: scale(1.035);
  text-shadow: 0 0 9px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.tng-pay-card.is-confirming .tng-pay-action {
  transform: scale(0.965);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tng-yellow) 28%, transparent), inset 0 3px 9px rgba(49, 43, 0, 0.2);
}

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

@keyframes tng-pop {
  from {
    opacity: 0;
    transform: scale(0.76);
  }
}

@keyframes tng-order-received {
  from {
    background: var(--color-primary-light);
  }
}

/* v97: centred headers on the comparison and steps sections */
section.tng-compare h2,
section.tng-compare h2 + p,
section.tng-steps .sc-title,
section.tng-steps .sc-subtitle {
  margin-inline: auto;
  text-align: center;
}

/* Platform: the Still & Bloom device art already carries its own shadow and
   reflection, and the channel icons sit on the same canvas above it. */
section.tng-platform {
  --fh-line: rgba(120, 155, 229, 0.6);
  --fh-line-strong: rgba(120, 155, 229, 0.85);
  padding-block: 5rem 6rem;
}

section.tng-platform .fh-card--left {
  text-align: left;
}

.tng-checkout-qr .tng-qr-frame {
  background: none;
}

section.tng-platform .fh-device::before {
  display: none;
}

section.tng-platform .fh-device img {
  width: min(303.3px, 77.76vw);
  filter: none;
}

@media (min-width: 768px) {
  section.tng-platform .fh-device img {
    width: min(244.8px, 57.6vw);
  }
}

@media (min-width: 1100px) {
  section.tng-platform .fh-device img {
    width: min(495px, 40.05vw);
  }
}

@media (min-width: 1280px) {
  section.tng-platform .fh-device img {
    width: 446.292px;
  }
}

@media (min-width: 998px) {
  section.tng-benefits > div {
    grid-template-columns: 1.3fr 1fr;
  }
}

section.tng-compare .ct-head {
  padding-block: 1.25rem;
}

.tng-matched-notice strong {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.tng-steps) {
    scroll-behavior: smooth;
  }
}
