/* ============================================================
   Bryce Canyon Astronomy Festival — "Festival Broadside"
   Letterpress event-poster identity. LIGHT site.
   Fonts: DM Serif Display 400 (headings) + DM Sans 400/500/600
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  --bg:        #fdf6e3;
  --surface:   #fff9f0;
  --text:      #1c1209;
  --muted:     #7a6a52;
  --accent:    #c9420e;   /* burnt sienna — secondary actions / links */
  --cta-fill:  #f5c842;   /* booking CTA fill ONLY */
  --border:    #e2d5bc;
  --ghost:     #e2d5bc;   /* ghost numeral color */
  --max:       72rem;
}

/* ---------- Reset ---------- */

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

html {
  scroll-behavior: smooth;
}

/* ---------- Base ---------- */

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

h3 {
  font-family: "DM Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

p {
  max-width: 65ch;
  margin-bottom: 1.2rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(201, 66, 14, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease-out, text-decoration-color 0.15s ease-out;
}

a:hover {
  color: #a83309;
  text-decoration-color: #a83309;
}

ul, ol {
  margin: 0 0 1.2rem 1.4rem;
  max-width: 65ch;
}

li {
  margin-bottom: 0.5rem;
}

strong {
  font-weight: 600;
  color: var(--text);
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding: 4rem 0 5rem;
}

main.has-hero {
  padding-top: 0;
}

/* ---------- Header ---------- */

.site-header {
  background: rgba(253, 246, 227, 0.97);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1.3;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand .accent {
  color: var(--accent);
}

/* Hamburger */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
  transition: opacity 0.2s ease-out;
}

/* Nav */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.9rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.15s ease-out;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ---------- Split Hero (index only) ---------- */

.hero-split {
  display: grid;
  grid-template-columns: 55fr 45fr;
  min-height: 70vh;
  margin-bottom: 0;
}

.hero-photo {
  position: relative;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.date-badge {
  display: inline-block;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-panel h1 {
  margin-bottom: 1rem;
  max-width: 14ch;
}

.hero-panel .lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 38ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

/* ---------- Numbered editorial sections (ghost numerals) ---------- */

.editorial-section {
  margin-bottom: 5rem;
}

/* The ghost numeral lives as a data attribute rendered via an extra span.
   We use a flex+grid trick: the numeral is display:block, the h2 overlaps via
   negative top margin, all children flow normally below. */

.section-num {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 400;
  color: var(--ghost);
  line-height: 0.85;
  display: block;
  /* Pull subsequent h2 up to overlap */
}

.editorial-section h2 {
  margin-top: -0.5em;
  margin-bottom: 1.25rem;
  position: relative; /* sits above ghost numeral visually via paint order */
}

/* ---------- Interior page header ---------- */

.page-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.page-header h1 {
  max-width: 20ch;
}

.page-header .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 55ch;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  font-family: "DM Sans", sans-serif;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

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

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs span[aria-current] {
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--cta-fill);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 0;
  border: 2px solid var(--text);
  box-shadow: 3px 3px 0 var(--text);
  transition: background 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn:hover {
  background: #e6b430;
  color: var(--text);
  text-decoration: none;
  box-shadow: 1px 1px 0 var(--text);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 3px 3px 0 var(--accent);
}

.btn-secondary:hover {
  background: rgba(201, 66, 14, 0.06);
  color: var(--accent);
  text-decoration: none;
  box-shadow: 1px 1px 0 var(--accent);
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem;
  transition: border-color 0.15s ease-out;
}

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

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 42rem) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Ticket-stub component ---------- */

.ticket-stub {
  display: grid;
  grid-template-columns: 28% 1fr;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  min-height: 90px;
}

.ticket-stub-left {
  background: var(--surface);
  border-right: 2px dashed var(--border);
  padding: 1rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.ticket-stub-left .stub-date {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--text);
}

.ticket-stub-left .stub-label {
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}

.ticket-stub-right {
  background: var(--bg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ticket-stub-right p {
  max-width: 100%;
  margin-bottom: 0;
  font-size: 0.96rem;
}

/* ---------- Photo cards (lodging) ---------- */

.photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease-out;
}

.photo-card:hover {
  border-color: var(--accent);
}

.photo-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.photo-card .photo-card-body {
  padding: 1.1rem 1.25rem 1.4rem;
}

.photo-card .photo-card-body h3 {
  margin-bottom: 0.4rem;
}

.photo-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 100%;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--cta-fill);
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  padding: 3rem 2rem;
  margin: 5rem -1.5rem;
  text-align: center;
}

@media (min-width: 75rem) {
  /* At widths where wrap is constrained, break wider */
  .cta-band {
    margin-left: calc((100vw - var(--max)) / -2 - 1.5rem);
    margin-right: calc((100vw - var(--max)) / -2 - 1.5rem);
  }
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: 0.75rem;
  color: var(--text);
}

.cta-band p {
  max-width: 44ch;
  margin: 0 auto 1.5rem;
  color: var(--text);
}

.cta-band .btn {
  background: var(--text);
  color: var(--cta-fill);
  border-color: var(--text);
  box-shadow: 3px 3px 0 rgba(255,255,255,0.4);
}

.cta-band .btn:hover {
  background: #2e1e0d;
  box-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.96rem;
  max-width: 100%;
}

thead tr {
  background: #fdf0d0;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

tr:last-child td {
  border-bottom: none;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.table-wrap table {
  margin-bottom: 0;
}

/* ---------- Notice ---------- */

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.96rem;
  color: var(--muted);
  max-width: 65ch;
}

.notice strong {
  color: var(--text);
}

/* ---------- Pull quote ---------- */

.pull-quote {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  color: var(--text);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  max-width: 52ch;
  line-height: 1.4;
}

/* ---------- Photo blocks ---------- */

.photo-block {
  margin: 3rem 0;
  line-height: 0;
  border: 1px solid var(--border);
}

.photo-block img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.photo-block figcaption {
  background: var(--surface);
  padding: 0.65rem 1rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* Full-bleed photo break (breaks column) */

.photo-break {
  margin: 4rem -1.5rem;
  line-height: 0;
  position: relative;
}

@media (min-width: 75rem) {
  .photo-break {
    margin-left: calc((100vw - var(--max)) / -2 - 1.5rem);
    margin-right: calc((100vw - var(--max)) / -2 - 1.5rem);
  }
}

.photo-break img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.photo-break .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(28, 18, 9, 0.38));
}

.photo-break figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 1.5rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.82rem;
  color: rgba(253, 246, 227, 0.9);
  line-height: 1.5;
}

/* ---------- FAQ ---------- */

.faq-list {
  margin: 0;
}

.faq-item {
  border-bottom: 1px dashed var(--border);
  padding: 0 0 1.25rem;
  margin-bottom: 1.25rem;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: "DM Sans", sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-answer {
  padding: 0.5rem 0 0.25rem;
  color: var(--text);
}

.faq-item .faq-answer p {
  max-width: 65ch;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-bottom: 1.5rem;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease-out;
}

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

.disclaimer {
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  max-width: 65ch;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-credit img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

/* ---------- Scroll-reveal ---------- */
/* NOTE: view() timeline kept simple — elements fade in as they enter viewport.
   Default fill is none so elements are fully visible before/after animation range. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: fade-up linear;
      animation-timeline: view();
      animation-range: entry 0% entry 25%;
      animation-fill-mode: none; /* visible outside animation range */
    }
    @keyframes fade-up {
      from { opacity: 0.4; transform: translateY(0.75rem); }
      to   { opacity: 1;   transform: translateY(0); }
    }
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 48rem) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem;
  }

  .site-header .wrap {
    flex-wrap: wrap;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
  }

  /* Hero stacks photo-first */
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-photo {
    height: 55vw;
    min-height: 200px;
    max-height: 320px;
  }

  .hero-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
  }

  .hero-panel h1 {
    max-width: 100%;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }

  .ticket-stub {
    grid-template-columns: 1fr;
  }

  .ticket-stub-left {
    border-right: none;
    border-bottom: 2px dashed var(--border);
    padding: 0.75rem 1rem;
  }

  main {
    padding: 2.5rem 0 4rem;
  }

  .photo-break {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
  }

  .cta-band {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-num {
    font-size: clamp(4rem, 20vw, 7rem);
  }
}
