/* ── Team Spirit Photo Vote — gameday tailgate ──────────────────────
   Deep navy field, diagonal gold stripes, pennant bunting, ultra-tall
   athletic display type, jersey-number outlines, foam-finger buttons. */

:root {
  --navy: #10203f;
  --navy-2: #182c54;
  --card: #ffffff;
  --gold: #f5b301;
  --gold-deep: #cc8f00;
  --ink: #182035;
  --ink-soft: #5c6579;
  --paper: #f4f5f8;
  --err: #e0452e;
  --ok: #1d9e57;
  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #fff;
  overflow: hidden;
  padding-bottom: 34px;
}

.stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent 0 90px,
    rgba(245, 179, 1, 0.07) 90px 130px
  );
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; padding: 64px 20px 30px; }

.badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  border: 2px solid var(--gold);
  padding: 6px 18px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 12vw, 6rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  -webkit-text-stroke: 0;
}

.hero h1 .gold {
  color: var(--gold);
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.hero .sub {
  max-width: 560px;
  margin: 16px auto 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.06rem;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Pennant bunting */
.bunting {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
}

.bunting span {
  width: 34px;
  height: 26px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: var(--gold);
}

.bunting span:nth-child(even) { background: #fff; }

/* ── Tabs ─────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 8px;
  margin: 30px 0 22px;
  border-bottom: 3px solid var(--navy);
}

.tab {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 26px 10px;
  background: transparent;
  color: var(--ink-soft);
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.tab.is-active { background: var(--navy); color: var(--gold); }

/* ── Cards & panels ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 2px solid var(--navy);
  box-shadow: 8px 8px 0 rgba(16, 32, 63, 0.15);
  padding: 30px 28px 34px;
  max-width: 640px;
  margin: 0 auto;
}

.card h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  text-transform: uppercase;
}

.card-sub { color: var(--ink-soft); margin: 4px 0 22px; }

.note {
  max-width: 640px;
  margin: 18px auto;
  padding: 16px 20px;
  background: #fff;
  border: 2px solid var(--navy);
  text-align: center;
}

/* Upload drop zone */
.drop {
  position: relative;
  border: 3px dashed rgba(16, 32, 63, 0.3);
  background: var(--paper);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.drop:hover { border-color: var(--gold-deep); }

.drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-inner { text-align: center; padding: 22px; }
.drop-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.drop-text { font-weight: 700; }
.drop-hint { color: var(--ink-soft); font-size: 0.85rem; margin-top: 4px; }

.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fields */
.field { margin-bottom: 16px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(16, 32, 63, 0.25);
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--navy); }
input.error { border-color: var(--err); }
input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.form-error { color: var(--err); font-weight: 700; text-align: center; margin-top: 14px; }

/* Post-entry */
.my-photo-wrap { text-align: center; margin-bottom: 20px; }

.my-photo {
  max-width: 260px;
  width: 100%;
  border: 4px solid var(--navy);
  box-shadow: 8px 8px 0 var(--gold);
  margin-bottom: 12px;
}

.my-caption { font-weight: 700; font-size: 1.05rem; }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  line-height: 1.2;
}

.btn:hover:not(:disabled) { transform: translate(-2px, -2px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 5px 5px 0 rgba(16, 32, 63, 0.9);
}

.btn-primary:hover:not(:disabled) { box-shadow: 7px 7px 0 rgba(16, 32, 63, 0.9); }

.btn-ghost { background: #fff; color: var(--navy); }

.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.hero .btn-primary { border-color: var(--gold); }

.btn-block { width: 100%; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(16, 32, 63, 0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Gallery ──────────────────────────────────────────────────────── */
.gallery-head { text-align: center; margin-bottom: 22px; }

.gallery-head h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.2rem;
  text-transform: uppercase;
}

.gallery-sub { color: var(--ink-soft); font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.pet-card {
  background: #fff;
  border: 2px solid var(--navy);
  box-shadow: 5px 5px 0 rgba(16, 32, 63, 0.12);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pet-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(16, 32, 63, 0.18); }

.pet-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.pet-caption { font-weight: 700; padding: 12px 14px 2px; font-size: 0.95rem; }

.pet-author { color: var(--ink-soft); font-size: 0.82rem; padding: 0 14px; }

.pet-votes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 14px;
  gap: 10px;
}

.vote-count { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--navy); }

.vote-btn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 20px;
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.vote-btn:hover:not(:disabled) { transform: translateY(-1px); }

.vote-btn.is-voted { background: var(--ok); color: #fff; border-color: var(--ok); cursor: default; }

/* Empty state */
.empty { text-align: center; padding: 50px 20px; }
.empty-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.empty-sub { color: var(--ink-soft); margin: 6px 0 18px; }

.load-wrap { text-align: center; margin-top: 26px; }

/* ── Lightbox ─────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16, 32, 63, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lb-content { max-width: 860px; width: 100%; text-align: center; }

.lb-img {
  max-width: 100%;
  max-height: 62vh;
  border: 4px solid #fff;
  box-shadow: 10px 10px 0 var(--gold);
}

.lb-meta { margin-top: 18px; color: #fff; }
.lb-caption { font-weight: 700; font-size: 1.1rem; }
.lb-author { color: rgba(255, 255, 255, 0.65); font-size: 0.9rem; margin-top: 2px; }
.lb-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.lb-votes { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--gold); }

.lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 2.2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.6rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 52px;
  height: 52px;
  line-height: 1;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--err);
  color: #fff;
  padding: 14px 26px;
  font-weight: 700;
  z-index: 300;
  max-width: 92vw;
  text-align: center;
}

.toast-ok { background: var(--ok); }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  border-top: 3px solid var(--navy);
  background: #fff;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tabs { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
