/* =========================================================
   Agassiz Farm Fresh Market — Rustic farm-warm theme
   ========================================================= */

:root {
  /* Earthy palette */
  --cream:        #f7f1e3;
  --cream-deep:   #efe6d1;
  --paper:        #fbf7ec;
  --ink:          #2a2a26;
  --ink-soft:     #4a4a42;
  --muted:        #8c8678;

  /* Farm accents */
  --leaf:         #4f7942;   /* fern green */
  --leaf-deep:    #355a2a;
  --leaf-light:   #8aa872;
  --barn:         #a8412a;   /* faded barn red */
  --barn-deep:    #7e2f1f;
  --honey:        #d99748;   /* warm amber */
  --berry:        #b4423b;
  --sky:          #cfd6c1;

  /* Surfaces / borders */
  --border:       #d8cdb1;
  --border-soft:  #e7ddc1;
  --shadow-sm:    0 1px 2px rgba(60, 50, 30, 0.08);
  --shadow-md:    0 8px 24px rgba(60, 50, 30, 0.10);
  --shadow-lg:    0 18px 44px rgba(60, 50, 30, 0.14);

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-hand:    'Caveat Brush', 'Fraunces', cursive;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;

  --container:    1180px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(217, 151, 72, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(79, 121, 66, 0.08), transparent 60%),
    var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--leaf-deep); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--barn); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 .4em;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h2 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--barn);
  margin: 0 0 .5rem;
}
.eyebrow.center { text-align: center; }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-title { margin-bottom: .4rem; }
.center { text-align: center; }
.section-sub { color: var(--ink-soft); max-width: 60ch; margin: 0 auto 2.2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  text-align: center;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--leaf-deep);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--leaf); color: var(--cream); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--leaf-deep);
  border-color: var(--leaf-deep);
}
.btn-ghost:hover { background: var(--leaf-deep); color: var(--cream); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 241, 227, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
}
.brand-logo {
  width: 122px; height: 122px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream);
  border: 2px solid var(--cream-deep);
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line-1 {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--barn);
  letter-spacing: 0.05em;
}
.brand-line-2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  margin-top: .1rem;
}

.primary-nav { display: flex; align-items: center; gap: 0.35rem; }
.primary-nav a {
  position: relative;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.96rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease;
}

/* Subtle leaf-accent underline that grows from center on hover */
.primary-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--barn);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s ease;
  pointer-events: none;
}
.primary-nav a:not(.nav-cta):hover::after,
.primary-nav a:not(.nav-cta):focus-visible::after {
  width: 38%;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--leaf-deep);
  background-color: rgba(79, 121, 66, 0.10);
  box-shadow:
    0 0 0 1px rgba(79, 121, 66, 0.18),
    0 6px 18px -4px rgba(79, 121, 66, 0.28);
  transform: translateY(-1px);
  outline: none;
}
.primary-nav a:active { transform: translateY(0); }

.primary-nav .nav-cta {
  background-color: var(--barn);
  color: var(--cream);
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 3px 10px -2px rgba(168, 65, 42, 0.35);
}
.primary-nav .nav-cta:hover,
.primary-nav .nav-cta:focus-visible {
  background-color: var(--barn-deep);
  color: var(--cream);
  box-shadow:
    0 0 0 1px rgba(168, 65, 42, 0.45),
    0 12px 26px -4px rgba(168, 65, 42, 0.55);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(540px, 86vh, 760px);
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('Media/Header picture.jpg');
  background-size: cover;
  /* Shift the image right so the original promo text on the left is cropped
     off-screen and the chalkboard/sunflower composition is what shows. */
  background-position: 78% center;
  filter: saturate(1.05);
  z-index: -2;
}
.hero-veil {
  position: absolute; inset: 0;
  /* Layered gradients:
       1) Heavy darkening from the left fading to mostly clear on the right,
          so our text reads cleanly without competing with the photo content.
       2) A gentle top-and-bottom vignette for depth. */
  background:
    linear-gradient(90deg,
      rgba(20, 30, 18, 0.85) 0%,
      rgba(20, 30, 18, 0.60) 38%,
      rgba(20, 30, 18, 0.20) 70%,
      rgba(20, 30, 18, 0.05) 100%),
    linear-gradient(180deg,
      rgba(20, 30, 18, 0.35) 0%,
      rgba(20, 30, 18, 0.10) 35%,
      rgba(20, 30, 18, 0.45) 100%);
  z-index: -1;
}

