/* ============================================
   The Bread Market — Design Tokens
   ============================================ */
:root {
  --espresso: #2a170f;
  --espresso-2: #402617;
  --espresso-3: #190d07;
  --burnt-orange: #c1521c;
  --burnt-orange-light: #e07a3f;
  --terracotta: #c98764;
  --cream: #f4e9d8;
  --cream-dim: #cbb89e;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Manrope', sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 50px; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--espresso);
  color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; }
p { margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

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

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

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 24px;
  background: rgba(21, 11, 6, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(244, 233, 216, 0.08);
}
.nav__logo {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600;
  letter-spacing: 0.01em; text-decoration: none; color: var(--cream);
  display: inline-flex; align-items: center;
  /* Centered independent of whatever sits left/right in the bar — .nav is
     already position:sticky, which establishes the containing block this
     needs, so no extra positioning context required on the parent. */
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.nav__logo-img { height: 24px; width: auto; display: block; border-radius: 4px; }
.nav__links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; font-size: 0.92rem; color: var(--cream-dim);
  transition: color 0.2s ease;
}
.nav__links a:hover, .nav__links a:focus-visible { color: var(--burnt-orange-light); }
.nav__actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* Hamburger toggle button — hidden on desktop, shown under 700px */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  width: 22px; height: 22px; padding: 0; background: transparent;
  border: none; cursor: pointer; flex-shrink: 0;
}
.nav-toggle__line {
  display: block; width: 100%; height: 2px; border-radius: 2px;
  background: var(--cream); transition: transform 0.25s ease, opacity 0.2s ease;
}
/* Spacing between the three lines uses margin, NOT flexbox "gap" —
   gap on this element collapsed the lines together in earlier testing. */
.nav-toggle__line + .nav-toggle__line { margin-top: 6px; }

.nav-toggle.is-active .nav-toggle__line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle__line:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle__line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 920px) {
  /* Raised from 700px: with the logo now centered, the inline links need
     to clear out of the way earlier or they'd overlap it. */
  .nav-toggle { display: flex; }

  .nav__links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(21, 11, 6, 0.97); backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(244, 233, 216, 0.08);
    padding: 6px 24px 18px;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block; padding: 14px 0;
    border-bottom: 1px solid rgba(244, 233, 216, 0.08);
  }
  .nav__links li:last-child a { border-bottom: none; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  padding: 15px 32px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity .2s ease;
}
.btn--primary { background: var(--burnt-orange); color: var(--cream); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--burnt-orange-light); transform: translateY(-2px); }
.btn--outline { border-color: rgba(244,233,216,0.4); color: var(--cream); background: transparent; }
.btn--outline:hover, .btn--outline:focus-visible { border-color: var(--cream); }
.btn--small { padding: 5px 14px; font-size: 0.72rem; }
.btn--block { width: 100%; }

/* ============ Statement line (bold uppercase accent, reused in hero + districts) ============ */
.statement-line {
  display: block; font-family: var(--font-body); text-transform: uppercase;
  font-weight: 800; letter-spacing: 0.04em; color: var(--burnt-orange-light);
}

/* ============ Hero ============ */
.hero {
  min-height: 90vh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px 24px 96px; text-align: center; position: relative; overflow: hidden;
}
.hero h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-style: italic;
  max-width: 32ch; margin: 0 auto 22px;
}
.hero__statement { margin: 0 auto 24px; font-size: clamp(0.95rem, 1.6vw, 1.15rem); }
.hero__tagline {
  font-size: 1.15rem; color: var(--cream-dim); max-width: 58ch;
  margin: 0 auto 40px;
}
.hero__ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.countdown { display: flex; gap: 22px; justify-content: center; margin-bottom: 42px; }
.countdown__item { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.countdown__num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--cream); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--terracotta); margin-top: 6px; }
.countdown__live { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--burnt-orange-light); }
@media (max-width: 480px) { .countdown { gap: 14px; } .countdown__item { min-width: 50px; } }

