/* Hero: stage lights, copy, order card with pay animation */
.hero {
  position: relative; min-height: max(760px, 100svh); display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 96px; overflow: hidden; isolation: isolate;
}
.stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.stage::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(180deg, transparent, #000);
}
.beam {
  position: absolute; top: -10%; bottom: 20%; left: var(--x); width: var(--w);
  background: linear-gradient(180deg, rgba(250, 204, 82, .10), rgba(252, 85, 76, .05) 45%, transparent 85%);
  filter: blur(14px); opacity: .55; transform-origin: top center;
  animation: beam 11s ease-in-out var(--d) infinite alternate;
}
.beam:nth-child(even) { background: linear-gradient(180deg, rgba(250, 6, 73, .09), rgba(252, 85, 76, .04) 50%, transparent 85%); }
@keyframes beam {
  0% { opacity: .25; transform: skewX(-4deg); }
  50% { opacity: .7; }
  100% { opacity: .35; transform: skewX(5deg); }
}
.glow {
  position: absolute; width: 900px; height: 700px; right: -180px; top: 4%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(252, 85, 76, .22), rgba(250, 6, 73, .08) 45%, transparent 70%);
  filter: blur(10px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy .h1 { margin-top: 2px; }
.hero-copy .lead { max-width: 48ch; }
.hero-copy .cta-row { margin-top: 10px; }
.hero-note { color: var(--dim-text); font-size: 14px; }

/* CSS-only entrance: runs without JS, ends fully visible, skipped under reduced motion (base.css). */
.hero-in { animation: hero-rise .9s var(--ease) both; }
.hero-copy > .hero-in:nth-child(2) { animation-delay: .06s; }
.hero-copy > .hero-in:nth-child(3) { animation-delay: .12s; }
.hero-copy > .hero-in:nth-child(4) { animation-delay: .18s; }
.hero-copy > .hero-in:nth-child(5) { animation-delay: .24s; }
.hero-visual.hero-in { animation-delay: .2s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } }

/* Visual */
.hero-visual { position: relative; display: grid; justify-items: center; min-height: 560px; align-content: center; }
.phone-back {
  position: absolute; width: 170px; height: 320px; left: calc(50% - 210px); bottom: 10px;
  border-radius: 34px; border: 1px solid var(--line-2); background: linear-gradient(160deg, #1b191e, #0b0a0c);
  transform: rotate(-13deg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); padding: 12px;
}
.pb-screen { height: 100%; border-radius: 24px; background: #0c0b0d; border: 1px solid var(--line); padding: 30px 14px 14px; display: grid; gap: 10px; align-content: start; }
.pb-screen i { height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.pb-screen b { margin-top: 70px; height: 34px; border-radius: 999px; background: var(--grad); opacity: .75; }

.order-card {
  position: relative; width: min(360px, 100%); border-radius: var(--r-lg); padding: 22px;
  background: linear-gradient(180deg, rgba(31, 28, 34, .92), rgba(14, 13, 16, .96));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(252, 85, 76, .06), 0 0 80px -30px var(--glow);
  transform: rotate(-3deg); transition: transform .6s var(--ease);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.order-card:hover { transform: rotate(-1.5deg) translateY(-4px); }
.order-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(250, 204, 82, .45), transparent 35%, transparent 65%, rgba(250, 6, 73, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.oc-top { display: flex; align-items: center; justify-content: space-between; }
.oc-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.04em; font-size: 17px; }
.oc-views { display: grid; margin-top: 18px; }
.oc-view { grid-area: 1 / 1; transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s linear .45s; opacity: 0; visibility: hidden; transform: translateY(8px); }
.order-card[data-state="order"] .oc-order,
.order-card[data-state="paying"] .oc-fill,
.order-card[data-state="paid"] .oc-paid { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.oc-title { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.oc-title span { display: block; color: var(--muted); font-size: 17px; letter-spacing: -0.01em; margin-top: 6px; }
.oc-list { margin-top: 18px; }
.oc-list li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.oc-name { flex: 1; font-weight: 500; font-size: 15px; line-height: 1.25; }
.oc-name small { display: block; color: var(--dim-text); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.oc-price { font-variant-numeric: tabular-nums; font-size: 15px; }
.oc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 16px; color: var(--muted); font-size: 14px; }
.oc-total strong { color: var(--text); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.oc-pay { width: 100%; height: 54px; justify-content: space-between; padding: 0 10px 0 22px; }
.oc-pay-amt { background: rgba(0, 0, 0, .14); padding: 6px 12px; border-radius: 999px; font-size: 14px; }

.oc-fill { display: grid; justify-items: center; align-content: center; gap: 14px; }
.fill-glass { width: 180px; height: 226px; overflow: visible; filter: drop-shadow(0 0 28px rgba(252, 85, 76, .45)); }
.glass-line { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.straw { stroke: var(--y); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.liquid { transform: translateY(80px); }
.bub { fill: rgba(255, 255, 255, .85); opacity: 0; transform-box: fill-box; }
.order-card[data-state="paying"] .liquid { animation: fill 1.6s cubic-bezier(.5, .1, .3, 1) forwards; }
.order-card[data-state="paying"] .straw { animation: straw .4s ease 1.4s forwards; }
.order-card[data-state="paying"] .bub { animation: bub 1.1s ease-in .6s infinite; }
.order-card[data-state="paying"] .b2 { animation-delay: .85s; }
.order-card[data-state="paying"] .b3 { animation-delay: 1.05s; }
.order-card[data-state="paying"] .b4 { animation-delay: 1.3s; }
@keyframes fill { to { transform: translateY(6px); } }
@keyframes straw { to { opacity: 1; } }
@keyframes bub { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-58px); } }
.oc-fill-text { color: var(--muted); font-size: 15px; }
.dots i { font-style: normal; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.oc-paid { display: grid; justify-items: center; text-align: center; gap: 10px; align-content: center; }
.oc-paid-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px;
  background: var(--grad); color: var(--ink); font-weight: 600; font-size: 14px;
}
.oc-paid-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.oc-paid-title { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.oc-paid .qr { width: 168px; margin-top: 6px; box-shadow: 0 0 50px -10px var(--glow); }
.order-card[data-state="paid"] .qr { animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.oc-code { color: var(--muted); font-size: 13.5px; }
.oc-replay { margin-top: 6px; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 24px; }
  .phone-back { left: calc(50% - 190px); }
}
@media (max-width: 899px) {
  .hero { min-height: 0; padding: calc(var(--nav-h) + 28px) 0 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-copy { gap: 18px; }
  .hero-copy .cta-row { margin-top: 4px; }
  .hero-visual { min-height: 0; padding: 10px 0 20px; }
  .phone-back { width: 140px; height: 260px; left: auto; right: calc(50% + 70px); bottom: -10px; }
  .glow { right: -400px; top: 30%; }
}
@media (max-width: 480px) {
  .order-card { padding: 18px; transform: rotate(-2deg); }
  .oc-title { font-size: 24px; }
  .phone-back { right: calc(50% + 40px); }
  .cta-row .btn-lg { flex: 1 1 100%; }
}

/* "Tap Pay now" cue: a touch dot taps the button, the button pulses, a label points at it. All gone after the first tap. */
.oc-pay { position: relative; }
.oc-pay::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(252, 85, 76, .55); animation: pay-pulse 2.4s ease-out infinite;
}
.oc-tap {
  position: absolute; left: 44%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .9); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); opacity: 0;
  animation: tap-dot 2.4s var(--ease) infinite;
}
.oc-tap::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); opacity: 0;
  animation: tap-ring 2.4s ease-out infinite;
}
.oc-hint {
  position: absolute; right: calc(100% + 14px); bottom: 34px; z-index: 2; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px 9px 16px; border-radius: 999px;
  font-size: 15px; color: var(--muted); background: var(--surface-2); border: 1px solid rgba(252, 85, 76, .45);
  box-shadow: 0 10px 30px -10px var(--glow); pointer-events: none;
  animation: hint-nudge 1.2s ease-in-out infinite alternate; transition: opacity .4s, visibility 0s linear .4s;
}
.oc-hint b { color: var(--text); font-weight: 600; }
.oc-hint svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.order-card.was-tried .oc-pay::after, .order-card.was-tried .oc-tap { display: none; }
.order-card.was-tried .oc-hint { opacity: 0; visibility: hidden; }
@keyframes pay-pulse { 0% { box-shadow: 0 0 0 0 rgba(252, 85, 76, .55); } 60%, 100% { box-shadow: 0 0 0 14px rgba(252, 85, 76, 0); } }
@keyframes tap-dot {
  0% { opacity: 0; transform: translate(26px, 22px) scale(1); }
  25% { opacity: 1; transform: translate(0, 0) scale(1); }
  35% { transform: scale(.75); }
  45% { opacity: 1; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes tap-ring { 0%, 33% { opacity: 0; transform: scale(1); } 36% { opacity: .9; } 70%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes hint-nudge { from { transform: translateX(0); } to { transform: translateX(6px); } }
@keyframes hint-nudge-up { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -5px); } }
/* No room to the left on tablets and phones: the label sits under the card and points up. */
@media (max-width: 1180px) {
  .oc-hint { right: auto; left: 50%; bottom: auto; top: calc(100% + 16px); transform: translateX(-50%); padding: 9px 16px 9px 12px; animation-name: hint-nudge-up; }
  .oc-hint svg { order: -1; transform: rotate(-90deg); }
  .hero-visual { padding-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) { .oc-tap { display: none; } }