/* On narrower screens the hero image gets cramped — pull it more to the
   right so the chalkboard remains the focal point and the overlay reads. */
@media (max-width: 820px) {
  .hero-bg { background-position: 70% center; }
  .hero-veil {
    background:
      linear-gradient(180deg,
        rgba(20, 30, 18, 0.65) 0%,
        rgba(20, 30, 18, 0.45) 45%,
        rgba(20, 30, 18, 0.70) 100%);
  }
}

.hero-inner {
  color: var(--cream);
  padding: 4rem 0;
  max-width: 760px;
}
.hero-eyebrow {
  font-family: var(--font-hand);
  letter-spacing: 0.08em;
  color: var(--honey);
  font-size: 1.4rem;
  margin: 0 0 .4rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--cream);
  margin: 0 0 1rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero-title em {
  font-style: italic;
  color: var(--honey);
  font-weight: 700;
}
.hero-date {
  display: inline-block;
  color: var(--leaf-light);
  font-weight: 900;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(247, 241, 227, 0.92);
  max-width: 56ch;
  margin: 0 0 1.6rem;
}
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-actions .btn-ghost { color: var(--cream); border-color: var(--cream); }
.hero-actions .btn-ghost:hover { background: var(--cream); color: var(--ink); }

.hero-facts {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.hero-facts li {
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--honey);
  padding-left: .9rem;
}
.fact-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  color: var(--cream);
  line-height: 1;
}
.fact-label {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(247, 241, 227, 0.85);
  margin-top: .25rem;
}

/* ---------- Two-column generic ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.two-col.reverse .col-image { order: -1; }

.frame {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transform: rotate(-0.5deg);
}
.frame img { aspect-ratio: 4/5; object-fit: cover; width: 100%; height: 100%; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: .6rem;
}
.checklist li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.25rem; height: 1.25rem;
  background: var(--leaf);
  color: var(--cream);
  border-radius: 50%;
  font-size: .75rem;
  display: grid; place-items: center;
  font-weight: 700;
}

/* ---------- About ---------- */
.about { background: var(--paper); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

/* ---------- Calendar ---------- */
.calendar-section { background: var(--cream); position: relative; }
.calendar-section::before, .calendar-section::after {
  content: "";
  display: block;
  height: 14px;
  background: repeating-linear-gradient(
    45deg,
    var(--leaf-deep) 0 12px,
    var(--leaf) 12px 24px
  );
  opacity: .14;
  margin-bottom: 2.5rem;
}
.calendar-section::after { margin: 2.5rem 0 0; }

.calendar-wrap {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2vw, 1.6rem);
  box-shadow: var(--shadow-md);
  max-width: 760px;
  margin: 0 auto;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cal-btn {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--ink);
  transition: background .15s, transform .1s;
}
.cal-btn:hover { background: var(--leaf-light); color: var(--cream); }
.cal-btn:active { transform: scale(0.96); }
.cal-month {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
  text-align: center;
  flex: 1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-dow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: .4rem 0;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid transparent;
  position: relative;
  transition: transform .12s, box-shadow .12s, background .15s;
}
.cal-day.empty { background: transparent; }
.cal-day.market {
  background: var(--leaf-deep);
  color: var(--cream);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.cal-day.market:hover { background: var(--leaf); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cal-day.market::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--honey);
}
.cal-day.today {
  outline: 2px solid var(--barn);
  outline-offset: 2px;
}

.calendar-legend {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: .4rem;
  vertical-align: middle;
}
.dot-market { background: var(--leaf-deep); }
.dot-today { background: transparent; border: 2px solid var(--barn); }

.event-strip { margin-top: 3rem; }
.event-strip-title {
  text-align: center;
  font-family: var(--font-display);
  margin-bottom: 1.2rem;
}
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .6rem;
}
.event-list li {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  text-align: center;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.event-list li.past { opacity: .55; }
.event-list li.next {
  border-color: var(--barn);
  background: linear-gradient(180deg, var(--paper), #fff3df);
  position: relative;
}
.event-list li.next::before {
  content: "Next up";
  position: absolute;
  top: -0.65rem; left: 50%;
  transform: translateX(-50%);
  background: var(--barn);
  color: var(--cream);
  font-size: .65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.event-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.event-dow {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--barn);
  font-weight: 600;
}
.event-date {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--ink);
  margin-top: .15rem;
}
.event-time {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  margin-top: .2rem;
}

/* ---------- Vendors ---------- */
.vendors-section { background: var(--paper); border-top: 1px solid var(--border-soft); }
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.vendor-card {
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.vendor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--leaf-light);
}
.vendor-icon {
  font-size: 2rem;
  margin-bottom: .4rem;
}
.vendor-card h3 { font-family: var(--font-display); margin-bottom: .3rem; }
.vendor-card p { color: var(--ink-soft); margin: 0; font-size: .96rem; }

