/* style.css — Wireframe gray theme (brand styles to be added later) */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:               #f2ebd5;
  --surface:          #ffffff;
  --border:           #d0d0d0;
  --border-selected:  #1a1a1a;
  --text:             #1a1a1a;
  --text-secondary:   #555555;
  --text-muted:       #888888;
  --accent:           #333333;
  --accent-hover:     #000000;
  --radius:           6px;
  --font:             'Open Sans', system-ui, sans-serif;
  --font-heading:     'Josefin Sans', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────── */

header {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.header-logo {
  display: block;
  margin: 0 auto 1rem;
  max-height: 80px;
  width: auto;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-heading);
}

header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-family: var(--font-heading);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  max-width: 520px;
  margin-inline: auto;
}

/* ─── Main layout ────────────────────────────────────────── */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ─── Entries grid ───────────────────────────────────────── */

.entries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
  background: #f2ebd5;
  border-radius: var(--radius);
  padding: 1.5rem;
}

@media (max-width: 580px) {
  .entries-grid { grid-template-columns: 1fr; }
}

/* Center a lone card in the last row (2-col grid) */
.entry-card:last-child:nth-child(2n + 1) {
  grid-column: 1 / -1;
  max-width: calc(50% - 1.5rem);
  margin-inline: auto;
}

/* Reset last-card centering — full width on single column */
@media (max-width: 580px) {
  .entry-card:last-child:nth-child(2n + 1) {
    grid-column: auto;
    max-width: 100%;
    margin-inline: 0;
  }
}

/* ─── Entry card ─────────────────────────────────────────── */

.entry-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.entry-card.selected {
  border-color: var(--border-selected);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* Video embed */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  background: #e0e0e0;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video link placeholder */
.video-link-wrapper {
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
}

.watch-link {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.1s, border-color 0.1s;
}

.watch-link:hover {
  background: #ebebeb;
  border-color: var(--accent);
}

/* Entry info */
.entry-info {
  padding: 1rem;
  flex: 1;
}

.entry-number {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.entry-card.selected .entry-number::after {
  content: ' · ✓ Selected';
  color: var(--text);
}

.entry-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.3rem;
  line-height: 1.3;
  font-family: var(--font-heading);
}

.entry-artist {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.entry-participants {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.entry-participants .label {
  font-weight: 600;
}

/* Select button */
.entry-footer {
  padding: 0.75rem 1rem 1.75rem;
}

.select-btn {
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 40px;
  background: #401338;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.select-btn:hover {
  background: #d9e026;
  color: #401338;
}

.entry-card.selected .select-btn {
  background: #401338;
  color: #ffffff;
}

/* ─── Vote form ──────────────────────────────────────────── */

.vote-form-section {
  border-top: 2px solid var(--border);
  padding-top: 2.5rem;
}

.vote-form-inner {
  max-width: 480px;
  margin: 0 auto;
}

.vote-form-inner h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selected-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding: 0.65rem 0.85rem;
  background: #f0f0f0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.selected-label.has-selection {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-selected);
  font-weight: 500;
}

#vote-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.field input {
  padding: 0.625rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.field input:disabled {
  background: #f0f0f0;
  color: var(--text-muted);
  cursor: not-allowed;
}

#submit-btn {
  padding: 0.75rem 1.5rem;
  background: #401338;
  color: #ffffff;
  border: none;
  border-radius: 40px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-top: 0.25rem;
}

#submit-btn:hover:not(:disabled) {
  background: #d9e026;
  color: #401338;
}

#submit-btn:disabled {
  background: #b0b0b0;
  cursor: not-allowed;
}

/* Form feedback */
.form-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.form-message.success {
  background: #edf7ee;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.form-message.error {
  background: #fdf0f3;
  color: #7b1530;
  border: 1px solid #f4b8c4;
}

/* ─── Footer ─────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
