.hero {
  position: relative;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
  padding: 7.5rem 1.25rem 4.5rem;
  overflow: hidden;
}

/* Decorative geometry behind the hero content. Everything here is inert:
   pointer-events off so it can never swallow a click, and the container is
   aria-hidden in the markup. js/main.js drifts the shapes slowly; without JS
   (or with reduced motion) they sit exactly where these rules put them. */
.hero__shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__shape {
  position: absolute;
  display: block;
}

.hero__shape--ring {
  width: 15rem;
  height: 15rem;
  top: 6%;
  right: 2%;
  border: 2px solid rgba(59, 100, 150, 0.18);
  border-radius: 50%;
}

.hero__shape--square {
  width: 9rem;
  height: 9rem;
  bottom: 5%;
  left: 1%;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(212, 160, 23, 0.16),
    rgba(212, 160, 23, 0.03)
  );
  transform: rotate(12deg);
}

.hero__shape--dot {
  width: 4.5rem;
  height: 4.5rem;
  top: 16%;
  left: 36%;
  border-radius: 50%;
  background: rgba(59, 100, 150, 0.12);
}

.hero__shape--gold {
  width: 1.75rem;
  height: 1.75rem;
  bottom: 24%;
  right: 28%;
  border-radius: 8px;
  background: rgba(212, 160, 23, 0.4);
}

/* On a phone the two large shapes crowd the copy, and the effect is meant to
   be background texture rather than an obstacle. The small ones stay. */
@media (max-width: 640px) {
  .hero__shape--ring,
  .hero__shape--square {
    display: none;
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 36rem;
}

.hero__heading {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  color: var(--ink);
  line-height: 1.08;
}

.hero__accent {
  color: var(--blue-700);
  position: relative;
  white-space: nowrap;
}

.hero__accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.28em;
  background: var(--gold-100);
  z-index: -1;
  border-radius: 4px;
}

.hero__sub {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--slate-600);
  max-width: 38ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.5rem;
}

/* The third action is a text link, not a button. inline-flex + centred
   alignment so it sits on the buttons' centre line rather than stretching to
   their height, and the underline carries the affordance a border would. */
.hero__link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--blue-700);
  text-decoration: underline;
  text-decoration-color: var(--slate-300);
  text-underline-offset: 4px;
  transition: color var(--dur-fast) var(--ease-out),
    text-decoration-color var(--dur-fast) var(--ease-out);
}

.hero__link:hover {
  color: var(--blue-600);
  text-decoration-color: currentColor;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

/* ---------- Receipt ---------- */

.hero__receipt-wrap {
  display: flex;
  justify-content: center;
  perspective: 1200px;
  will-change: transform;
}

.receipt {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  padding: 1.5rem 1.5rem 4.5rem;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-lg);
  will-change: transform;
}

.receipt__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.receipt__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--blue-700);
}

.receipt__tag {
  font-size: 0.75rem;
  color: var(--slate-500);
}

.receipt__meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.receipt__meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
}

.receipt__meta-row dt {
  color: var(--slate-500);
}

.receipt__rule {
  border: none;
  border-top: 1px solid var(--slate-200);
  margin: 0.75rem 0;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  animation: rule-draw var(--dur-base) var(--ease-out) forwards;
}

.receipt__rule[data-rule="1"] {
  animation-delay: 140ms;
}

.receipt__rule[data-rule="2"] {
  animation-delay: 640ms;
}

@keyframes rule-draw {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.receipt__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.receipt__items li {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  opacity: 0;
  animation: item-in var(--dur-fast) var(--ease-out) forwards;
}

.receipt__items li:nth-child(1) {
  animation-delay: 260ms;
}

.receipt__items li:nth-child(2) {
  animation-delay: 340ms;
}

.receipt__items li:nth-child(3) {
  animation-delay: 420ms;
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.receipt__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1rem;
  font-weight: 600;
  margin: 0.75rem 0;
  opacity: 0;
  animation: item-in var(--dur-fast) var(--ease-out) forwards;
  animation-delay: 720ms;
}

.receipt__total-amount {
  color: var(--gold-600);
  font-size: 1.25rem;
}

.receipt__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* A gold pill, so the mark reads as a stamp of approval on the receipt rather
   than as a machine-readable graphic. The reveal is kept from the element this
   replaced (it resolves last, after the amount has counted up). */
.receipt__verified {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.6rem;
  border: 1.5px solid var(--gold-500);
  border-radius: 999px;
  background: var(--gold-100);
  color: var(--gold-600);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.92);
  animation: badge-resolve var(--dur-base) var(--ease-out) forwards;
  animation-delay: 820ms;
}

@keyframes badge-resolve {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.receipt__verify {
  font-size: 0.75rem;
  color: var(--slate-500);
  line-height: 1.4;
}

.receipt__stamp {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  border: 2px solid var(--green-600);
  color: var(--green-600);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: rotate(-12deg) scale(1.3);
  opacity: 0;
  animation: stamp-land var(--dur-base) var(--ease-out) forwards;
  animation-delay: 1020ms;
}

@keyframes stamp-land {
  from {
    opacity: 0;
    transform: rotate(-12deg) scale(1.3);
  }
  to {
    opacity: 1;
    transform: rotate(-12deg) scale(1);
  }
}

@media (min-width: 860px) {
  .hero {
    padding: 8.5rem 2rem 7rem;
  }

  .hero__inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 2rem;
  }

  .hero__receipt-wrap {
    justify-content: flex-end;
  }

  .receipt {
    max-width: 340px;
  }
}

@media (max-width: 380px) {
  .receipt {
    transform: rotate(-2deg);
    max-width: 100%;
    padding: 1.25rem 1.25rem 4.5rem;
  }

  .hero__accent {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .receipt__rule,
  .receipt__items li,
  .receipt__total,
  .receipt__verified,
  .receipt__stamp {
    animation: none !important;
    opacity: 1 !important;
  }

  .receipt__rule {
    transform: scaleX(1) !important;
  }

  .receipt__verified {
    transform: scale(1) !important;
  }

  .receipt__stamp {
    transform: rotate(-12deg) scale(1) !important;
  }
}
