@font-face {
  font-family: "Fredoka One";
  src: url("./assets/fredoka-one.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --pizza: #ff6b35;
  --pizza-dark: #e65827;
  --pizza-light: #fff0eb;
  --beer: #f5a623;
  --beer-light: #fff8eb;
  --green: #2ecc71;
  --white: #fff;
  --off-white: #fafafa;
  --gray: #767676;
  --dark: #1a1a2e;
  --border: #ebebeb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--white); color: var(--dark); font-family: "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
/* Visually hidden, but kept in the accessibility tree (unlike display:none). */
.sr-only, .step-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.nav { position: sticky; top: 0; z-index: 10; height: 64px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 2px solid var(--border); }
.nav-logo { color: var(--pizza); text-decoration: none; font-family: "Fredoka One", "Arial Rounded MT Bold", cursive; font-size: 25px; font-weight: 400; letter-spacing: 0; }
.nav-logo span { color: var(--dark); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-tab { padding: 8px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--gray); font-size: 14px; font-weight: 800; }
.nav-tab.active { background: var(--pizza); color: white; }
.demo-pill { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--gray); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.checkin-hero { padding: 54px 24px 36px; text-align: center; background: linear-gradient(135deg, #fff8f5, #fffbf0); border-bottom: 2px solid var(--border); }
.event-badge { display: inline-block; margin: 0 0 18px; padding: 6px 16px; border-radius: 999px; background: var(--pizza); color: white !important; font-size: 11px !important; font-weight: 900 !important; letter-spacing: .13em; text-transform: uppercase; }
.checkin-hero h1 { margin: 0 0 8px; color: var(--dark); font-family: "Fredoka One", "Arial Rounded MT Bold", cursive; font-size: clamp(42px, 7vw, 66px); font-weight: 400; line-height: 1.08; letter-spacing: 0; }
.checkin-hero h1 span { color: var(--pizza); }
.checkin-hero h1 .icon-combo { color: inherit; }
.icon-combo { display: inline-flex; align-items: center; position: relative; vertical-align: middle; margin-left: 4px; }
.icon-heart { position: relative; z-index: 1; font-family: sans-serif; font-size: .9em; animation: heart-tilt 5s ease-in-out infinite; transform-origin: bottom center; }
.icon-sparkle { position: absolute; z-index: 2; top: -.3em; right: -.1em; font-family: sans-serif; font-size: .45em; opacity: 0; animation: sparkle-pop 5s ease-in-out infinite; }
.icon-pizza { position: absolute; z-index: 3; top: -.15em; right: -.1em; font-family: sans-serif; font-size: .55em; opacity: 0; animation: pizza-snap-fly 5s ease-in-out infinite; }
@keyframes heart-tilt {
  0%, 82% { transform: rotate(0deg); }
  83% { transform: rotate(8deg); }
  84.5% { transform: rotate(-4deg); }
  86%, 100% { transform: rotate(0deg); }
}
@keyframes pizza-snap-fly {
  0%, 83% { opacity: 0; transform: translate(18px, -22px) rotate(45deg) scale(0); }
  83.5% { opacity: 1; transform: translate(18px, -22px) rotate(45deg) scale(1.3); }
  85% { opacity: 1; transform: translate(18px, -22px) rotate(45deg) scale(.95); }
  86% { opacity: 1; transform: translate(18px, -22px) rotate(45deg) scale(1.05); }
  87%, 93% { opacity: 1; transform: translate(18px, -22px) rotate(45deg) scale(1); }
  96% { opacity: 0; transform: translate(18px, -22px) rotate(45deg) scale(.8); }
  100% { opacity: 0; transform: translate(18px, -22px) rotate(45deg) scale(0); }
}
@keyframes sparkle-pop {
  0%, 82% { opacity: 0; transform: scale(.5); }
  84% { opacity: 1; transform: scale(1.3); }
  88% { opacity: 1; transform: scale(1); }
  94% { opacity: .3; transform: scale(.8); }
  100% { opacity: 0; transform: scale(.5); }
}
.checkin-hero > p:not(.event-badge) { margin: 0 0 7px; color: var(--gray); font-size: 17px; font-weight: 700; }
.month-label { display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; padding: 8px 20px; background: white; border: 2px solid var(--border); border-radius: 999px; font-size: 15px; font-weight: 900; }

.checkin-body { width: min(560px, calc(100% - 32px)); min-height: 520px; margin: 0 auto; padding: 40px 8px 80px; }
.step-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 30px; }
.step-dot { width: 10px; height: 10px; background: var(--border); border-radius: 50%; transition: .25s; }
.step-dot.active { width: 28px; background: var(--pizza); border-radius: 5px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h2 { margin: 0 0 18px; font-family: "Fredoka One", "Arial Rounded MT Bold", cursive; font-size: 22px; font-weight: 400; }
.text-button { padding: 4px; border: 0; background: none; color: var(--gray); font-size: 13px; font-weight: 800; cursor: pointer; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-card { min-height: 120px; padding: 18px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--border); border-radius: 16px; background: white; text-align: center; cursor: pointer; transition: .2s; }
.team-card:hover { border-color: var(--pizza); transform: translateY(-2px); box-shadow: 0 8px 36px rgba(255, 107, 53, .18); }
.team-emoji { font-size: 30px; line-height: 1; }
.team-card strong { display: block; font-size: 13px; font-weight: 900; }
.team-card small { display: block; margin-top: 3px; color: var(--gray); font-size: 10px; font-weight: 700; }
.team-card .arrow { display: none; }

.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.search-wrap input { width: 100%; padding: 14px 18px 14px 44px; border: 2px solid var(--border); border-radius: 12px; outline: none; font-size: 15px; font-weight: 700; }
.search-wrap input:focus { border-color: var(--pizza); }
.name-grid { display: grid; gap: 9px; }
.name-card { width: 100%; padding: 13px 15px; display: flex; align-items: center; gap: 12px; border: 2px solid var(--border); border-radius: 12px; background: white; text-align: left; cursor: pointer; transition: .2s; }
.name-card:hover { border-color: var(--pizza); background: var(--pizza-light); transform: translateX(4px); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(135deg, var(--pizza), var(--beer)); }
.name-card strong { display: block; font-size: 14px; }
.name-card small { color: var(--gray); font-size: 11px; font-weight: 700; }
.empty-state { padding: 32px; color: var(--gray); text-align: center; font-weight: 700; }

.confirm-box { padding: 28px; text-align: center; background: linear-gradient(135deg, var(--pizza-light), var(--beer-light)); border: 2px solid var(--pizza); border-radius: 20px; }
.confirm-avatar { width: 76px; height: 76px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: white; font-size: 36px; }
.confirm-box h3 { margin: 0 0 4px; font-family: "Fredoka One", "Arial Rounded MT Bold", cursive; font-size: 30px; }
.confirm-box p { margin: 0 0 20px; color: var(--gray); font-size: 13px; font-weight: 700; }
.primary-button { width: 100%; padding: 17px; border: 0; border-radius: 16px; background: var(--pizza); color: white; font-family: "Fredoka One", "Arial Rounded MT Bold", cursive; font-size: 18px; font-weight: 400; cursor: pointer; transition: .2s; }
.primary-button:hover { background: var(--pizza-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,107,53,.34); }
.privacy-note { margin: 28px 0 0; color: var(--gray); text-align: center; font-size: 11px; font-weight: 700; }

.success-overlay { position: fixed; inset: 0; z-index: 30; padding: 24px; display: grid; place-items: center; background: rgba(255,255,255,.96); }
.success-overlay[hidden] { display: none; }
.success-card { position: relative; z-index: 2; width: min(480px, 100%); text-align: center; }
.success-pizza { font-size: 112px; animation: bounce .8s ease both; }
.success-card .eyebrow { margin: 4px 0 8px; color: var(--pizza); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.success-card h2 { margin: 0; color: var(--pizza); font-family: "Fredoka One", "Arial Rounded MT Bold", cursive; font-size: 43px; }
.success-card .welcome { margin: 7px 0; color: var(--dark); font-size: 26px; font-weight: 900; }
.success-card > p:not(.eyebrow):not(.welcome) { margin: 0 0 30px; color: var(--gray); font-weight: 700; }
.success-card .primary-button { width: auto; padding-inline: 38px; border-radius: 999px; }
.confetti-piece { position: absolute; top: -30px; width: 10px; height: 20px; border-radius: 3px; animation: fall 2.8s linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes bounce { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); } }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; }

@media (max-width: 580px) {
  .nav { height: 58px; padding: 0 15px; }
  .nav-logo { font-size: 19px; }
  .demo-pill { display: none; }
  .nav-tab { padding: 7px 11px; font-size: 11px; }
  .checkin-hero { padding: 40px 18px 29px; }
  .checkin-hero h1 { font-size: 42px; }
  .checkin-body { padding-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
