/* ==========================================================================
   OutLoud Open Mike — styles.css
   Palette: walnut (evening ground), paper (reading surface),
   ember (poster-orange accent, darkened for text on paper),
   flame (poster orange, bright accent on walnut),
   indigo (poster's deep blue — masthead rail and footer).
   Depth strategy: warm hairline borders only — no drop shadows.
   ========================================================================== */

:root {
  --walnut: #261d15;
  --walnut-deep: #1e1610;
  --lamplight: #3a2b1c;
  --indigo: #1e3152;
  --line-rail: #3d5078;
  --paper: #f4ecdd;
  --paper-dim: #eae0cb;
  --ink: #2a2018;
  --ink-soft: #6c5949;
  --cream: #f2e8d5;
  --cream-soft: #d9cbb2;
  --ember: #9c4514;
  --ember-deep: #83380f;
  --flame: #fd761f;
  --line-paper: #c9b896;
  --line-dark: #4a3a28;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --rail-width: clamp(13.5rem, 21vw, 17.5rem);
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

.icon {
  display: inline-block;
  vertical-align: -0.08em;
  margin-right: 0.15rem;
}

a:hover {
  color: var(--ember-deep);
}

::selection {
  background: var(--ember);
  color: var(--cream);
}

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
}

.masthead :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--flame);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--flame);
  color: var(--walnut-deep);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

#main,
#dates,
#vibe,
#gallery,
#history,
#join {
  scroll-margin-top: 4.75rem;
}

/* --- Masthead rail (desktop) / top bar (mobile) --------------------------- */

.masthead {
  background: var(--indigo);
  color: var(--cream);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  color: var(--cream);
}

.masthead-venue {
  color: var(--cream-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.masthead-note {
  color: var(--cream-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.nav-toggle {
  font: inherit;
  font-weight: 700;
  background: transparent;
  color: var(--flame);
  border: 2px solid var(--flame);
  border-radius: 6px;
  padding: 0.4rem 1.1rem;
  min-height: 44px;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--flame);
  color: var(--walnut-deep);
}

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

@media (min-width: 1200px) {
  body {
    display: grid;
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
  }

  .masthead {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: start;
    overflow-y: auto;
  }

  main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .site-footer {
    grid-column: 2;
  }

  .masthead-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: clamp(1.5rem, 2.5vw, 2.5rem) clamp(1.25rem, 1.8vw, 2rem);
  }

  .wordmark {
    font-size: clamp(1.9rem, 2.9vw, 2.5rem);
  }

  .wordmark span {
    display: block;
  }

  .site-nav {
    border-top: 1px solid var(--line-rail);
    padding-top: 1rem;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-nav a {
    display: block;
    padding: 0.45rem 0;
    font-size: 1.05rem;
  }

  .site-nav a:hover {
    color: var(--flame);
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }

  .masthead-note {
    margin-top: auto;
    border-top: 1px solid var(--line-rail);
    padding-top: 1rem;
  }
}

@media (max-width: 1199px) {
  .masthead {
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .masthead-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.15rem;
    padding: 0.8rem 1.25rem;
  }

  .wordmark {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(1.05rem, 4.5vw, 1.45rem);
    line-height: 1.2;
    white-space: normal;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .masthead-venue {
    grid-column: 1;
    grid-row: 2;
    font-size: clamp(0.7rem, 2.8vw, 0.78rem);
    line-height: 1.35;
    min-width: 0;
  }

  .nav-toggle {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 0.4rem 0.8rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0.1rem;
    font-size: 1.1rem;
    border-top: 1px solid var(--line-rail);
  }

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

  .masthead-note {
    display: none;
  }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.5vh, 2rem);
  background: radial-gradient(1100px 620px at 78% 10%, var(--lamplight) 0%, var(--walnut) 62%);
  color: var(--cream);
  padding: clamp(1.75rem, 3.5vh, 3rem) max(var(--gutter), calc((100% - 82rem) / 2));
}

@media (min-width: 1200px) and (orientation: landscape) and (min-height: 480px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 18rem);
  object-fit: cover;
  object-position: 50% 40%;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.12;
}

.hero-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
}

.hero-intro {
  flex: 1 1 18rem;
  margin-top: 0;
  max-width: 34rem;
  color: var(--cream-soft);
  font-size: 1.1rem;
}

.hero-actions {
  margin-top: 0;
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

@media (max-width: 700px) {
  .hero-actions {
    margin-left: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-lamp {
  background: var(--flame);
  color: var(--walnut-deep);
}

.btn-lamp:hover {
  background: var(--cream);
  color: var(--walnut-deep);
}

.btn-ghost {
  border-color: var(--flame);
  color: var(--flame);
}

.btn-ghost:hover {
  background: var(--flame);
  color: var(--walnut-deep);
}

/* --- Badges ------------------------------------------------------------------- */

.badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
}

.badge-clay {
  background: var(--ember);
  color: var(--cream);
}

.badge-shift {
  border: 1.5px solid var(--ember);
  color: var(--ember);
}

/* --- Sections --------------------------------------------------------------- */

.section {
  border-top: 1px solid var(--line-paper);
  padding: clamp(2.75rem, 5.5vw, 4.25rem) max(var(--gutter), calc((100% - 82rem) / 2));
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.2rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
}

h2::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  background: var(--flame);
  border-radius: 2px;
  margin-top: 0.8rem;
}

.section-lede {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 58ch;
}

h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  margin-top: 2.2rem;
}

.prose p {
  max-width: 62ch;
  margin-top: 1rem;
}

/* --- Schedule ---------------------------------------------------------------- */

.schedule {
  border-top: none;
}

.date-row {
  display: grid;
  grid-template-columns: minmax(11rem, 14rem) 1fr;
  gap: 0.4rem 2.5rem;
  align-items: baseline;
  padding: 1.05rem 0.9rem;
  border-bottom: 1px solid var(--line-paper);
}

.date-row:last-child {
  border-bottom: none;
}

.date-dateline {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.2;
}

.date-meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 0.1rem;
}

