@font-face {
  font-family: "ALS Sector";
  src: url("/assets/fonts/ALSSECTOR.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mak";
  src: url("/assets/fonts/MAK.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mak";
  src: url("/assets/fonts/MAK-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #311322;
  --muted: #715464;
  --accent: #ab174d;
  --paper: #fff7f4;
  --line: #ead8df;
  --white: #fffdfb;
  --wrap: 1180px;
  font-family: "ALS Sector";
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #963ac3; outline-offset: 4px; }
.wrap { width: min(var(--wrap), calc(100% - 96px)); margin-inline: auto; }

.hero {
  color: var(--white);
  background-color: #b72356;
  background-image: linear-gradient(100deg, #5d083caa 0%, #79103970 45%, #6e0b3330 100%), url("/background.webp");
  background-position: center, center 8%;
  background-size: cover;
}
.masthead {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #fff5;
}
.brand, .nav-link { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.0625rem; font-weight: 800; letter-spacing: -.025em; }
.brand-mark { width: 26px; height: 29px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.brand-mark i { width: 4px; background: currentColor; border-radius: 5px; height: 12px; transform: rotate(20deg); }
.brand-mark i:nth-child(2) { height: 20px; }
.brand-mark i:nth-child(3) { height: 15px; }
.nav-link { border: 1px solid #fff7; border-radius: 40px; padding: 9px 17px; font-weight: 700; font-size: .875rem; }
.nav-link:hover { background: #fff2; }
.hero-content { padding-block: 65px 76px; }
.eyebrow { margin: 0 0 15px; display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; background: #ffd0ad; width: 20px; height: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 700 clamp(2.35rem, 8.6vw, 8rem)/1 "Mak"; letter-spacing: -.045em; margin-bottom: 25px; }
h1 em { display: inline-block; font-style: normal; font-weight: 400; }
.lead { font-size: clamp(1rem, 1.7vw, 1.25rem); line-height: 1.45; margin-bottom: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 15px 20px; text-decoration: none; font-weight: 700; font-size: .9375rem; min-height: 48px; }
.hero-button { background: #fff4e8; color: #7f153d; }
.hero-button:hover { background: #ffe0c9; }
.hero :focus-visible { outline-color: white; }

.roster { padding-block: 54px 68px; scroll-margin-top: 12px; }
.roster-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-title { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
h2 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1; font-weight: 800; letter-spacing: -.065em; margin: 0; }
.count { font-size: .875rem; font-weight: 700; background: #f8e2eb; color: #8a1947; padding: 7px 11px; border-radius: 20px; }
.roster-heading p { margin: 10px 0 0; color: var(--muted); line-height: 1.45; }
.search { display: flex; flex: 0 1 306px; gap: 12px; align-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding-inline: 15px; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search input { min-width: 0; width: 100%; height: 46px; background: transparent; color: var(--ink); border: 0; outline: 0; font-size: .9375rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search-icon { color: var(--accent); position: relative; border: 1.6px solid currentColor; border-radius: 50%; width: 14px; height: 14px; flex: none; }
.search-icon::after { content: ""; position: absolute; height: 1.6px; width: 6px; bottom: -2px; right: -4px; background: currentColor; transform: rotate(45deg); border-radius: 2px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.portrait { aspect-ratio: 5 / 5.2; background: #ecdfdf; overflow: hidden; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.card-info { display: flex; flex: 1; flex-direction: column; padding: 15px; }
.card h3 { font-size: clamp(1rem, 1.45vw, 1.21rem); letter-spacing: -.025em; line-height: 1.2; margin-bottom: 7px; overflow-wrap: anywhere; }
.card p { color: var(--muted); min-height: 1.1em; font-size: .875rem; margin-bottom: 15px; }
.pick { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 42px; margin-top: auto; padding: 8px 11px; border: 1px solid #ebcad7; border-radius: 8px; color: #921642; background: #fff4f8; text-align: left; font-size: .875rem; font-weight: 700; }
.pick span { display: grid; place-items: center; flex: 0 0 15px; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; }
.pick:not(:disabled):hover { background: #f5dce6; border-color: #cf89a6; }
.card[data-voted] { border-color: var(--accent); }
.card[data-voted] .pick { background: var(--accent); color: white; border-color: var(--accent); }
.card[data-voted] .pick span::before, .receipt-icon::before {
  content: "";
  width: .55em;
  height: .32em;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}
.receipt-icon::before { width: .9em; height: .55em; }
.list-message { padding: 25px 0; color: var(--muted); }
.page-footer { border-top: 1px solid var(--line); color: #803653; padding-block: 22px 32px; }

.receipt { display: flex; align-items: center; gap: 13px; padding: 16px; color: #77153e; background: #f9e3ec; border-radius: 12px; margin-bottom: 27px; }
.receipt-icon { display: grid; place-items: center; flex: 0 0 35px; height: 35px; color: white; background: var(--accent); border-radius: 50%; }
.receipt p, .ballot p { color: var(--muted); margin: 4px 0 0; font-size: .9375rem; line-height: 1.4; }
dialog { position: fixed; max-height: calc(100dvh - 28px); width: min(432px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 18px; padding: 27px; color: var(--ink); background: var(--white); box-shadow: 0 18px 65px #3c0a3655; }
dialog::backdrop { background: #300d23a0; }
dialog h2 { font-size: 1.8rem; margin: 0 28px 16px 0; }
.close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: #f7e8ee; border: 0; border-radius: 50%; color: var(--ink); }
.close::before, .close::after { content: ""; grid-area: 1 / 1; width: 15px; height: 2px; background: currentColor; transform: rotate(45deg); }
.close::after { transform: rotate(-45deg); }
.ballot { display: flex; align-items: center; gap: 12px; background: #fbebf1; padding: 9px; border-radius: 10px; margin-bottom: 16px; }
.ballot img { width: 55px; height: 59px; object-fit: cover; object-position: center 22%; border-radius: 6px; }
.dialog-copy { color: var(--muted); line-height: 1.48; margin-bottom: 14px; }
.error { color: #a7193d; font-size: .875rem; margin: 10px 0 0; }
.submit { width: 100%; color: white; background: var(--accent); margin-top: 15px; }
.submit:not(:disabled):hover { background: #89133d; }
.submit:disabled { opacity: .65; }

.results { margin-bottom: 38px; padding: clamp(15px, 3vw, 28px); border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.results h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.results-total { margin: 10px 0; color: var(--muted); }
.results-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.results-table th, .results-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.results-table tbody th { font-weight: 400; }
.results-table :is(th, td):last-child { text-align: right; }
.results-table tbody tr:last-child > * { border-bottom: 0; }
.results-table tr[data-voted] { background: #f9e3ec; }
.results-table tr[data-voted] > * { color: #77153e; font-weight: 700; }

@media (max-width: 880px) {
  .wrap { width: calc(100% - 52px); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .masthead { height: 62px; }
  .hero { background-position: center, center 9%; }
  .hero-content { padding-block: 46px 49px; }
  .eyebrow { font-size: .75rem; letter-spacing: .1em; }
  h1 { margin-bottom: 18px; }
  .lead { margin-bottom: 20px; }
  .roster { padding-block: 32px 40px; }
  .roster-heading { display: grid; gap: 14px; margin-bottom: 16px; }
  .search { width: 100%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 11px; }
  .card-info { padding: 10px; }
  .pick { min-height: 44px; }
}
@media (max-width: 350px) {
  h1 { font-size: 2.15rem; }
  dialog { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
