/* Flappy Caps — Happy Caps discount game */

.hcf {
  --bg: #212121;
  --bg-2: #2b2b2b;
  --ink: #F5EFE4;
  --ink-soft: #c8c2b6;
  --yellow: #FFCB00;
  --yellow-2: #F7C61A;
  --pink: #D06AB4;
  --purple: #6b2b86;
  --green: #22c55e;
  --sky: #4fc3f7;
  --black: #111;

  --f-pixel: "Press Start 2P", "Courier New", monospace;
  --f-body: "Libre Franklin", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
.hcf { color: var(--ink); font: 400 17px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
body.hcf { margin: 0; background: var(--bg); background-image: radial-gradient(circle at 50% -10%, #3a2a44 0, transparent 55%); overflow-x: hidden; }
.hcf img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.hcf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9em 1.4em;
  background: var(--pink); color: var(--black);
  border: 3px solid var(--black); border-radius: 4px;
  box-shadow: 0 5px 0 var(--black);
  font: 400 .72rem/1 var(--f-pixel); text-transform: uppercase; letter-spacing: .02em;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.hcf-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--black); }
.hcf-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--black); }
.hcf-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.hcf-btn--big { padding: 1.1em 1.6em; font-size: .8rem; }
.hcf-btn--small { padding: .7em 1em; font-size: .6rem; }
.hcf-btn--yellow { background: var(--yellow); }
.hcf-btn--ghost { background: var(--ink); }

/* ---------- Header ---------- */
.hcf-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter) 4px;
}
.hcf-top__tag { margin: 0; font: 400 .5rem/1.4 var(--f-pixel); color: var(--yellow); text-transform: uppercase; }
.hcf-top__logo { grid-column: 2; }
.hcf-top > :last-child { grid-column: 3; }
.hcf-top__logo img { width: 96px; }
.hcf-sound {
  justify-self: end; display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: var(--ink); border: 2px solid var(--ink-soft); border-radius: 999px;
  padding: 6px 10px; cursor: pointer; font: 400 .48rem/1 var(--f-pixel); text-transform: uppercase;
}
.hcf-sound[aria-pressed="true"] { border-color: var(--yellow); color: var(--yellow); }
.hcf-sound__dot { width: 10px; height: 10px; border-radius: 50%; background: #666; }
.hcf-sound[aria-pressed="true"] .hcf-sound__dot { background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ---------- Intro ---------- */
.hcf-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 64px; }
.hcf-intro { text-align: center; max-width: 720px; margin: 6px auto 12px; }
.hcf-eyebrow { margin: 0 0 8px; font: 400 .5rem/1.5 var(--f-pixel); color: var(--yellow); text-transform: uppercase; }
.hcf-eyebrow strong { color: var(--pink); font-weight: 400; }
.hcf-title {
  font: 400 clamp(1rem, 2vw, 1.3rem)/1.3 var(--f-pixel);
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--purple);
  margin-bottom: 0;
}
.hcf-lede { margin: 0; color: var(--ink-soft); font-size: 1.05rem; max-width: 40em; margin-inline: auto; }
.hcf-lede strong { color: var(--ink); }
.hcf-lede--below { text-align: center; margin: 4px 0 0; max-width: 36em; }
.hcf-intro { margin-bottom: 24px; }

/* ---------- Arena ---------- */
.hcf-arena {
  display: grid; grid-template-columns: minmax(0, 520px);
  gap: clamp(24px, 4vw, 40px); align-items: start; justify-content: center; justify-items: center;
}

.hcf-cabinet {
  background: var(--purple);
  border: 4px solid var(--black); border-radius: 18px;
  box-shadow: 0 10px 0 var(--black), 0 30px 60px -20px rgba(0,0,0,.8);
  padding: 10px; width: 100%;
}
.hcf-cabinet__bar, .hcf-cabinet__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 10px; font: 400 .5rem/1 var(--f-pixel); color: var(--yellow); text-transform: uppercase;
}
.hcf-cabinet__foot { justify-content: center; gap: 10px; color: var(--ink-soft); }
.hcf-cabinet__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hcf-cabinet__best { white-space: nowrap; flex: 0 0 auto; }
.hcf-powered {
  display: flex; justify-content: center; align-items: center; gap: 6px; margin: 2px 0 0;
  padding: 8px 10px 6px; border-top: 2px dashed rgba(255,255,255,.18);
  font: 400 .46rem/1 var(--f-pixel); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
}
.hcf-powered strong { font-weight: 400; color: var(--yellow); }
.hcf-powered:hover strong { color: #fff; }

.hcf-screen {
  position: relative; width: 100%; aspect-ratio: 400 / 640;
  background: var(--sky); border: 4px solid var(--black); border-radius: 8px; overflow: hidden;
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.hcf-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.hcf-screen.is-shake { animation: shake .35s ease; }
@keyframes shake {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -2px); }
}

