/* Calculator, Drinky Tap, night reel */

/* Calculator */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.calc-copy { display: grid; gap: 22px; }
.calc-card {
  padding: 36px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 0 90px -50px var(--glow);
  display: grid; gap: 28px;
}
.rng { display: grid; grid-template-columns: 1fr auto; gap: 14px 12px; align-items: baseline; }
.rng label { color: var(--muted); font-size: 15.5px; }
.rng-val { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 17px; }
.rng input { grid-column: 1 / -1; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer;
  --fill: 50%;
}
/* Filled part = the brand gradient sized to --fill (set by calc.js); the rest is an opaque track. */
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: var(--grad-h) 0 0 / var(--fill) 100% no-repeat, #2A272D;
}
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: #2A272D; }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--grad-h); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -9px;
  background: #fff; border: 4px solid var(--c); box-shadow: 0 0 0 6px rgba(252, 85, 76, .18), 0 0 18px 2px var(--glow);
  transition: transform .2s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--c);
  box-shadow: 0 0 0 6px rgba(252, 85, 76, .18), 0 0 18px 2px var(--glow);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--c), 0 0 18px 2px var(--glow); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--c); }

.calc-out { padding-top: 26px; border-top: 1px solid var(--line); }
.co-label { color: var(--muted); font-size: 15px; }
.co-big {
  font-size: clamp(2.8rem, 5.4vw, 4.4rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; margin-top: 6px;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(252, 85, 76, .35);
}
.co-year { color: var(--muted); margin-top: 6px; }
.co-year span { color: var(--text); font-weight: 600; }

/* Drinky Tap */
.tap { overflow: hidden; }
.tap-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.tap-copy { display: grid; gap: 22px; }
.tap-copy .lead { max-width: 46ch; }
.tap-copy .checks { margin-top: 6px; }
.tap-visual { position: relative; height: 520px; display: grid; place-items: center; perspective: 1000px; }
.ripple {
  position: absolute; left: 44%; top: 60%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%;
  border: 1px solid rgba(252, 85, 76, .5); opacity: 0; animation: ripple 3.6s cubic-bezier(.2, .6, .3, 1) infinite;
}
.ripple.r2 { animation-delay: 1.2s; }
.ripple.r3 { animation-delay: 2.4s; }
@keyframes ripple { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.tag {
  position: relative; width: 280px; height: 280px; margin: 110px 120px 0 0; border-radius: 48px; padding: 26px;
  background: linear-gradient(150deg, #1d1a20, #09080a 70%);
  border: 1.5px solid rgba(252, 85, 76, .65);
  box-shadow: 0 0 0 1px rgba(250, 204, 82, .12) inset, 0 0 60px -6px var(--glow), 0 50px 80px -30px rgba(0, 0, 0, .9);
  transform: rotateX(48deg) rotateZ(-28deg); transform-style: preserve-3d;
  display: grid; grid-template-rows: auto auto 1fr auto; justify-items: center; text-align: center;
}
.tag-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.04em; font-size: 22px; }
.tag-table { color: var(--muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.tag-nfc { width: 86px; height: 86px; align-self: center; fill: none; stroke: url(#gi); stroke-width: 3.2; stroke-linecap: round; }
.tag-nfc circle { fill: var(--y); stroke: none; }
.tag-cta { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.tap-phone {
  position: absolute; width: 150px; height: 290px; left: 56%; top: 0; margin-left: 0;
  border-radius: 30px; padding: 9px; background: #0f0e11; border: 1px solid var(--line-2);
  box-shadow: 0 40px 70px -20px rgba(0, 0, 0, .9);
  animation: hover-tap 3.6s ease-in-out infinite;
}
.tp-screen { height: 100%; border-radius: 22px; background: #0a090b; border: 1px solid var(--line); padding: 28px 10px 12px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.tp-notch { position: absolute; top: 8px; left: 50%; width: 46px; height: 12px; margin-left: -23px; border-radius: 10px; background: #000; }
.tp-screen p { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tp-row { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 9px; background: rgba(255, 255, 255, .05); font-size: 11.5px; font-weight: 500; }
.tp-row .gl { transform: scale(.62); margin: -6px -4px; }
.tp-row span:not(.gl) { flex: 1; min-width: 0; white-space: nowrap; }
.tp-row em { font-style: normal; color: var(--muted); font-size: 11px; }
.tp-screen b { margin-top: auto; flex: none; height: 30px; border-radius: 999px; background: var(--grad); color: var(--ink); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
@keyframes hover-tap { 0%, 100% { transform: translateY(0) rotate(8deg); } 45%, 55% { transform: translateY(42px) rotate(4deg); } }

/* Night reel */
#video .h2 { margin-bottom: clamp(36px, 5vw, 56px); }
.reel {
  position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(70% 80% at 50% 110%, rgba(252, 85, 76, .2), transparent 60%), var(--surface);
  box-shadow: 0 0 120px -60px var(--glow);
}
.reel-stage { position: relative; aspect-ratio: 16 / 9; }
.reel-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(60% 70% at 50% 45%, #000, transparent 75%); mask: radial-gradient(60% 70% at 50% 45%, #000, transparent 75%);
}
.frame {
  position: absolute; inset: 0 0 18% 0; display: grid; place-items: center; opacity: 0; transition: opacity .7s var(--ease);
}
.frame.is-active { opacity: 1; }
.reel-cap {
  position: absolute; left: 0; right: 0; bottom: 10%; text-align: center;
  font-size: clamp(1.4rem, 3.4vw, 2.8rem); font-weight: 500; letter-spacing: -0.03em;
}
.rf-tag {
  width: 30%; aspect-ratio: 1; border-radius: 22%; border: 1.5px solid rgba(252, 85, 76, .6); background: #0b0a0c;
  display: grid; place-items: center; align-content: center; gap: 6%; transform: translate(-30%, -8%) rotateX(40deg) rotateZ(-20deg);
  box-shadow: 0 0 60px -10px var(--glow); color: var(--muted); font-size: clamp(10px, 1.2vw, 14px); letter-spacing: .12em; text-transform: uppercase;
}
.rf-tag svg { width: 40%; fill: none; stroke: url(#gi); stroke-width: 3; stroke-linecap: round; }
.rf-tag circle { fill: var(--y); stroke: none; }
.rf-phone {
  position: absolute; left: 53%; top: 10%; width: 11%; min-width: 80px; aspect-ratio: 9 / 18; border-radius: 18%/9%; background: #121014; border: 1px solid var(--line-2);
}
.rf-phone { display: flex; flex-direction: column; gap: 7px; padding: 26px 9px 12px; font-size: clamp(9px, .95vw, 13px); }
.rf-phone p { color: var(--muted); font-size: .9em; }
.rf-row { display: flex; justify-content: space-between; gap: 6px; padding: .55em .6em; border-radius: 8px; background: rgba(255, 255, 255, .06); font-weight: 500; white-space: nowrap; }
.rf-row em { font-style: normal; color: var(--muted); }
.rf-phone b { margin-top: auto; padding: .7em 0; border-radius: 999px; background: var(--grad); color: var(--ink); font-weight: 600; text-align: center; }
.f-tap.is-active .rf-phone { animation: rf-dip 2.8s ease-in-out infinite; }
.rf-ring { position: absolute; left: 50%; bottom: -20%; width: 90%; aspect-ratio: 1; margin-left: -45%; border-radius: 50%; border: 1px solid var(--c); opacity: 0; }
.f-tap.is-active .rf-ring { animation: ripple 1.4s ease-out .8s infinite; }
@keyframes rf-dip { 0%, 100% { transform: translate(0, 0) rotate(10deg); } 50% { transform: translate(-30%, 30%) rotate(4deg); } }
.rf-card {
  width: min(40%, 460px); padding: 2.4% 2.6%; border-radius: 26px; background: rgba(25, 23, 28, .95); border: 1px solid var(--line-2);
  display: grid; gap: .7em; font-size: clamp(12px, 1.55vw, 21px); transform: rotate(-2deg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 80px -30px var(--glow);
}
.rf-card > p { font-size: 1.35em; font-weight: 500; letter-spacing: -0.02em; }
.rf-item { display: flex; align-items: center; gap: .7em; padding: .6em .75em; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.rf-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.rf-item em { margin-left: auto; font-style: normal; color: var(--muted); }
.f-menu.is-active .rf-item { animation: ben-in .5s var(--ease) both; }
.f-menu.is-active .rf-item:nth-child(3) { animation-delay: .45s; }
.f-menu.is-active .rf-item:nth-child(4) { animation-delay: .9s; }
.rf-btn { height: 2.6em; border-radius: 999px; background: var(--grad); color: var(--ink); font-weight: 600; display: grid; place-items: center; }
.f-pay.is-active .rf-btn { animation: press 2.8s ease .4s both; }
@keyframes press { 0%, 20% { transform: scale(1); } 28% { transform: scale(.94); } 36%, 100% { transform: scale(1); } }
.rf-check { justify-self: center; width: 3em; height: 3em; border-radius: 50%; background: rgba(250, 204, 82, .12); border: 1px solid rgba(250, 204, 82, .5); display: grid; place-items: center; opacity: 0; }
.rf-check svg { width: 55%; fill: none; stroke: var(--y); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.f-pay.is-active .rf-check { animation: pop .5s var(--ease) 1.3s both; opacity: 1; }
.rf-queue { width: min(46%, 520px); display: grid; gap: .6em; font-size: clamp(12px, 1.55vw, 21px); }
.rf-tick { padding: .8em 1em; border-radius: 14px; background: rgba(25, 23, 28, .95); border: 1px solid var(--line-2); }
.rf-tick.is-new { border-color: rgba(250, 204, 82, .6); background: rgba(250, 204, 82, .08); }
.f-bar.is-active .rf-tick.is-new { animation: tick-in .8s var(--ease) .5s both; }
.rf-qr { position: relative; width: 17%; padding: 1%; border-radius: 16px; background: #fff; }
.rf-qr .qr { padding: 6%; }
.rf-done { position: absolute; top: 12%; color: var(--muted); font-size: clamp(12px, 1.4vw, 16px); }

.reel-bar { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .35); }
.reel-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: var(--ink); flex: none; }
.reel-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.reel-btn .ic-play { fill: currentColor; display: none; }
.reel.is-paused .ic-play { display: block; }
.reel.is-paused .ic-pause { display: none; }
.reel.is-paused .frame * { animation-play-state: paused !important; }
.reel-segs { flex: 1; display: flex; gap: 6px; }
.reel-segs span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); position: relative; overflow: hidden; }
.reel-segs span::after { content: ""; position: absolute; inset: 0; background: var(--grad-h); transform: scaleX(var(--p, 0)); transform-origin: left; }
.reel-label { color: var(--dim-text); font-size: 13px; white-space: nowrap; }

@media (max-width: 899px) {
  .calc-grid, .tap-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .calc-card { padding: 26px 22px; }
  .tap-visual { height: 440px; }
  .tag { width: 220px; height: 220px; border-radius: 38px; margin: 90px 64px 0 0; padding: 20px; }
  .tag-nfc { width: 70px; height: 70px; }
  .tap-phone { width: 124px; height: 240px; }
  .tp-row { font-size: 11px; padding: 6px; }
  .tp-row .gl { display: none; }
  .reel-stage { aspect-ratio: 4 / 5; }
  .rf-card, .rf-queue { width: 76%; font-size: clamp(13px, 3.6vw, 18px); }
  .rf-tag { width: 50%; }
  .rf-phone { width: 34%; left: 52%; font-size: 10px; }
  .rf-qr { width: 40%; }
  .reel-label { display: none; }
}

/* Drinky Tap: tap-to-open demo (tap.js) */
button.tag { color: var(--text); font-family: var(--font); cursor: pointer; transition: transform .45s var(--ease), box-shadow .3s, border-color .3s; }
button.tag:hover { transform: rotateX(40deg) rotateZ(-24deg) translateZ(14px); border-color: var(--c); box-shadow: 0 0 0 1px rgba(250, 204, 82, .2) inset, 0 0 90px -4px var(--glow), 0 60px 90px -30px rgba(0, 0, 0, .9); }
button.tag:active { transform: rotateX(48deg) rotateZ(-28deg) translateZ(-10px); }
button.tag:focus-visible { outline-offset: 6px; border-radius: 48px; }
.tap-hint { top: 18%; left: 8%; right: auto; font-size: 12px; transition: opacity .4s; }
.was-tapped .tap-hint { opacity: 0; }
.ripple.burst { animation: none; border-width: 2px; border-color: rgba(250, 204, 82, .8); }
.is-tapped .ripple.burst { animation: ripple 1s cubic-bezier(.2, .6, .3, 1) both; }
.is-tapped .tap-phone { animation: tap-dip 1s var(--ease); }
.is-tapped .tp-row, .is-tapped .tp-screen p, .is-tapped .tp-screen b { animation: tp-in .45s var(--ease) both; }
.is-tapped .tp-screen p { animation-delay: .35s; }
.is-tapped .tp-row:nth-of-type(1) { animation-delay: .45s; }
.is-tapped .tp-row:nth-of-type(2) { animation-delay: .52s; }
.is-tapped .tp-row:nth-of-type(3) { animation-delay: .59s; }
.is-tapped .tp-screen b { animation-delay: .7s; }
.is-tapped .tp-screen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, rgba(252, 85, 76, .35), transparent 70%); animation: tp-flash .8s ease-out both; pointer-events: none; }
@keyframes tap-dip { 0% { transform: translateY(0) rotate(8deg); } 35% { transform: translateY(70px) rotate(2deg) scale(.97); } 100% { transform: translateY(0) rotate(8deg); } }
@keyframes tp-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes tp-flash { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 899px) { button.tag:focus-visible { border-radius: 38px; } }
