/* ==========================================================================
   Midnight Market — lantern-lit night market
   Visual direction #1 from the build brief: near-black indigo base, warm
   amber lantern glow, one acid accent, striped stall awnings, chunky
   vintage carnival display face for headings.
   All theme decisions live in the variables below — the seasonal shift
   (August warm → October full midnight) is a variable swap.
   ========================================================================== */

:root {
  /* base */
  --night: #12101f;          /* near-black indigo */
  --night-2: #1a1530;        /* raised panels */
  --night-3: #241c3f;        /* card panels */
  --ink: #f0e7d5;            /* warm parchment text */
  --ink-dim: #b1a68f;
  /* light sources */
  --amber: #ffb347;          /* lantern glow */
  --amber-deep: #e08b1d;
  --accent: #ff5a1f;         /* the one acid accent: blood orange */
  --accent-ink: #1a0d05;
  /* awning stripes */
  --stripe-a: #3a2b5e;
  --stripe-b: #191231;
  --radius: 10px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.6;
}

h1, h2, h3, .display {
  font-family: "Rye", "Alfa Slab One", "Georgia", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--amber);
  text-shadow: 0 0 24px rgba(255, 179, 71, 0.25);
}

a { color: var(--amber); }
img { max-width: 100%; }

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

/* --- striped awning divider between sections ------------------------------ */
.awning {
  height: 22px;
  background: repeating-linear-gradient(
    90deg,
    var(--stripe-a) 0 34px,
    var(--stripe-b) 34px 68px
  );
  /* scalloped hem */
  -webkit-mask:
    linear-gradient(#000 0 14px, transparent 14px),
    radial-gradient(circle at 17px 14px, #000 8px, transparent 8.5px);
  -webkit-mask-size: 100% 100%, 34px 22px;
  -webkit-mask-repeat: no-repeat, repeat-x;
  mask:
    linear-gradient(#000 0 14px, transparent 14px),
    radial-gradient(circle at 17px 14px, #000 8px, transparent 8.5px);
  mask-size: 100% 100%, 34px 22px;
  mask-repeat: no-repeat, repeat-x;
}

/* --- sticky bar ----------------------------------------------------------- */
.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.1rem;
  background: rgba(18, 16, 31, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 179, 71, 0.25);
}
.sticky-bar .brand {
  font-family: "Rye", serif;
  font-size: 1.05rem;
  color: var(--amber);
  text-decoration: none;
  white-space: nowrap;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255, 90, 31, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(255, 90, 31, 0.65); }
.btn.ghost {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber);
  box-shadow: none;
}
.btn.small { padding: 0.35rem 0.85rem; font-size: 0.88rem; }

/* --- hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 5.5rem 1.25rem 4.5rem;
  /* CSS fallback night sky — replaced visually if img/hero.jpg exists */
  background:
    radial-gradient(ellipse 60% 40% at 75% 18%, rgba(240, 235, 215, 0.12), transparent 60%),
    radial-gradient(ellipse 45% 30% at 20% 80%, rgba(255, 179, 71, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 75%, rgba(255, 90, 31, 0.10), transparent 60%),
    linear-gradient(180deg, #0d0b18 0%, #1a1530 55%, #2b1d45 100%);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}
.hero-veil {
  /* keeps text readable over the illustration */
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(13, 11, 24, 0.55) 0%, rgba(13, 11, 24, 0.25) 45%, rgba(18, 16, 31, 0.88) 100%);
}
.hero .wrap { position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  color: var(--amber);
  text-shadow:
    0 0 14px rgba(255, 179, 71, 0.55),
    0 0 60px rgba(255, 179, 71, 0.30);
  margin-bottom: 0.2em;
}
.hero .hook {
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  font-style: italic;
  color: var(--ink);
  margin: 0 0 0.4em;
}
.hero .dates {
  font-family: "Rye", serif;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4em;
}
.hero .cta-line { margin: 0 0 1.6em; }
.trust-line {
  font-size: 0.95rem;
  color: var(--ink-dim);
  font-style: italic;
  max-width: 34em;
  margin: 0 auto;
}

/* --- what this is --------------------------------------------------------- */
.what { text-align: center; }
.what p { max-width: 42em; margin: 0 auto; font-size: 1.12rem; }

/* --- market hours (timeline strip) ---------------------------------------- */
.timeline-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.timeline {
  position: relative;
  min-width: 640px;
  background: var(--night-2);
  border: 1px solid rgba(255, 179, 71, 0.18);
  border-radius: var(--radius);
  padding: 2.4rem 0 0.9rem;
}
.tl-months {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.9rem;
  border-bottom: 1px solid rgba(240, 231, 213, 0.12);
}
.tl-month {
  position: absolute;
  top: 0.35rem;
  font-family: "Rye", serif;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-left: 1px solid rgba(240, 231, 213, 0.12);
  padding-left: 0.5em;
  height: 100%;
}
.tl-row { position: relative; height: 30px; margin: 6px 12px; }
.tl-bar {
  position: absolute;
  top: 3px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 0.6em;
  font-size: 0.78rem;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-bar.live {
  background: linear-gradient(180deg, var(--amber), var(--amber-deep));
  color: #241500;
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.55);
  font-weight: 700;
}
.tl-bar.upcoming {
  background: #37295e;
  color: var(--ink);
  border: 1px dashed rgba(255, 179, 71, 0.45);
}
.tl-bar.closed { background: #26203a; color: var(--ink-dim); }
.tl-today {
  position: absolute;
  top: 1.9rem; bottom: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 90, 31, 0.8);
  z-index: 2;
}
.tl-today::after {
  content: "you are here";
  position: absolute;
  top: -1.35rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.tl-legend { font-size: 0.82rem; color: var(--ink-dim); margin-top: 0.6rem; }

/* --- the stalls (card grid) ------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--night-3);
  border: 1px solid rgba(240, 231, 213, 0.10);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-3px); }

.card .cover {
  position: relative;
  /* true 2:3 portrait — the group standardized on 600x900 covers */
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #37295e, #1a1530);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cover .placeholder {
  font-family: "Rye", serif;
  font-size: 1.05rem;
  color: var(--ink-dim);
  text-align: center;
  padding: 1rem;
}

.card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card h3 { font-size: 1.18rem; color: var(--ink); margin: 0; }
.card .creator { font-size: 0.9rem; color: var(--ink-dim); margin: 0; }
.card .genre {
  align-self: flex-start;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--ink-dim);
  color: var(--ink-dim);
}
.card .tagline { font-style: italic; font-size: 0.95rem; margin: 0; flex: 1; }
.card .status-line { font-size: 0.9rem; margin: 0; }
.card .cta { margin-top: 0.5rem; }

/* state: open now */
.card.live {
  border-color: var(--amber);
  box-shadow: 0 0 22px rgba(255, 179, 71, 0.28);
}
.card.live .status-line { color: var(--amber); font-weight: 700; }

/* state: opening soon */
.card.upcoming .cover img, .card.upcoming .cover { filter: saturate(0.45) brightness(0.85); }
.card.upcoming .status-line { color: var(--ink-dim); }

/* state: closed */
.card.closed { opacity: 0.85; }
.card.closed .cover img, .card.closed .cover { filter: saturate(0.15) brightness(0.6); }
.card.closed .status-line { color: var(--ink-dim); }

.badge-funded {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--amber);
  color: #241500;
  font-family: "Rye", serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  transform: rotate(4deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cross-sell {
  margin-top: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 179, 71, 0.10);
  border: 1px solid rgba(255, 179, 71, 0.35);
  border-radius: 6px;
  font-size: 0.88rem;
}
.cross-sell a { font-weight: 700; }

/* --- ring the bell --------------------------------------------------------- */
.bell { text-align: center; background: var(--night-2); }
.bell p { max-width: 40em; margin: 0 auto 1rem; }
.bell .soon {
  font-style: italic;
  color: var(--ink-dim);
}
.bell form { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.bell input[type="email"] {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--ink-dim);
  background: var(--night);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  min-width: 16em;
}

/* --- faq ------------------------------------------------------------------- */
.faq details {
  max-width: 46em;
  margin: 0 auto 0.7rem;
  background: var(--night-2);
  border: 1px solid rgba(240, 231, 213, 0.10);
  border-radius: 8px;
  padding: 0.7rem 1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--amber);
}
.faq details p { margin: 0.6rem 0 0.2rem; }

/* --- footer ---------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 2rem 1rem 2.6rem;
  color: var(--ink-dim);
  font-size: 0.88rem;
}