.date-side {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
}

.date-note {
  color: var(--ink-soft);
  max-width: 48ch;
}

.date-row.is-past {
  opacity: 0.55;
}

.date-row.is-next {
  background: var(--paper-dim);
  box-shadow: inset 4px 0 0 var(--ember);
}

.date-row.is-next .date-dateline {
  color: var(--ember);
}

.date-gap {
  padding: 1.05rem 0.9rem;
  border-bottom: 1px solid var(--line-paper);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .date-row {
    grid-template-columns: 1fr;
  }
}

/* --- The vibe ----------------------------------------------------------------- */

.runorder {
  counter-reset: step;
  margin-top: 1.2rem;
  max-width: 60ch;
}

.runorder li {
  counter-increment: step;
  position: relative;
  padding: 0.6rem 0 0.6rem 3rem;
  border-bottom: 1px solid var(--line-paper);
}

.runorder li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ember);
  border: 1.5px solid var(--ember);
  border-radius: 999px;
}

.rules {
  margin-top: 1.2rem;
  max-width: 62ch;
}

.rules li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.4rem;
  border-bottom: 1px solid var(--line-paper);
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.15rem;
  width: 0.55rem;
  height: 2px;
  background: var(--ember);
}

/* --- Photos -------------------------------------------------------------------- */

.photo-spot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 24vw, 330px);
  gap: 1rem 3rem;
  align-items: start;
}

.photo-spot .section-head {
  margin-bottom: 1.25rem;
}

.photo-spot .photo-frame {
  aspect-ratio: 3 / 4;
}

.photo-spot.photo-left {
  grid-template-columns: clamp(240px, 24vw, 330px) minmax(0, 1fr);
}

.photo-spot.photo-left .photo {
  order: -1;
}

.photo-frame {
  background: var(--paper-dim);
  border: 1px solid var(--line-paper);
  padding: 0.55rem;
}

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

.photo-frame svg {
  width: 100%;
  height: 100%;
}

.photo figcaption {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

@media (max-width: 760px) {
  .photo-spot {
    grid-template-columns: 1fr;
  }

  .photo-spot .photo {
    max-width: 26rem;
  }
}

/* --- History ---------------------------------------------------------------------- */

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem 4rem;
  align-items: start;
}

.since {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-left: 3px solid var(--flame);
  padding-left: 1.4rem;
}

.since-year {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--ember);
}

.since-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Join in ------------------------------------------------------------------------ */

.join-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3.5rem;
}

.join-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 24vw, 330px);
  gap: 2rem 3rem;
  align-items: start;
}

.join-layout .section-head {
  margin-bottom: 1.25rem;
}

.join-paths {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.join-layout .photo-frame {
  aspect-ratio: 3 / 4;
}

.join-block h3 {
  margin-top: 0;
}

.join-block p {
  margin-top: 0.6rem;
}

@media (max-width: 760px) {
  .join-grid,
  .join-layout {
    grid-template-columns: 1fr;
  }

  .join-layout .photo {
    max-width: 26rem;
  }

  .photo-spot .photo {
    max-width: 26rem;
  }
}

.visit {
  padding-top: 0.25rem;
}

.visit h3 {
  margin-top: 0;
}

.visit p {
  margin-top: 0.6rem;
}

.visit-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: end;
}

.visit-art {
  width: clamp(160px, 26vw, 260px);
  height: auto;
  color: var(--ember);
  opacity: 0.85;
}

@media (max-width: 600px) {
  .visit-layout {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .visit-art {
    width: 150px;
  }
}

.photo-spot + .join-grid {
  margin-top: 2.5rem;
}

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

.site-footer {
  background: var(--walnut-deep);
  color: var(--cream-soft);
}

.footer-inner {
  padding: clamp(2.5rem, 5vw, 4rem) max(var(--gutter), calc((100% - 72rem) / 2));
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--cream);
}

.footer-line {
  margin-top: 0.5rem;
  max-width: 56ch;
}

.footer-nav {
  margin-top: 1.6rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}

.footer-nav a {
  color: var(--flame);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.footer-social {
  margin-top: 1.2rem;
}

.footer-social a {
  color: var(--flame);
  font-weight: 700;
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.footer-credit {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  max-width: 60ch;
  border-top: 1px solid var(--line-dark);
  padding-top: 1.4rem;
}
