/* Hybrid Awards voting page. Builds on design-system/tokens.css and site.css. */
.aw { max-width: 40rem; margin: 0 auto; padding: var(--space-6) 0 var(--space-9); display: flex; flex-direction: column; gap: var(--space-5); }
/* Header: one short status line over the title. */
.aw-hero { padding: var(--space-4) 4px var(--space-2); }
.aw-eyebrow { font: 600 0.9375rem/1.3 var(--font-body); color: var(--text-muted); letter-spacing: -0.005em; }
.aw-eyebrow.is-open { color: var(--accent); }
.aw-title { font: 700 clamp(3rem, 1.8rem + 5.5vw, 4.5rem)/0.95 var(--font-display); letter-spacing: var(--tracking-display); margin-top: 6px; text-wrap: balance; }
.aw-sk-hero { height: 96px; border-radius: 16px; background: var(--bg-raised); opacity: 0.5; width: 70%; }
.aw.is-ready > * { animation: aw-rise 460ms var(--aw-spring, var(--ease-out)) both; }
.aw.is-ready > :nth-child(2) { animation-delay: 40ms; }
.aw.is-ready > :nth-child(n+3) { animation-delay: 80ms; }
@keyframes aw-rise { from { opacity: 0; transform: translateY(10px); } }
/* Keep the scrollbar's space when the page is held still, so nothing shifts sideways on desktop. */
html { scrollbar-gutter: stable; }
.aw-section { display: flex; flex-direction: column; gap: 12px; }
.aw-section h2 { font: 600 0.9375rem/1.2 var(--font-body); color: var(--text-muted); padding-left: 4px; }
.aw-foot { font-size: var(--text-small); color: var(--text-muted); text-align: center; text-wrap: balance; padding: var(--space-3) var(--space-5) 0; }
.aw-empty { padding: var(--space-7) var(--space-5); text-align: center; color: var(--text-muted); border-radius: 20px; background: var(--bg-raised); }
.aw-skeleton { height: 148px; border-radius: 22px; background: var(--bg-raised); opacity: 0.7; }

.aw-press { transition: transform 160ms var(--aw-spring, var(--ease-out)); }
.aw-press:active { transform: scale(0.97); transition-duration: 80ms; }

.aw-card {
  display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; color: inherit; font: inherit;
  padding: 20px; border: 0; border-radius: 22px; background: var(--bg-raised); box-shadow: var(--shadow-1); cursor: pointer;
}
.aw-card:hover { box-shadow: var(--shadow-2); }
.aw-card-title { font: 600 1.3125rem/1.15 var(--font-display); letter-spacing: -0.02em; display: block; transform-origin: 0 0; }
.aw-card-about { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.4; }
.aw-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.aw-faces { display: flex; }
.aw-faces img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-raised); margin-left: -8px; background: var(--bg-sunken); }
.aw-faces img:first-child { margin-left: 0; }
.aw-state { display: flex; align-items: center; gap: 6px; font-size: var(--text-small); color: var(--text-muted); white-space: nowrap; }
.aw-state.voted { color: var(--accent); font-weight: 500; }

