/* ============================================================
   DFW Pinball League — Main Stylesheet
   ============================================================ */

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

:root {
  --bg: #f9f9fb;
  --surface: #ffffff;
  --surface2: #f4f4f7;
  --border: #dcdce6;
  --gold: #a07000;
  --silver: #5a6270;
  --bronze: #8a4e1a;
  --accent: #d93a10;
  --accent-subtle: rgba(217, 58, 16, 0.08);
  --text: #111118;
  --muted: #6b6b80;
  --green: #2a7a52;
  --green-subtle: rgba(42, 122, 82, 0.08);
  --nav-height: 64px;
}

body {
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ── Navigation ─────────────────────────────────────────── */

.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* ── Page layout ─────────────────────────────────────────── */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 48px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 8vw, 80px);
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

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

/* ── Hero banner (with image) ────────────────────────────── */

.hero-banner {
  background-color: #111;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0;
  border: none;
  padding: 0;
  margin-bottom: 0;
  position: relative;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.65) 100%);
  border-radius: 0;
}

.hero-banner::after { display: none; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 24px 80px;
  text-align: center;
}

.hero-banner .hero-eyebrow { color: rgba(255,255,255,0.75); }
.hero-banner .hero-title   { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.hero-banner .hero-tagline { color: rgba(255,255,255,0.85); }

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #bf3410; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-secondary-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.btn-secondary-light:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 14px;
}

.btn-danger {
  background: rgba(200, 40, 20, 0.1);
  color: #c82814;
  border: 1px solid rgba(200, 40, 20, 0.2);
}
.btn-danger:hover { background: rgba(200, 40, 20, 0.18); }

/* ── Sections ────────────────────────────────────────────── */

.section { margin-bottom: 48px; }

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

/* ── Stat cards ──────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.stat-card-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ── About text ──────────────────────────────────────────── */

.about-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}

.about-text p + p { margin-top: 14px; }

.info-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.info-item::before {
  content: '→';
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── About image ─────────────────────────────────────────── */

.about-img {
  border-radius: 8px;
  display: block;
}

.about-img-top {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  margin-bottom: 24px;
}

.about-img-bottom {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  margin-top: 20px;
}

.about-img-right {
  float: right;
  width: 220px;
  max-height: 220px;
  object-fit: cover;
  margin: 0 0 16px 24px;
}

/* ── Event cards ─────────────────────────────────────────── */

.events-list { display: flex; flex-direction: column; gap: 10px; }

.event-card {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.event-card:hover {
  border-color: #b8b8cc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.event-card.has-url:hover {
  border-color: var(--accent);
}

.event-card.past { opacity: 0.45; }

.event-date-block {
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 6px;
  flex-shrink: 0;
}

.event-date-month {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

.event-date-day {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--text);
}

.event-date-year {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  line-height: 1;
  margin-top: 2px;
}

.event-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.event-venue {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.event-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.event-tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.event-tag.cost {
  color: var(--green);
  background: var(--green-subtle);
  border-color: rgba(42, 122, 82, 0.2);
}

.event-arrow {
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}

.events-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ── Sponsors ────────────────────────────────────────────── */

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

.sponsor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sponsor-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.sponsor-logo {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
}

.sponsor-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.sponsor-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Links ───────────────────────────────────────────────── */

.links-list { display: flex; flex-direction: column; gap: 10px; }

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.15s;
}

.link-item:hover { border-color: var(--accent); }

.link-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.link-desc {
  font-size: 12px;
  color: var(--muted);
}

.link-arrow {
  color: var(--muted);
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent); }

/* ── Alerts ──────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 24px;
}

.alert-success {
  background: var(--green-subtle);
  color: #1d5c38;
  border: 1px solid rgba(42, 122, 82, 0.2);
}

.alert-error {
  background: var(--accent-subtle);
  color: #9a200a;
  border: 1px solid rgba(217, 58, 16, 0.2);
}

/* ── Admin layout ────────────────────────────────────────── */

.admin-wrap {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

.admin-sidebar {
  width: 210px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 0;
  flex-shrink: 0;
}

.admin-sidebar-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 20px 10px;
  display: block;
}

.admin-nav { list-style: none; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.admin-nav a:hover { color: var(--text); background: var(--surface2); }
.admin-nav a.active { color: var(--accent); background: var(--accent-subtle); }

.admin-nav-icon { font-size: 15px; width: 20px; text-align: center; }

.admin-content {
  flex: 1;
  padding: 36px 44px;
  min-width: 0;
}

.admin-page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 4px;
}

.admin-page-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ── Admin forms ─────────────────────────────────────────── */

.form-row { display: grid; gap: 16px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 8px;
}

/* ── Admin data table ────────────────────────────────────── */

.data-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }

.data-table .td-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.past-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}

.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Edit form card ──────────────────────────────────────── */

.edit-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 32px;
}

.edit-form-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Admin login ─────────────────────────────────────────── */

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 44px;
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 720px) {
  .event-card {
    grid-template-columns: 60px 1fr;
    padding: 16px;
    gap: 14px;
  }
  .event-arrow { display: none; }
  .hero { padding: 40px 24px; }
  .page, .page-narrow { padding: 32px 16px 60px; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 24px 20px; }
  .form-row.cols-2 { grid-template-columns: 1fr; }
}