.photo-placeholder {
  aspect-ratio: 4 / 3; border-radius: 16px; border: 1px dashed rgba(244,233,216,0.3);
  background: repeating-linear-gradient(135deg, rgba(244,233,216,0.03) 0px, rgba(244,233,216,0.03) 10px, transparent 10px, transparent 20px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  color: var(--cream-dim); text-align: center; padding: 24px;
}
.photo-placeholder svg { width: 30px; height: 30px; opacity: 0.6; }
.photo-placeholder span { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; }
.district-photo { aspect-ratio: 4 / 3; border-radius: 16px; width: 100%; height: auto; object-fit: cover; display: block; }

/* ============ Torn divider (signature element) ============ */
.torn { line-height: 0; margin-top: -1px; }
.torn svg { width: 100%; height: 34px; display: block; }
.fill-espresso { fill: var(--espresso); }
.fill-espresso-2 { fill: var(--espresso-2); }
.fill-espresso-3 { fill: var(--espresso-3); }

/* ============ Sections ============ */
.section { padding: 104px 24px; }
.section--tight { padding: 84px 24px; }
.bg-1 { background: var(--espresso); }
.bg-2 { background: var(--espresso-2); }
.bg-3 { background: var(--espresso-3); }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.7rem;
  color: var(--terracotta); font-weight: 700; margin-bottom: 18px; display: block;
}
.section h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); font-style: italic; margin-bottom: 22px; }
.section p.lede { font-size: 1.05rem; color: var(--cream-dim); max-width: 62ch; }

/* Details */
.details__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
@media (max-width: 800px) { .details__grid { grid-template-columns: 1fr; gap: 40px; } }
.details__statement { font-size: clamp(1.6rem, 3vw, 2.1rem); font-style: italic; color: var(--cream); }
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid rgba(244,233,216,0.14);
}
.detail-list li:first-child { padding-top: 0; }
.detail-list .label { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--terracotta); font-weight: 700; padding-top: 4px; }
.detail-list .value { font-family: var(--font-display); font-size: 1.5rem; text-align: right; }
.detail-list .value small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--cream-dim); margin-top: 4px; font-style: normal; }
.map-link { display: inline-block; margin-top: 24px; font-size: 0.9rem; color: var(--burnt-orange-light); text-decoration: underline; text-underline-offset: 4px; }

/* Districts */
.districts-list { display: flex; flex-direction: column; gap: 52px; }
.district-block {
  display: flex; flex-direction: column; gap: 26px;
  max-width: 640px; margin: 0 auto;
  padding-top: 44px; border-top: 1px solid rgba(244,233,216,0.14);
}
.district-block:first-child { padding-top: 0; border-top: none; }
.district-block h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-style: italic; margin-bottom: 12px; }
.district-block .statement-line { font-size: 0.92rem; margin-bottom: 14px; }
.district-block .photo-placeholder { aspect-ratio: 4 / 3; }

/* Why come? */
.why-come-list { display: flex; flex-direction: column; gap: 10px; align-items: center; margin: 36px 0 40px; }
.why-come-list p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--cream); margin: 0; }
.why-come-close { font-size: 1.05rem; color: var(--cream-dim); max-width: 46ch; margin: 8px auto 0; }

/* Legal / privacy page */
.legal-block { margin-top: 44px; }
.legal-block:first-child { margin-top: 0; }
.legal-block h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-style: italic;
  margin-bottom: 10px;
}

/* Vendor teaser */
.vendor-teaser__inner { text-align: center; max-width: 640px; margin: 0 auto; }
.vendor-teaser__inner p.lede { margin: 0 auto 36px; }

/* Footer */
footer.site-footer { padding: 72px 24px 40px; }
.footer__grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 48px; }
.footer__brand { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; max-width: 22ch; }
.footer__contact { display: flex; flex-direction: column; gap: 10px; }
.footer__contact a { text-decoration: none; color: var(--cream-dim); font-size: 0.95rem; transition: color .2s ease; }
.footer__contact a:hover { color: var(--terracotta); }
.footer__bottom { border-top: 1px solid rgba(244,233,216,0.12); padding-top: 24px; font-size: 0.8rem; color: var(--cream-dim); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ============ Vendor application form ============ */
.vendor-hero { padding: 150px 24px 64px; text-align: center; }
.vendor-hero .eyebrow { text-align: center; }
.vendor-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-style: italic; max-width: 18ch; margin: 0 auto 20px; }
.vendor-hero p.lede { margin: 0 auto; }

.form-section { padding: 0 24px 120px; }
.form { display: flex; flex-direction: column; gap: 24px; max-width: 640px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.field label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terracotta); font-weight: 700; }
.field .hint { font-size: 0.78rem; color: var(--cream-dim); font-weight: 400; text-transform: none; letter-spacing: 0; margin-top: 2px; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 15px 16px; border-radius: 10px;
  border: 1px solid rgba(244,233,216,0.25); background: rgba(244,233,216,0.06); color: var(--cream);
  width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(244,233,216,0.38); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--terracotta); outline-offset: 2px; border-color: transparent;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23cbb89e' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field select option {
  /* The closed select inherits the page's dark theme fine, but the opened
     options list is rendered by the browser with its own default (usually
     white) background — without this, the light cream text became nearly
     invisible against it. */
  background: var(--espresso); color: var(--cream);
}
.form__note { font-size: 0.84rem; color: var(--cream-dim); text-align: left; }
.form__error { color: var(--burnt-orange-light); font-size: 0.85rem; min-height: 1.2em; margin: 0; }
.form__submit { margin-top: 8px; }