.hcf-hud { position: absolute; inset: 14px 14px auto; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.hcf-hud__score {
  font: 400 1.5rem/1 var(--f-pixel); color: #fff;
  text-shadow: 3px 3px 0 var(--black), -2px -2px 0 var(--black), 2px -2px 0 var(--black), -2px 2px 0 var(--black);
}
.hcf-hud__tier {
  display: grid; justify-items: end; gap: 4px;
  background: var(--yellow); color: var(--black); border: 3px solid var(--black); border-radius: 4px;
  padding: 6px 8px; box-shadow: 3px 3px 0 var(--black);
  transition: transform .2s ease;
}
.hcf-hud__tier.is-pop { animation: pop .5s ease; }
@keyframes pop { 30% { transform: scale(1.25) rotate(-4deg); } 60% { transform: scale(.95); } }
.hcf-hud__tier-pct { font: 400 .95rem/1 var(--f-pixel); }
.hcf-hud__tier-txt { font: 400 .42rem/1 var(--f-pixel); }

.hcf-overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
  text-align: center; padding: 24px; background: rgba(17,17,17,.55); backdrop-filter: blur(2px);
}
.hcf-overlay__gummy { width: 130px; animation: hover 1.6s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-10px) rotate(4deg); } }
.hcf-overlay__hint { margin: 0; font: 400 .6rem/1.8 var(--f-pixel); color: var(--yellow); }
.hcf-overlay__fine { margin: 0; font-size: .85rem; color: var(--ink); }
.hcf-overlay__kicker { margin: 0; font: 400 .7rem/1 var(--f-pixel); color: var(--yellow); }
.hcf-overlay__big {
  margin: 0; font: 400 clamp(1.6rem, 8vw, 2.4rem)/1.1 var(--f-pixel); color: #fff;
  text-shadow: 4px 4px 0 var(--black); animation: pop .6s ease;
}
.hcf-overlay__sub { margin: 0; font-size: .95rem; }
.hcf-overlay__btns { display: grid; gap: 12px; margin-top: 6px; }

.hcf-toast {
  position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%);
  background: var(--yellow); color: var(--black); border: 3px solid var(--black); border-radius: 4px;
  padding: 10px 14px; font: 400 .62rem/1.5 var(--f-pixel); text-align: center; text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--black); pointer-events: none;
  animation: toast 1.6s ease forwards;
}
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); }
  15%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}

