/* Midwest QR Code — landing page. Mobile-first; scales up to ultrawide. */

:root {
  --bg: #0e0f12;
  --bg-2: #15171c;
  --ink: #f5f6f8;
  --ink-2: #aeb3bd;
  --line: rgba(255, 255, 255, .09);
  --orange: #f26b21;
  --orange-2: #ff8a45;
  --green: #7fb02e;
  --c: #00aeef; --m: #ec008c; --y: #fff200; --k: #000;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --intro: 2.9s; /* total length of the intro before the page content starts */
}

*, *::before, *::after { box-sizing: border-box; }
html {
  /* Fluid base size: 16px on phones up to ~22px on very large screens. */
  font-size: clamp(16px, .35vw + 12.5px, 22px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--orange); color: #000; padding: .6rem 1rem; z-index: 100; border-radius: 0 0 .5rem 0; }
.skip:focus { left: 0; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.orb--orange { width: 46vmax; height: 46vmax; right: -14vmax; top: -16vmax; background: radial-gradient(circle, var(--orange) 0%, transparent 68%); animation: drift1 22s ease-in-out infinite alternate; }
.orb--green  { width: 40vmax; height: 40vmax; left: -16vmax; bottom: -18vmax; background: radial-gradient(circle, var(--green) 0%, transparent 68%); opacity: .32; animation: drift2 26s ease-in-out infinite alternate; }
.grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
@keyframes drift1 { to { transform: translate(-6vmax, 8vmax) scale(1.12); } }
@keyframes drift2 { to { transform: translate(8vmax, -6vmax) scale(1.1); } }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: var(--bg);
  animation: curtain .85s var(--ease) 2.05s forwards;
}
.intro__stage { width: min(78vw, 46rem); display: grid; gap: clamp(1rem, 3vh, 2rem); }
.intro__logo { display: block; overflow: hidden; clip-path: inset(0 100% 0 0); animation: wipe 1.15s var(--ease) .25s forwards; }
.intro__logo img { width: 100%; transform: scale(1.06); animation: settle 1.6s var(--ease) .25s forwards; }
.intro__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; width: min(60%, 24rem); margin: 0 auto; }
.intro__bar i { height: .4rem; border-radius: 99px; transform: scaleX(0); transform-origin: left; animation: grow .55s var(--ease) forwards; }
.intro__bar i:nth-child(1) { background: var(--c); animation-delay: 1.00s; }
.intro__bar i:nth-child(2) { background: var(--m); animation-delay: 1.10s; }
.intro__bar i:nth-child(3) { background: var(--y); animation-delay: 1.20s; }
.intro__bar i:nth-child(4) { background: #fff;     animation-delay: 1.30s; }
@keyframes wipe    { to { clip-path: inset(0 0 0 0); } }
@keyframes settle  { to { transform: scale(1); } }
@keyframes grow    { to { transform: scaleX(1); } }
@keyframes curtain { to { transform: translateY(-100%); visibility: hidden; } }

/* Repeat visit: no intro, content shows right away. */
.no-intro .intro { display: none; }
.no-intro { --intro: 0s; }

/* ---------- Header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(env(safe-area-inset-top) + 1rem) var(--pad) 0;
  width: 100%; max-width: 96rem; margin: 0 auto;
}
.top__brand img { width: clamp(8.5rem, 22vw, 13rem); height: auto; }
.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .45rem .95rem; border-radius: 99px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.pill__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(127, 176, 46, .6); animation: ping 2s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 .6rem rgba(127, 176, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 176, 46, 0); } }

/* ---------- Hero ---------- */
main { flex: 1; display: flex; }
.hero {
  width: 100%; max-width: 96rem; margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 4rem) var(--pad) clamp(2rem, 6vh, 5rem);
  display: grid; gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  grid-template-columns: 1fr;
}
.eyebrow { margin: 0 0 1rem; font-size: .85rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
h1 {
  margin: 0; font-weight: 800; letter-spacing: -.025em; line-height: 1.04;
  font-size: clamp(2.35rem, 7.4vw, 5.2rem);
  text-wrap: balance;
}
.hl { background: linear-gradient(100deg, var(--orange) 0%, var(--orange-2) 55%, #ffb27a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 1.4rem 0 0; max-width: 34rem; font-size: clamp(1.05rem, 1.2vw + .75rem, 1.35rem); color: var(--ink-2); }
.chips { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .55rem .95rem; border-radius: 99px; font-size: .92rem; font-weight: 500;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.chips li:hover { transform: translateY(-2px); border-color: rgba(242, 107, 33, .6); background: rgba(242, 107, 33, .1); }
.chips svg { width: 1.05rem; height: 1.05rem; fill: var(--orange); flex: none; }
.note { margin: 1.75rem 0 0; font-size: .95rem; color: var(--ink-2); }

/* ---------- QR card ---------- */
.hero__art { position: relative; justify-self: center; width: min(78vw, 25rem); padding: 1.4rem 0 0 1.4rem; margin-top: 4rem; }
.card {
  position: relative; z-index: 1;
  background: #fff; color: #111;
  border-radius: 1.6rem; padding: clamp(1.1rem, 3vw, 1.6rem);
  box-shadow: 0 2.5rem 5rem -1.5rem rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform .25s ease-out;
  will-change: transform;
}
.card__glow { position: absolute; inset: 1.4rem 0 0 1.4rem; border-radius: 1.6rem; z-index: 0; filter: blur(38px); opacity: .5; background: conic-gradient(from 200deg, var(--orange), var(--green), var(--orange)); animation: breathe 6s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(.97); opacity: .4; } to { transform: scale(1.04); opacity: .62; } }
.card__qr { position: relative; border-radius: 1rem; overflow: hidden; aspect-ratio: 1; }
.card__qr svg { width: 100%; height: 100%; display: block; }
.card__qr rect { transform-box: fill-box; transform-origin: center; }
.card__qr .m { fill: #14161a; transition: opacity .5s ease; }
.card__qr .e { fill: var(--orange); }
.card__qr .e2 { fill: #14161a; }
.card__label { margin: .9rem 0 0; text-align: center; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; font-size: .8rem; color: #14161a; }
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 22%;
  background: linear-gradient(to bottom, transparent, rgba(242, 107, 33, .28) 70%, rgba(242, 107, 33, .75));
  border-bottom: 2px solid var(--orange);
  transform: translateY(-110%);
  animation: sweep 3.4s ease-in-out calc(var(--intro) + 1.4s) infinite;
}
@keyframes sweep { 0% { transform: translateY(-110%); } 55%, 100% { transform: translateY(470%); } }

.frog { position: absolute; z-index: 2; left: -11%; top: -20%; width: 42%; filter: drop-shadow(0 .8rem 1rem rgba(0, 0, 0, .45)); pointer-events: none; transform-origin: 60% 90%; animation: bob 5s ease-in-out calc(var(--intro) + 1.6s) infinite; }
.frog img { width: 100%; }
@keyframes bob { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-.35rem); } }

/* ---------- Footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between;
  width: 100%; max-width: 96rem; margin: 0 auto;
  padding: 1.2rem var(--pad) calc(env(safe-area-inset-bottom) + 1.4rem);
  border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-2);
}
.foot__tag { font-style: italic; font-weight: 700; background: linear-gradient(90deg, var(--c), var(--m), var(--y), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Entrance of page content (after the intro) ---------- */
.reveal { opacity: 0; transform: translateY(1.6rem); animation: rise .9s var(--ease) calc(var(--intro) - .55s + var(--i, 0) * .12s) forwards; }
.reveal--art { transform: translateY(2.4rem) scale(.94); }
.top { opacity: 0; animation: fade .8s ease calc(var(--intro) - .4s) forwards; }
.foot { opacity: 0; animation: fade .8s ease calc(var(--intro) + .6s) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
.m.pop { opacity: 0; transform: scale(0); animation: pop .5s var(--ease) forwards; animation-delay: calc(var(--intro) + .5s + var(--d, 0) * 1s); }
@keyframes pop { to { opacity: 1; transform: scale(1); } }

/* ---------- Responsive ---------- */
@media (min-width: 62rem) {
  .hero { grid-template-columns: 1.15fr .85fr; }
  .hero__art { width: min(100%, 30rem); justify-self: end; margin-top: 0; }
}
@media (max-width: 40rem) {
  .top { padding-top: calc(env(safe-area-inset-top) + .85rem); }
  .pill { font-size: .68rem; padding: .38rem .7rem; }
  .chips li { font-size: .85rem; }
}
@media (max-height: 34rem) and (orientation: landscape) { .intro__stage { width: min(50vw, 30rem); } }

/* ---------- Reduced motion: show everything, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .orb, .card__glow, .scan, .frog, .pill__dot { animation: none; }
  .scan { display: none; }
  .reveal, .top, .foot, .m.pop { animation: none; opacity: 1; transform: none; }
  .card { transition: none; transform: none; }
}