/* The award page grows out of its card */
.aw-page { position: fixed; inset: 0; z-index: 900; will-change: clip-path, transform; }
.aw-page-bg { position: absolute; inset: 0; background: var(--bg-raised); }
/* A copy of the card, so the page looks exactly like it at the start and end of the motion. */
.aw-ghost { position: absolute; margin: 0; box-shadow: none; pointer-events: none; }
.aw-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.aw-page-inner {
  position: relative; max-width: 40rem; margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 72px) max(20px, env(safe-area-inset-right, 0px)) 64px max(20px, env(safe-area-inset-left, 0px));
}
.aw-close {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 16px); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 5;
  width: 36px; height: 36px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-sunken); color: var(--text);
}
.aw-page-title { font: 700 clamp(1.875rem, 1.4rem + 2vw, 2.5rem)/1.06 var(--font-display); letter-spacing: -0.03em; transform-origin: 0 0; text-wrap: balance; }
.aw-rest { display: flex; flex-direction: column; gap: 10px; }
.aw-page-about { color: var(--text-muted); font-size: 1rem; }
.aw-hint { font-size: 0.9375rem; margin-top: 8px; }
.aw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; margin-top: 10px; }
@media (min-width: 40rem) { .aw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aw-tile { display: flex; flex-direction: column; gap: 8px; border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.aw-photo { position: relative; width: 100%; aspect-ratio: 4 / 5; }
.aw-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; background: var(--bg-sunken); }
.aw-photo::after { content: ""; position: absolute; inset: -4px; border-radius: 22px; border: 2.5px solid var(--accent-fill); opacity: 0; transform: scale(0.96); transition: opacity 240ms, transform 420ms var(--aw-spring, var(--ease-out)); }
.aw-tile.is-mine .aw-photo::after { opacity: 1; transform: none; }
.aw-tick { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: var(--ink-900); opacity: 0; transform: scale(0.5); transition: opacity 200ms ease-out, transform 480ms var(--aw-bounce, var(--ease-out)); }
.aw-tile.is-mine .aw-tick { opacity: 1; transform: scale(1); }
.aw-name { font: 600 1rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.aw-about { font-size: 0.84375rem; line-height: 1.35; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Sheet */
.aw-scrim { position: fixed; inset: 0; z-index: 950; background: rgb(8 15 21 / 0.4); opacity: 0; pointer-events: none; }
.aw-scrim.is-on { pointer-events: auto; }
.aw-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 951; margin: 0 auto; max-width: 34rem; transform: translateY(110%);
  background: var(--bg-raised); border-radius: 30px 30px 0 0; box-shadow: 0 -10px 40px -16px rgb(0 0 0 / 0.3);
  padding-bottom: env(safe-area-inset-bottom, 0px); touch-action: none; will-change: transform; visibility: hidden;
}
.aw-sheet.is-on { visibility: visible; }
/* Wider screens: the same card as a modal in the middle of the screen (script sets its scale and fade). */
.aw-sheet.is-modal {
  top: 50%; left: 50%; right: auto; bottom: auto !important; margin: 0; width: min(30rem, calc(100vw - 48px));
  max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; border-radius: 28px;
  transform: translate(-50%, -50%) scale(0.96); opacity: 0; touch-action: auto; padding-bottom: 0;
  box-shadow: 0 30px 80px -24px rgb(8 15 21 / 0.45), 0 0 0 1px rgb(8 15 21 / 0.04);
}
.aw-sheet.is-modal .aw-grabber { display: none; }
.aw-sheet.is-modal .aw-step { padding: 28px 28px 30px; }
.aw-grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 9px auto 0; }
.aw-sheet-body { overflow: hidden; position: relative; }
.aw-step { padding: 18px 22px 26px; display: flex; flex-direction: column; gap: 14px; }
/* The step on its way out stays put underneath while it fades. */
.aw-step.leaving { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.aw-step.enter { animation: aw-step-in 360ms 40ms var(--aw-spring, var(--ease-out)) both; }
@keyframes aw-step-in { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
.aw-s-photo { width: 160px; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; align-self: center; background: var(--bg-sunken); border: 0; padding: 0; display: block; }
button.aw-s-photo { cursor: zoom-in; }
.aw-s-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Photo viewer */
.aw-viewer { position: fixed; inset: 0; z-index: 1000; touch-action: none; cursor: zoom-out; }
.aw-viewer-bg { position: absolute; inset: 0; opacity: 0; background: rgb(8 12 15 / 0.82); -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2); }
.aw-viewer-img { position: absolute; display: block; object-fit: cover; transform-origin: 50% 50%; will-change: transform, clip-path; -webkit-user-drag: none; user-select: none; }
.aw-viewer-close { background: rgb(255 255 255 / 0.16); color: #fff; opacity: 0; }
@media (prefers-reduced-transparency: reduce) { .aw-viewer-bg { background: rgb(8 12 15 / 0.96); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.aw-center { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.aw-s-name { font: 700 1.625rem/1.1 var(--font-display); letter-spacing: -0.03em; }
.aw-s-text { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.45; }
.aw-s-title { font: 700 1.5rem/1.15 var(--font-display); letter-spacing: -0.025em; }
.aw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; width: 100%; padding: 0 22px;
  border: 0; border-radius: 16px; font: 600 1.0625rem/1 var(--font-body); background: var(--action); color: var(--on-action); cursor: pointer;
  transition: transform 160ms var(--aw-spring, var(--ease-out)), opacity 160ms;
}
.aw-btn:active { transform: scale(0.97); transition-duration: 80ms; }
.aw-btn:disabled { opacity: 0.5; cursor: default; }
.aw-btn.quiet { background: var(--bg-sunken); color: var(--text); }
.aw-field { display: flex; flex-direction: column; gap: 6px; }
.aw-field label { font-size: 0.8125rem; color: var(--text-muted); padding-left: 4px; }
.aw-input { width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--bg-sunken); color: var(--text); font: 400 1.0625rem/1 var(--font-body); transition: box-shadow 160ms, background-color 160ms; }
.aw-input:focus { outline: none; background: var(--bg-raised); box-shadow: 0 0 0 2px var(--accent-fill); }
.aw-err { color: var(--danger); font-size: var(--text-small); }
/* One real input (so paste and the phone's "code from email" suggestion fill it in one go), drawn as six boxes. */
.aw-otp { position: relative; display: block; cursor: text; }
.aw-otp-input {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; outline: none;
  background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: transparent;
  font-size: 16px; /* 16px or more stops iPhones zooming in */ letter-spacing: 0; text-indent: -9999px;
}
.aw-otp-input::selection { background: transparent; }
.aw-otp-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; pointer-events: none; }
.aw-otp-boxes span {
  display: grid; place-items: center; height: 58px; border-radius: 14px; background: var(--bg-sunken);
  font: 600 1.5rem/1 var(--font-display); color: var(--text); transition: box-shadow 160ms, background-color 160ms;
}
.aw-otp-boxes span.is-next { background: var(--bg-raised); box-shadow: 0 0 0 2px var(--accent-fill); }
.aw-otp.is-busy .aw-otp-boxes span { opacity: 0.5; }
.aw-otp.shake { animation: aw-shake 360ms var(--ease-out); }
.aw-link-btn { align-self: center; border: 0; background: none; padding: 6px 10px; color: var(--accent); font: 500 0.9375rem/1.2 var(--font-body); cursor: pointer; border-radius: 8px; }
.aw-link-btn:hover { background: var(--bg-sunken); }
@keyframes aw-shake { 20% { transform: translateX(-8px); } 45% { transform: translateX(7px); } 70% { transform: translateX(-4px); } }
.aw-small { font-size: 0.8125rem; color: var(--text-subtle); text-align: center; }
.aw-check { width: 76px; height: 76px; align-self: center; }
.aw-check circle { fill: var(--accent-fill); transform-origin: 38px 38px; animation: aw-pop 520ms var(--aw-bounce, var(--ease-out)) both; }
.aw-check path { fill: none; stroke: var(--ink-900); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 48; stroke-dashoffset: 48; animation: aw-draw 360ms 180ms ease-out forwards; }
@keyframes aw-pop { from { transform: scale(0.6); opacity: 0; } }
@keyframes aw-draw { to { stroke-dashoffset: 0; } }
.aw-spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: aw-spin 0.7s linear infinite; }
@keyframes aw-spin { to { transform: rotate(360deg); } }
.aw-bot { min-height: 0; }
html.aw-lock, html.aw-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .aw, .aw *, .aw-page *, .aw-sheet *, .aw-viewer * { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