/* ---------- Ladder ---------- */
.hcf-ladder {
  width: min(100%, 760px); justify-self: center; text-align: center;
  background: var(--bg-2); border: 3px solid var(--black); border-radius: 14px;
  box-shadow: 0 8px 0 var(--black); padding: 22px 22px 20px;
}
.hcf-arena { grid-template-columns: minmax(0, 760px); }
.hcf-cabinet { max-width: 520px; }
.hcf-ladder__h { font: 400 .8rem/1.4 var(--f-pixel); color: var(--yellow); text-transform: uppercase; margin-bottom: 8px; }
.hcf-ladder__p { margin: 0 0 18px; color: var(--ink-soft); font-size: .95rem; }
.hcf-ladder__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hcf-rung {
  display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center;
  background: #1a1a1a; border: 3px solid #3a3a3a; border-radius: 8px; padding: 14px 10px 12px;
  transition: border-color .2s, background .2s;
}
.hcf-rung__pct { font: 400 1.05rem/1 var(--f-pixel); color: var(--ink-soft); }
.hcf-rung__req { font-size: .9rem; color: var(--ink-soft); }
.hcf-rung__code { font: 400 .5rem/1 var(--f-pixel); color: #666; letter-spacing: .05em; }
.hcf-rung.is-on { border-color: var(--yellow); background: #2a2410; }
.hcf-rung.is-on .hcf-rung__pct { color: var(--yellow); }
.hcf-rung.is-on .hcf-rung__req { color: var(--ink); }
.hcf-rung.is-on .hcf-rung__code { color: var(--yellow); }
.hcf-rung.is-done { border-color: var(--green); }
.hcf-rung.is-done .hcf-rung__pct { color: var(--green); }
.hcf-ladder__tip {
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; text-align: left; max-width: 520px; margin-inline: auto;
  margin-top: 18px; padding-top: 16px; border-top: 2px dashed #3a3a3a; font-size: .92rem; color: var(--ink-soft);
}
.hcf-ladder__tip p { margin: 0; } .hcf-ladder__tip strong { color: var(--ink); }
.hcf-ladder__fine { margin: 16px 0 0; font-size: .78rem; color: #8a847a; }

/* ---------- Why ---------- */
.hcf-why {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 32px);
  margin-top: clamp(48px, 7vw, 80px); text-align: center;
}
.hcf-why__item { display: grid; justify-items: center; gap: 10px; padding: 0 8px; }
.hcf-why__item img { width: 84px; height: 84px; object-fit: contain; }
.hcf-why__item h3 { font: 400 .62rem/1.6 var(--f-pixel); color: var(--yellow); text-transform: uppercase; }
.hcf-why__item p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Modal ---------- */
.hcf-modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(0,0,0,.75); backdrop-filter: blur(3px);
}
.hcf-modal__card {
  position: relative; width: min(460px, 100%); text-align: center;
  background: var(--bg-2); border: 4px solid var(--black); border-radius: 16px;
  box-shadow: 0 10px 0 var(--black), 0 0 0 4px var(--yellow);
  padding: 36px 28px 28px; display: grid; justify-items: center; gap: 14px;
  animation: pop .5s ease;
}
.hcf-modal__x {
  position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--ink-soft);
  font: 400 1.6rem/1 var(--f-body); cursor: pointer; padding: 6px;
}
.hcf-modal__kicker { margin: 0; font: 400 .6rem/1 var(--f-pixel); color: var(--yellow); }
.hcf-modal__title { font: 400 clamp(1rem, 4vw, 1.3rem)/1.4 var(--f-pixel); text-transform: uppercase; }
.hcf-modal__sub { margin: 0; color: var(--ink-soft); }
.hcf-code {
  display: flex; align-items: center; gap: 10px; margin: 6px 0;
  background: var(--black); border: 3px dashed var(--yellow); border-radius: 8px; padding: 10px 10px 10px 18px;
}
.hcf-code__txt { font: 400 1.1rem/1 var(--f-pixel); color: var(--yellow); letter-spacing: .06em; }
.hcf-modal__fine { margin: 0; font-size: .8rem; color: #8a847a; }

/* ---------- Footer ---------- */
.hcf-foot {
  border-top: 3px solid var(--black); background: #1a1a1a;
  padding: 36px var(--gutter) 28px; text-align: center; display: grid; justify-items: center; gap: 16px;
}
.hcf-foot img { width: 140px; }
.hcf-foot__links { display: flex; gap: 22px; font-size: .9rem; }
.hcf-foot__links a { color: var(--ink-soft); text-decoration: none; }
.hcf-foot__links a:hover { color: var(--yellow); }
.hcf-foot__legal { max-width: 760px; margin: 0; font-size: .76rem; line-height: 1.5; color: #6f6a62; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hcf-arena { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .hcf-ladder__list { grid-template-columns: 1fr; }
  .hcf-rung { grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; align-items: center; gap: 14px; padding: 12px 14px; }
  .hcf-why { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; gap: 28px; }
  .hcf-top { grid-template-columns: 1fr auto 1fr; }
  .hcf-top__tag { display: none; }
  /* compact header + title so the cabinet fits in one phone screen (JS sizes the cabinet to the viewport) */
  .hcf-top { padding: 10px var(--gutter) 4px; gap: 10px; }
  .hcf-top__logo img { width: 76px; }
  .hcf-sound { gap: 7px; }
  .hcf-intro { margin: 4px auto 10px; }
  .hcf-eyebrow { font-size: .48rem; }
  .hcf-cabinet { margin: 0 auto; }
  .hcf-lede--below { font-size: .95rem; }
}
@media (max-width: 480px) {
  .hcf-wrap { padding-inline: 12px; }
  .hcf-cabinet { padding: 6px; border-radius: 12px; }
  .hcf-btn--big { font-size: .68rem; }
  .hcf-hud__score { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hcf-overlay__gummy, .hcf-screen.is-shake, .hcf-hud__tier.is-pop, .hcf-overlay__big, .hcf-modal__card { animation: none; }
}

/* ---------- Lead capture form (inside modal) ---------- */
.hcf-form { width: 100%; display: grid; gap: 12px; text-align: left; }
.hcf-form__lead { margin: 0; text-align: center; font: 400 .6rem/1.6 var(--f-pixel); color: var(--yellow); text-transform: uppercase; }
.hcf-field { display: grid; gap: 6px; }
.hcf-field label { font-size: .8rem; color: var(--ink-soft); }
.hcf-field input, .hcf-country {
  width: 100%; padding: .75em .9em; font: 500 1rem var(--f-body);
  background: var(--black); color: var(--ink); border: 3px solid #3a3a3a; border-radius: 6px;
}
.hcf-field input:focus, .hcf-country:focus { outline: none; border-color: var(--yellow); }
.hcf-phone-row { display: flex; gap: 8px; }
.hcf-country { width: auto; flex: 0 0 auto; padding-right: .6em; }
.hcf-check { display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; color: var(--ink-soft); line-height: 1.4; }
.hcf-check input { margin: 3px 0 0; accent-color: var(--yellow); flex: 0 0 auto; }
.hcf-form__error { margin: 0; font-size: .82rem; color: #ff7a7a; text-align: center; }
.hcf-form .hcf-btn { width: 100%; }
.hcf-form .hcf-btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.hcf-reveal { display: grid; justify-items: center; gap: 14px; width: 100%; }