/* ---------- Gallery ---------- */
.gallery-section { background: var(--cream); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 1.5rem;
}
.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-sm);
}
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.gallery-grid figure:hover img { transform: scale(1.06); }

/* ---------- Apply ---------- */
.apply-section { background: var(--paper); border-top: 1px solid var(--border-soft); }
.apply-cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.2rem 0 .4rem; }

/* ---------- Vendor application form ---------- */
.apply-header { margin-bottom: 2rem; }

.vendor-form {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-md);
  max-width: 880px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.2rem; }
.field:last-child { margin-bottom: 0; }
.field-other { margin-top: 1rem; }

.field-label {
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.field-hint {
  font-weight: 400;
  font-size: .82rem;
  color: var(--muted);
  margin-left: .3rem;
}
.req { color: var(--barn); font-weight: 700; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field-group input[type="text"] {
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}
.field input:focus,
.field textarea:focus,
.field-group input:focus {
  outline: none;
  border-color: var(--leaf);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 121, 66, 0.18);
}
.field input:invalid:not(:placeholder-shown):not(:focus),
.field textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--barn);
}

.field textarea { resize: vertical; min-height: 90px; }

.field-group {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  margin: 0 0 1.2rem;
}
.field-group legend {
  padding: 0 .4rem;
  margin-left: -.4rem;
}

.check-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .5rem .8rem;
  margin-top: .7rem;
}
.check {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .95rem;
  transition: background .12s, border-color .12s;
}
.check:hover { background: #fff; border-color: var(--leaf-light); }
.check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--leaf-deep);
  flex-shrink: 0;
  cursor: pointer;
}
.check input[type="checkbox"]:checked + span { font-weight: 600; color: var(--leaf-deep); }
.check:has(input:checked) { background: #fff; border-color: var(--leaf); box-shadow: var(--shadow-sm); }

.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
  margin-top: .7rem;
}
.date-grid .check { text-align: left; }
.date-grid .check span { display: flex; flex-direction: column; line-height: 1.2; }
.date-grid .check .d-dow {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--barn);
  font-weight: 600;
}
.date-grid .check .d-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-top: 1px;
}

.form-note {
  font-size: .85rem;
  color: var(--ink-soft);
  margin: .8rem 0 0;
  font-style: italic;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.form-privacy {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

.form-status {
  margin-top: 1rem;
  padding: 0;
  border-radius: var(--radius);
  font-size: .95rem;
  min-height: 0;
  overflow: hidden;
  transition: padding .15s, min-height .15s;
}
.form-status.show { padding: 1rem 1.1rem; min-height: auto; }
.form-status.success {
  background: #e8f0d8;
  border: 1px solid var(--leaf-light);
  color: var(--leaf-deep);
}
.form-status.error {
  background: #fbe8e3;
  border: 1px solid #e0a99a;
  color: var(--barn-deep);
}
.form-status.loading {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}

.btn[disabled], .btn.loading {
  opacity: 0.9;
  cursor: not-allowed;
  pointer-events: none;
}

/* Inline spinner — pure CSS, no images. Inherits `currentColor` so it
   automatically matches whatever text color it sits next to. */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -0.18em;
  margin-right: 0.5em;
  flex-shrink: 0;
}
.spinner.spinner-sm { width: 0.85em; height: 0.85em; border-width: 2px; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}

.form-status.loading {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

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

/* ---------- Contact ---------- */
.contact-section { background: var(--cream); }
.contact-form-wrap { margin-top: clamp(2.5rem, 5vw, 4rem); }
.contact-form textarea { min-height: 130px; }
.contact-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
}
.contact-card > div:first-child { padding: clamp(1.5rem, 3vw, 2.4rem); }
.contact-line { margin: .35rem 0; color: var(--ink-soft); }
.contact-line strong { color: var(--ink); }
.map-wrap { min-height: 320px; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Vendor Portal ---------- */
.portal { padding: clamp(2rem, 5vw, 4rem) 0; min-height: 60vh; }
.portal-state {}
.portal-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  box-shadow: var(--shadow-md);
  max-width: 820px;
  margin: 0 auto;
}
.portal-card.center { text-align: center; }
.portal-card h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 .4rem;
}
.portal-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 .3rem;
  color: var(--leaf-deep);
}
.portal-lead {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 1.4rem;
}
.portal-loading-text {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}
.portal-section { margin: 1.6rem 0; }
.portal-section .date-grid { margin-top: .9rem; }
.portal-help {
  color: var(--ink-soft);
  font-size: .92rem;
  margin: 0 0 .4rem;
}
.portal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.3rem;
}
.portal-divider {
  border: 0;
  border-top: 1px dashed var(--border);
  margin: 2.2rem 0 1.4rem;
}
.portal-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.4rem;
  row-gap: .55rem;
  margin: .8rem 0 0;
}
.portal-info dt {
  font-weight: 600;
  color: var(--ink);
  font-size: .92rem;
}
.portal-info dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: .96rem;
}

