/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #000000;
  --ink-muted: #000000;
  --ink-faint: #ffffff;
  --paper: #f7f6eb80;
  --paper-warm: #ffffff;
  --border: rgba(0,0,0,0.12);
  --border-strong: rgba(0,0,0,0.22);
  --radius: 3px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ────────────────────────────────────────────── */
header {
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  background: var(--paper);
}

.header-inner { max-width: 680px; margin: 0 auto; }

.header-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.header-sub {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 300;
}

/* ── Main ──────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ── Map Section ───────────────────────────────────────── */
.map-section {}


#map-container {
  width: 100%;
  height: 460px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}

@media (max-width: 600px) {
  #map-container { height: 280px; }
}

/* ── Form Section ──────────────────────────────────────── */
.form-section {}

.form-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem;
  background: var(--paper);
}

.form-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.form-desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  /* margin-bottom: 0.4rem; */
}

.field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper-warm);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.field input::placeholder { color: var(--ink-faint); }

.field input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17,17,16,0.08);
}

button#submit-btn {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

button#submit-btn:hover { opacity: 0.82; }
button#submit-btn:active { transform: scale(0.985); }

.form-message {
  margin-top: 1rem;
  font-size: 0.88rem;
  min-height: 1.2em;
  color: var(--ink-muted);
}
.form-message.success { color: #2d6a4f; }
.form-message.error   { color: #b5390f; }

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 600px) {
  header { padding: 2rem 1.25rem 1.5rem; }
  main { padding: 2rem 1.25rem 2.5rem; gap: 2.5rem; }
  .form-card { padding: 1.5rem 1.25rem; }
}

/* ── Winners Section ───────────────────────────────────── */
.winners-section {}

.winners-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--paper);
}

.winners-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.winners-week {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.winners-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.winners-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--ink);
}

.winners-medal {
  font-size: 1.3rem;
  line-height: 1;
}

/* ── Instructions Section ──────────────────────────────── */
.instructions-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  background: var(--paper-warm);
}

.instructions-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.7;
}


/* ── Share Button ──────────────────────────────────────── */
.share-btn {
  margin-top: 1rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.share-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ── Share Popup ───────────────────────────────────────── */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.share-popup {
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: min(420px, 90vw);
  position: relative;
}

.share-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}

.share-url-row {
  display: flex;
  gap: 0.5rem;
}

.share-url-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: var(--paper-warm);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  min-width: 0;
}

.copy-btn {
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.copy-btn:hover { opacity: 0.8; }

.share-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  line-height: 1;
}

.share-close:hover { color: var(--ink); }