/* =============================================
   TED X'S BURNING QUESTIONS — SHARED STYLES
   MyBurningQuestions.com
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;600&family=Courier+Prime:wght@400;700&display=swap');

/* Fallback: if Google Fonts can't load (e.g. local file browsing), these
   system fonts approximate the same roles */

/* --- TOKENS --- */
:root {
  --playa:        #1a1610;   /* near-black, warm */
  --ash:          #2c2720;   /* card backgrounds */
  --dust:         #3d3530;   /* borders, dividers */
  --ember:        #c8763a;   /* primary accent — fire orange */
  --gold:         #e8b84b;   /* headings, highlights */
  --moonlight:    #e8e0d0;   /* body text */
  --pale:         #a89880;   /* muted / secondary text */
  --yes-color:    #5a9e6f;   /* yes bar */
  --no-color:     #9e5a5a;   /* no bar */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-data:    'Courier Prime', 'Courier New', monospace;

  --max-width: 860px;
  --radius: 4px;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--playa);
  color: var(--moonlight);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 300;
}

img { max-width: 100%; display: block; }
a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

/* --- SITE HEADER --- */
.site-header {
  border-bottom: 1px solid var(--dust);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(26,22,16,0.96);
  backdrop-filter: blur(6px);
  z-index: 100;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.site-logo span {
  color: var(--ember);
  font-style: italic;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pale);
  margin-left: 1.8rem;
}

.site-nav a:hover { color: var(--gold); text-decoration: none; }

/* --- HERO --- */
.hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--playa) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-data);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--moonlight);
  max-width: 540px;
}

/* --- PAGE CONTENT WRAPPER --- */
.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* --- PROSE --- */
.prose p {
  margin-bottom: 1.4rem;
  color: var(--moonlight);
}

.prose p {
  font-size: 0.9rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--dust);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ember);
  margin: 2rem 0 0.6rem;
}

/* --- EVENT CARDS (front page) --- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 2.5rem;
}

.event-card {
  background: var(--ash);
  border: 1px solid var(--dust);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  border-color: var(--ember);
  transform: translateY(-2px);
}

.event-card-year {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--ember);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.event-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.event-card-theme {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--pale);
  margin-bottom: 1rem;
}

.event-card-questions {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--pale);
  margin-bottom: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.event-card-questions div::before {
  content: '— ';
  color: var(--ember);
}

.event-card-note {
  font-size: 0.88rem;
  color: var(--pale);
  margin-bottom: 1rem;
  flex: 1;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: transparent;
  border: 1px solid var(--ember);
  color: var(--ember);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}

.btn:hover {
  background: var(--ember);
  color: var(--playa);
  text-decoration: none;
}

.btn-disabled {
  border-color: var(--dust);
  color: var(--dust);
  cursor: default;
}

.btn-disabled:hover {
  background: transparent;
  color: var(--dust);
}

/* --- EVENT PAGE HEADER --- */
.event-header {
  background: var(--ash);
  border-bottom: 1px solid var(--dust);
  padding: 2.5rem 2rem;
  text-align: center;
}

.event-eyebrow {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.5rem;
}

.event-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.event-theme {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--pale);
}

/* --- QUESTIONS BLOCK --- */
.questions-block {
  background: var(--ash);
  border: 1px solid var(--dust);
  border-left: 3px solid var(--ember);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin: 2.5rem 0;
}

.questions-block h2 {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.2rem;
  border: none;
  padding: 0;
}

.question-item {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.question-num {
  font-family: var(--font-data);
  color: var(--ember);
  font-size: 0.9rem;
  min-width: 1.4rem;
  padding-top: 0.1rem;
}

.question-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--moonlight);
  line-height: 1.5;
}

/* --- RESULTS SECTION --- */
.results-section {
  margin: 2.5rem 0;
}

.results-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--dust);
  margin-bottom: 2rem;
}

.results-tab {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pale);
  padding: 0.6rem 1.4rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s;
  margin-bottom: -1px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.results-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.results-panel { display: none; }
.results-panel.active { display: block; }

.result-row {
  margin-bottom: 2rem;
}

.result-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--moonlight);
  margin-bottom: 0.7rem;
}

.result-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.bar-label {
  font-family: var(--font-data);
  font-size: 0.82rem;
  color: var(--pale);
  width: 2.5rem;
  text-align: right;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  background: var(--dust);
  border-radius: 2px;
  height: 22px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
}

.bar-fill.yes { background: var(--yes-color); }
.bar-fill.no  { background: var(--no-color); }

.bar-count {
  font-family: var(--font-data);
  font-size: 0.82rem;
  color: var(--pale);
  width: 3.5rem;
  flex-shrink: 0;
}

/* --- ONLINE SURVEY FORM --- */
.survey-form {
  background: var(--ash);
  border: 1px solid var(--dust);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
}

.survey-form h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.survey-q {
  margin-bottom: 1.5rem;
}

.survey-q-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--moonlight);
  margin-bottom: 0.6rem;
}

.yn-buttons {
  display: flex;
  gap: 0.8rem;
}

.yn-btn {
  padding: 0.45rem 1.4rem;
  border: 1px solid var(--dust);
  background: transparent;
  color: var(--pale);
  font-family: var(--font-data);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.yn-btn:hover { border-color: var(--ember); color: var(--ember); }
.yn-btn.selected-yes { background: var(--yes-color); border-color: var(--yes-color); color: #fff; }
.yn-btn.selected-no  { background: var(--no-color);  border-color: var(--no-color);  color: #fff; }

.survey-submit {
  margin-top: 1.2rem;
}

.already-answered {
  font-family: var(--font-data);
  font-size: 0.88rem;
  color: var(--pale);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* --- PHOTO GRID --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.8rem;
  margin: 2rem 0;
}

.photo-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  filter: brightness(0.9);
  transition: filter 0.2s, transform 0.2s;
}

.photo-grid img:hover {
  filter: brightness(1.05);
  transform: scale(1.01);
}

/* --- BREADCRUMB --- */
.breadcrumb {
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--pale);
  padding: 1rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.breadcrumb a { color: var(--ember); }

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid var(--dust);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-data);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--pale);
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .site-header { flex-direction: column; gap: 0.6rem; text-align: center; }
  .site-nav a { margin: 0 0.6rem; }
  .hero { height: 55vh; }
  .content-wrap { padding: 2rem 1.2rem 4rem; }
  .events-grid { grid-template-columns: 1fr; }
}