/* Past date treatment */
.date-grid .check.check-past {
  background: rgba(216, 205, 177, 0.35);
  border-style: dashed;
  border-color: var(--border-soft);
  cursor: not-allowed;
}
.date-grid .check.check-past:hover { background: rgba(216, 205, 177, 0.35); }
.date-grid .check.check-past input[type="checkbox"] {
  cursor: not-allowed;
}
.date-grid .check.check-past .d-date { color: var(--muted); }
.date-grid .check.check-past .d-dow  { color: var(--muted); }

.d-tag {
  display: inline-block;
  margin-top: .25rem;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: .12rem .42rem;
  border-radius: 999px;
}
.d-tag-past {
  background: var(--leaf-deep);
  color: var(--cream);
}
.d-tag-past-muted {
  background: var(--border-soft);
  color: var(--muted);
}

/* Larger spinner for full-page loading */
.spinner.spinner-lg {
  width: 2.6em; height: 2.6em;
  border-width: 3px;
  margin: .5em auto;
  display: inline-block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--leaf-deep);
  color: var(--cream);
  padding: 2.2rem 0;
  margin-top: 1rem;
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem 2rem;
}
.footer-brand { display: flex; align-items: center; gap: .9rem; justify-self: start; }
.footer-logo {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--cream);
  padding: 2px;
  object-fit: cover;
}
.footer-copy { margin: 0; font-size: .9rem; color: rgba(247, 241, 227, 0.85); text-align: center; }
.muted { color: rgba(247, 241, 227, 0.7); font-size: .92rem; }

.footer-dev {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  justify-self: end;
  color: rgba(247, 241, 227, 0.7);
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .15s, opacity .15s;
}
.footer-dev:hover { color: var(--cream); opacity: 1; }
.footer-dev-label {
  font-weight: 500;
  white-space: nowrap;
}
.footer-dev img {
  width: 90px; height: 90px;
  opacity: 0.85;
  transition: opacity .15s;
}
.footer-dev:hover img { opacity: 1; }

@media (max-width: 760px) {
  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.4rem;
  }
  .footer-brand,
  .footer-dev { justify-self: center; }
  .footer-copy { text-align: center; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col.reverse .col-image { order: 0; }
  .contact-card { grid-template-columns: 1fr; }
  .map-wrap { min-height: 280px; }

  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, transform .15s;
  }
  .primary-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .primary-nav a {
    padding: .9rem 1.2rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-soft);
    transform: none;
  }
  .primary-nav a:hover,
  .primary-nav a:focus-visible {
    background-color: rgba(79, 121, 66, 0.08);
    box-shadow: none;
    transform: none;
  }
  .primary-nav a:not(.nav-cta)::after { display: none; }
  .primary-nav .nav-cta {
    border-radius: 0;
    text-align: center;
    padding: 1rem;
    box-shadow: none;
  }
  .primary-nav .nav-cta:hover,
  .primary-nav .nav-cta:focus-visible {
    box-shadow: none;
    transform: none;
  }

  .hero-facts { gap: 1.2rem; }
}

@media (max-width: 480px) {
  .brand-line-2 { font-size: 0.95rem; }
  .brand-logo { width: 104px; height: 104px; }
  .fact-num { font-size: 1.6rem; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