.form-group-title {
  font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--cream);
  margin: 12px 0 -6px; padding-top: 28px; border-top: 1px solid rgba(244,233,216,0.14);
}
.form-group-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.criteria-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 32px;
  margin: 20px 0 28px; padding: 0; list-style: none;
}
.criteria-grid li { padding-left: 24px; position: relative; color: var(--cream-dim); font-size: 0.95rem; }
.criteria-grid li::before { content: '\2014'; position: absolute; left: 0; color: var(--terracotta); }
@media (max-width: 600px) { .criteria-grid { grid-template-columns: 1fr; } }

.selection-note { font-size: 0.88rem; color: var(--cream-dim); font-style: italic; padding-top: 4px; }

.expectations-card {
  border: 1px solid rgba(244,233,216,0.16); border-radius: 14px; padding: 28px;
  background: rgba(244,233,216,0.04);
}
.expectations-card ul { margin: 14px 0 0; padding-left: 20px; color: var(--cream-dim); display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }

.terms-box {
  max-height: 320px; overflow-y: auto; border: 1px solid rgba(244,233,216,0.18);
  border-radius: 12px; padding: 22px 24px; background: rgba(0,0,0,0.15);
  display: flex; flex-direction: column; gap: 16px;
}
.terms-box h4 { font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terracotta); font-weight: 700; }
.terms-box p { font-size: 0.87rem; color: var(--cream-dim); line-height: 1.6; margin-top: 6px; }

.checkbox-field { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
.checkbox-field input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--terracotta); flex-shrink: 0; }
.checkbox-field label { font-size: 0.9rem; color: var(--cream); text-transform: none; letter-spacing: 0; font-weight: 400; }

.field input[type="file"] {
  padding: 12px 14px; background: rgba(244,233,216,0.06); border: 1px dashed rgba(244,233,216,0.3);
  border-radius: 10px; color: var(--cream-dim); font-size: 0.86rem;
}
#upload-status { font-size: 0.82rem; color: var(--terracotta); min-height: 1.2em; margin-top: 4px; }

.form__success { display: none; text-align: center; padding: 40px 24px; border: 1px dashed rgba(244,233,216,0.3); border-radius: 16px; }
.form__success.is-visible { display: block; }
.form.is-hidden { display: none; }

/* ============ Social / contact icon row (details page — Task 9) ============ */
.social-icons { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 8px; }
.social-icons__link {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--cream); font-size: 0.92rem; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; border: 1px solid rgba(244,233,216,0.25);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-icons__link:hover, .social-icons__link:focus-visible { border-color: var(--terracotta); color: var(--terracotta); }
.social-icons__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--cream);
  color: var(--espresso); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em;
  flex-shrink: 0; overflow: hidden; padding: 6px;
}
.social-icons__icon img { width: 100%; height: 100%; object-fit: contain; }

/* ============ Ticket tier cards (tickets.html — Task 10) ============ */
.ticket-grid {
  display: flex; flex-direction: column; gap: 36px;
  max-width: 480px; margin: 8px auto 0;
}
.ticket-card {
  background: var(--cream); color: var(--espresso);
  border-radius: 22px; padding: 40px 32px;
  box-shadow: 0 20px 44px rgba(0,0,0,0.28);
  border-top: 6px solid var(--burnt-orange);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.ticket-card--vip { border-top-color: var(--terracotta); }
.ticket-card h3 { color: var(--espresso); font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-style: italic; margin-bottom: 10px; }
.ticket-card > p.lede { color: #5c4634; margin-bottom: 0; }
.ticket-card .includes-label {
  color: var(--burnt-orange); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.72rem; font-weight: 800; margin: 28px 0 14px; align-self: flex-start;
}
.ticket-card--vip .includes-label { color: var(--terracotta); }
.ticket-card ul {
  list-style: none; margin: 0 0 32px; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
  align-self: stretch; text-align: left;
}
.ticket-card ul li { padding-left: 26px; position: relative; color: #4a382c; font-size: 0.95rem; }
.ticket-card ul li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 10px; height: 10px; border-radius: 3px; background: var(--burnt-orange);
}
.ticket-card--vip ul li::before { background: var(--terracotta); }
.ticket-card .btn { margin-top: auto; width: 100%; }

/* ============ Motion ============ */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, a { transition: none; }
}
