/* ── Design tokens ── */
:root {
  --red: #e32b2b;
  --red-hover: #c42424;
  --white: #ffffff;
  --black: #0a0a0a;
  --bg-dark: #111111;
  --bg-darker: #0c0c0c;
  --overlay: rgba(0, 0, 0, 0.58);
  --glass: rgba(30, 30, 30, 0.55);
  --glass-border: rgba(255, 255, 255, 0.25);
  --muted: rgba(255, 255, 255, 0.55);
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --radius-btn: 14px;
  --radius-card: 16px;
  --radius-circle: 50%;
  --header-h: 64px;
  --side-pad: 1.25rem;
  --btn-max-w: 22rem;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-sans);
  color: var(--white);
  background: var(--black);
  min-height: 100dvh;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ── Brand typography ── */
.brand {
  line-height: 1;
  white-space: nowrap;
}

.brand__sgcook {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--white);
}

.brand__fiesta {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  color: var(--red);
}

.brand--sm {
  font-size: 1.05rem;
}

.brand--lg .brand__sgcook,
.brand--lg .brand__fiesta {
  font-size: clamp(3.4rem, 14vw, 5.5rem);
  letter-spacing: -0.02em;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--side-pad);
}

.header--solid {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--red);
  flex-shrink: 0;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-circle);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.menu-btn:hover,
.menu-btn:focus-visible {
  background: rgba(50, 50, 50, 0.7);
  outline: none;
}

.menu-btn__line {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Navigation drawer ── */
.nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
}

.nav.is-open {
  visibility: visible;
  pointer-events: auto;
}

.nav__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav.is-open .nav__backdrop {
  opacity: 1;
}

.nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(18rem, 85vw);
  height: 100%;
  background: rgba(18, 18, 18, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.is-open .nav__panel {
  transform: translateX(0);
}

.nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: auto;
  border-radius: var(--radius-circle);
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.nav__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav__list {
  list-style: none;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav__link {
  display: block;
  padding: 0.85rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--red);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) var(--side-pad) 3rem;
  background:
    var(--overlay)
    url("https://images.unsplash.com/photo-1551024601-bec78aea704b?auto=format&fit=crop&w=1200&q=80")
    center / cover no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.75rem;
}

.hero__title {
  font-weight: inherit;
}

.hero__actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: var(--btn-max-w);
  padding: 1rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-btn);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--red-hover);
  border-color: var(--red-hover);
  outline: none;
}

.btn--secondary {
  background: var(--glass);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: rgba(50, 50, 50, 0.65);
  border-color: var(--white);
  outline: none;
}

.btn--sm {
  max-width: none;
  width: auto;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
}

.btn--xs {
  max-width: none;
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--white);
}

.btn__icon {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}

/* ── Sections ── */
.section {
  padding: 3.5rem var(--side-pad);
}

.section--dark {
  background: var(--bg-dark);
}

.section--darker {
  background: var(--bg-darker);
}

.section__inner {
  max-width: 28rem;
  margin: 0 auto;
}

.section__header {
  margin-bottom: 2rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.section__sub {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: lowercase;
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 600;
  font-style: italic;
  text-transform: lowercase;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section__desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
  text-transform: lowercase;
}

.section__note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Dish cards ── */
.cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dish-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.dish-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.dish-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.dish-card__body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dish-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  text-transform: lowercase;
  line-height: 1.2;
}

/* ── Link arrow ── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: lowercase;
  color: var(--white);
  transition: color 0.2s ease;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s ease;
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--red);
  outline: none;
}

.link-arrow:hover::after,
.link-arrow:focus-visible::after {
  transform: translateX(4px);
}

.link-arrow--inline {
  margin-top: 0.75rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* ── Jury cards ── */
.jury-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jury-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-card);
}

.jury-card__num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
}

.jury-card__role {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  margin-bottom: 0.35rem;
}

.jury-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  text-transform: lowercase;
  margin-bottom: 0.5rem;
}

.jury-card__bio {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  text-transform: lowercase;
}

/* ── Standings ── */
.standings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.standing {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.standing__rank {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--red);
}

.standing__name {
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: lowercase;
  margin-bottom: 0.15rem;
}

.standing__cat {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: lowercase;
}

.standing__stats {
  text-align: right;
}

.standing__votes {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.standing__label {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: lowercase;
}

.standing__delta {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.standing__delta--up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

/* ── Menu page ── */
.page-inner {
  padding-top: var(--header-h);
}

.menu-page {
  min-height: calc(100dvh - var(--header-h));
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.menu-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item__entry {
  font-size: 0.7rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.menu-item__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  text-transform: lowercase;
  margin-bottom: 0.35rem;
}

.menu-item__origin {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: lowercase;
  margin-bottom: 0.5rem;
}

.menu-item__desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  text-transform: lowercase;
}

/* ── Voting portal page ── */
.vote-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    rgba(0, 0, 0, 0.75)
    url("https://images.unsplash.com/photo-1551024601-bec78aea704b?auto=format&fit=crop&w=1200&q=80")
    center / cover no-repeat;
}

.vote-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.vote-page__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 22rem;
  padding: 2.25rem 1.5rem 1.75rem;
  background: rgba(22, 22, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-align: center;
}

.vote-page__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-circle);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.vote-page__close:hover,
.vote-page__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.vote-page__close svg {
  width: 1rem;
  height: 1rem;
}

.vote-page__dish {
  font-size: 0.85rem;
  color: var(--white);
  text-transform: lowercase;
  margin: -0.75rem 0 1.25rem;
  padding: 0.5rem 0.75rem;
  background: rgba(227, 43, 43, 0.12);
  border: 1px solid rgba(227, 43, 43, 0.25);
  border-radius: 8px;
}

.vote-portal__eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-bottom: 0.85rem;
}

.vote-portal__title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 7vw, 2.25rem);
  font-weight: 600;
  font-style: italic;
  text-transform: lowercase;
  line-height: 1.1;
  margin-bottom: 0.65rem;
}

.vote-portal__sub {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: lowercase;
  margin-bottom: 1.75rem;
}

.vote-portal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn--portal {
  max-width: none;
  width: 100%;
  justify-content: flex-start;
  padding: 0.95rem 1.15rem;
  font-size: 0.95rem;
  border-radius: 12px;
}

.btn__portal-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  padding: 2rem var(--side-pad) 2.5rem;
  background: var(--bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 200;
  padding: 0.85rem 1.25rem;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.9rem;
  text-transform: lowercase;
  backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ── Tablet & up ── */
@media (min-width: 480px) {
  :root {
    --side-pad: 1.75rem;
    --radius-btn: 16px;
  }

  .brand--sm {
    font-size: 1.15rem;
  }

  .hero__content {
    gap: 3.25rem;
  }

  .btn {
    font-size: 1.05rem;
    padding: 1.05rem 1.75rem;
  }

  .section__inner {
    max-width: 32rem;
  }
}

/* ── Desktop ── */
@media (min-width: 768px) {
  :root {
    --side-pad: 2.5rem;
    --btn-max-w: 24rem;
  }

  .header {
    max-width: 72rem;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  .hero__content,
  .section__inner {
    max-width: 36rem;
  }

  .brand--lg .brand__sgcook,
  .brand--lg .brand__fiesta {
    font-size: clamp(4.5rem, 8vw, 6.5rem);
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .dish-card__body {
    flex-direction: column;
    align-items: flex-start;
  }

  .jury-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero {
    background-image:
      var(--overlay)
      url("https://images.unsplash.com/photo-1551024601-bec78aea704b?auto=format&fit=crop&w=1920&q=85");
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
