/* =========================================================
   Tiffany's Marketplace - styles
   Mobile-first. Colors are tokens; dark mode redefines them.
   Body text is 18px minimum; tap targets are at least 44-48px.
   ========================================================= */

/* Brand colors come from Tiffany's logo (her pick, Oct 29):
   soft aqua (#adf5f1) and dark brown ink (#4c3225), for a vintage feel. */
:root {
  --bg: #f7fbfa;
  --surface: #ffffff;
  --surface-2: #e6f4f1;
  --text: #2a1b12;
  --muted: #5a4638;
  --border: #c7d8d3;
  --brand: #4c3225;        /* brown ink: links, primary buttons */
  --brand-ink: #ffffff;
  --accent: #7a4a2e;       /* text-safe warm brown for small labels */
  --cyan: #adf5f1;         /* exact logo background (soft aqua) */
  --cyan-ink: #3a2519;
  --ink: #4c3225;          /* same in both themes, for buttons on aqua */
  --on-ink: #ffffff;
  --footer-bg: #3a2519;
  --footer-ink: #f3efe9;
  --brand-hover: #6e4a36;  /* primary button on hover */
  --shadow-lift: 0 14px 30px rgba(58, 37, 25, 0.18);
  --open-bg: #1d6b3a;
  --open-ink: #ffffff;
  --closed-bg: #8a2a1c;
  --closed-ink: #ffffff;
  --ask-bg: #fff1a8;       /* draft-only highlight for [ASK TIFFANY] */
  --ask-ink: #3d3200;
  --focus: #0b5cad;
  --radius: 14px;
  --maxw: 72rem;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
  /* Motion curves: one house "ease out" and a gentle spring with a small overshoot */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shimmer: rgba(255, 255, 255, 0.55); /* loading-placeholder sheen */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --surface: #211a15;
    --surface-2: #2b231c;
    --text: #f3ece5;
    --muted: #cdbfb3;
    --border: #4d3f34;
    --brand: #adf5f1;
    --brand-ink: #2a1b12;
    --accent: #e3c2a6;
    --footer-bg: #100c09;
    --brand-hover: #d6fbf8;
    --shadow-lift: 0 14px 30px rgba(0, 0, 0, 0.5);
    --open-bg: #8fd0ae;
    --open-ink: #0d1f16;
    --closed-bg: #f5a3a3;
    --closed-ink: #2a0707;
    --focus: #9cc2ff;
    --shimmer: rgba(255, 255, 255, 0.07);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.65 var(--font-body);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; } /* "hidden" always wins over grid/flex layouts */
a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.1rem, 1.25rem + 4.2vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 2vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.4rem); }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 0.5rem + 2vw, 1.5rem); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--surface); color: var(--text); padding: 0.75rem 1rem;
  border: 3px solid var(--focus); border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Draft-only marker for missing info. Search for "ASK TIFFANY" before launch. */
.ask { background: var(--ask-bg); color: var(--ask-ink); padding: 0 0.3rem; border-radius: 4px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.3rem; border-radius: 999px;
  font: 700 1.125rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-accent { background: var(--cyan); color: var(--cyan-ink); border-color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-outline { background: transparent; color: var(--text); border-color: currentColor; }
.btn:hover { filter: brightness(1.08); }
.btn-small { min-height: 44px; padding: 0.45rem 1rem; font-size: 1.0625rem; }

/* ---------- Announcement bar ---------- */
.announcement {
  background: var(--cyan); color: var(--cyan-ink); border-bottom: 2px solid var(--ink);
  text-align: center; padding: 0.6rem 1rem; font-weight: 700;
}
.announcement[hidden] { display: none; }

/* ---------- Header (sticky) + nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 4.25rem; }
.brand {
  display: flex; align-items: center; gap: 0.6rem; min-width: 0;
  text-decoration: none; color: var(--text);
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.15;
}
.brand img { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 10px; border: 1px solid var(--border); }
.btn-directions { flex: none; padding: 0.55rem 1.1rem; }

.site-nav { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.site-nav ul { list-style: none; margin: 0; padding: 0.15rem 0; display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.15rem;
  color: var(--text); font-weight: 700;
}
.site-nav a[aria-current="page"] { text-decoration-thickness: 3px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--cyan); color: var(--cyan-ink); overflow: hidden; }
.hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.hero-logo { width: 100%; max-width: 15rem; margin: 0 auto; order: -1; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-photo { color: #fff; }
.hero.has-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.65));
}
.hero-content { position: relative; z-index: 1; padding-block: clamp(2rem, 1rem + 3vw, 3.5rem) clamp(3rem, 2.4rem + 2vw, 4rem); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: 1rem; margin-bottom: 0.5rem; }
.hero .lead { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem); max-width: 40rem; }
.status-card {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  background: #ffffff; color: #2a1b12; border: 2px solid var(--ink);
  padding: 0.75rem 1rem; border-radius: var(--radius); margin: 0.5rem 0 1.5rem;
}
.badge { display: inline-block; padding: 0.15rem 0.75rem; border-radius: 999px; font-weight: 800; }
.badge-open { background: var(--open-bg); color: var(--open-ink); }
.badge-closed { background: var(--closed-bg); color: var(--closed-ink); }
.badge-unknown { background: var(--surface-2); color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .btn-outline { color: var(--cyan-ink); }

.page-hero { background: var(--cyan); color: var(--cyan-ink); }
.page-hero .container { padding-block: clamp(2.5rem, 1.8rem + 2.5vw, 3.5rem); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 2.6rem + 3vw, 4.5rem) 0; }
.section-alt { background: var(--surface-2); }
.section-intro { color: var(--muted); max-width: 44rem; }
.section-cta { margin-top: 1.75rem; }

.tiles { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.tile-icon { font-size: 2rem; line-height: 1; }
.tile h3 { margin: 0.6rem 0 0.3rem; }
.tile p { margin: 0; color: var(--muted); }
.tile p + p { margin-top: 0.5rem; }

/* ---------- Events ---------- */
.event-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem;
}
.event-date {
  background: var(--brand); color: var(--brand-ink); border-radius: 10px;
  text-align: center; padding: 0.5rem 0.6rem; min-width: 4.5rem; font-weight: 800; line-height: 1.1;
}
.event-date .m { display: block; font-size: 1rem; text-transform: uppercase; }
.event-date .d { display: block; font-size: 1.9rem; }
.event h3 { margin: 0 0 0.25rem; }
.event-meta { color: var(--muted); font-weight: 600; margin: 0 0 0.5rem; }
.event p:last-of-type { margin-bottom: 0; }
.cal-label { margin: 0.85rem 0 0.4rem; font-weight: 700; }
.cal-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.empty {
  background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; margin-top: 1.5rem;
}
.empty p:last-child { margin-bottom: 0; }

/* ---------- Vendor cards ---------- */
.vendor-grid { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.vendor-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.vendor-card picture { display: block; }
.vendor-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.vendor-photo-placeholder {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted); font: 700 3rem var(--font-head);
}
.vendor-body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.vendor-cat { font-size: 1rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin: 0; }
.vendor-card h3 { margin: 0; }
.vendor-desc { margin: 0; color: var(--muted); }
.vendor-booth { margin: 0; font-weight: 700; }
.vendor-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 0.6rem; }

/* Directory controls */
.directory-controls { display: grid; gap: 1rem; margin-top: 0.5rem; }
.search-box { max-width: 30rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-btn { background: var(--surface); color: var(--text); border-color: var(--border); }
.filter-btn[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.results-count { font-weight: 700; color: var(--muted); margin: 1.25rem 0 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 42rem; margin-top: 1.5rem; }
label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.optional { font-weight: 400; color: var(--muted); }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  padding: 0.7rem 0.9rem; min-height: 48px;
  border: 2px solid var(--border); border-radius: 10px;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); }
.hint { color: var(--muted); font-size: 1.0625rem; margin: 0.3rem 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- About ---------- */
.about { display: grid; gap: 2rem; align-items: start; }
.quote {
  margin: 0; padding: 1.25rem 1.5rem; background: var(--surface);
  border-left: 6px solid var(--cyan); border-radius: 0 var(--radius) var(--radius) 0;
}
.quote p { font: italic clamp(1.3rem, 1.15rem + 0.5vw, 1.5rem)/1.45 var(--font-head); margin-bottom: 0.6rem; }
.quote footer { font-weight: 700; color: var(--muted); }

/* ---------- Visit ---------- */
.visit-grid { display: grid; gap: 2rem; }
.map-frame { width: 100%; height: 320px; border: 0; border-radius: var(--radius); background: var(--surface-2); }
.address { font-style: normal; font-size: 1.2rem; margin-bottom: 1rem; }
.hours-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.hours-table th, .hours-table td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--border); }
.hours-table tr.today { background: var(--surface-2); font-weight: 800; }
.special-hours { list-style: none; padding: 0; margin: 0 0 1rem; }
.special-hours li { padding: 0.25rem 0; font-weight: 600; }
.visit-notes { list-style: none; padding: 0; margin: 0 0 1rem; }
.visit-notes li { margin-bottom: 0.5rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; margin-top: 1.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; }
.faq summary {
  position: relative; cursor: pointer; font-weight: 700; min-height: 48px;
  padding: 0.9rem 3.25rem 0.9rem 1.1rem; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1rem; top: 0.7rem;
  width: 1.75rem; height: 1.75rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-2); color: var(--brand);
  font: 700 1.4rem/1 var(--font-body);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.1rem 1rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 2.75rem 0 1.5rem; }
.site-footer a { color: inherit; }
.site-footer h2 { font-size: 1.35rem; }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer-grid address { font-style: normal; }
.footer-bottom {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid currentColor;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
}
.footer-bottom p { margin: 0; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 4rem 0; }
.not-found .hero-actions { justify-content: center; }

/* ---------- Larger screens ---------- */
@media (min-width: 48rem) {
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
  .hero-logo { max-width: 26rem; order: 0; }
  .about, .visit-grid { grid-template-columns: 1fr 1fr; }
  .map-frame { height: 100%; min-height: 420px; }
  .directory-controls { grid-template-columns: 1fr; }
}
@media (min-width: 60rem) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

/* Holiday highlight card in Events */
.feature-event { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-top: 1.5rem; }
.feature-event h3 { margin-bottom: 0.4rem; }
.feature-event ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.tag { display: inline-block; font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin: 0 0 0.35rem; }

/* Reviews (real Facebook recommendations) */
.reviews { display: grid; gap: 1rem; margin-top: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.review { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.review blockquote { margin: 0; }
.review blockquote p { margin: 0; font: italic 1.3rem/1.45 var(--font-head); }
.review figcaption { font-weight: 700; color: var(--muted); }

.form-status { margin: 0; padding: 0.9rem 1.1rem; border-radius: 10px; background: var(--surface-2); border: 2px solid var(--brand); font-weight: 700; }


/* =========================================================
   MOTION
   Only opacity and transform are animated (cheap on phones).
   Everything here is off for visitors with "reduce motion" on.
   ========================================================= */

/* ---------- 1. Hero: layers animate in on page load ---------- */
@keyframes tm-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes tm-from-right { from { opacity: 0; transform: translateX(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes tm-pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero h1:not(.split),
  .hero .lead,
  .hero .status-card,
  .hero .hero-actions,
  .page-hero h1:not(.split),
  .page-hero .lead,
  .not-found > * {
    animation: tm-rise 0.8s var(--ease-out) both;
  }
  .hero .eyebrow      { animation-delay: 0.05s; }
  .hero h1            { animation-delay: 0.18s; }
  .hero .lead         { animation-delay: 0.34s; }
  .hero .status-card  { animation-delay: 0.5s; }
  .hero .hero-actions { animation-delay: 0.64s; }
  .hero .hero-logo    { animation: tm-pop 0.9s var(--ease-out) 0.1s both; }
  .page-hero .lead    { animation-delay: 0.3s; }
  .not-found > :nth-child(2) { animation-delay: 0.15s; }
  .not-found > :nth-child(3) { animation-delay: 0.3s; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 48rem) {
  .hero .hero-logo { animation-name: tm-from-right; }
}

/* ---------- 2. Headlines: words rise in one after another ----------
   The h1 holds the full sentence for screen readers (visually hidden) and a
   copy split into words for the eyes (aria-hidden), so nothing is read twice.
   Each word sets its own --i (0, 1, 2...) for the stagger. */
@keyframes tm-word { from { opacity: 0; transform: translateY(0.45em); } to { opacity: 1; transform: none; } }
.split .w { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .split .w { animation: tm-word 0.7s var(--ease-out) both; animation-delay: calc(0.15s + var(--i, 0) * 0.07s); }
}

/* ---------- 3. Hover effects (mouse and trackpad only) ---------- */
@media (hover: hover) {
  .btn { transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
  .btn:hover { filter: none; }
  .btn-primary:hover { background: var(--brand-hover); color: #ffffff; }
  .btn-ink:hover { background: var(--brand-hover); }
  .btn-accent:hover { background: var(--ink); color: var(--cyan); }
  .btn-outline:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
  .hero .btn-outline:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
  .filter-btn:hover { border-color: var(--brand); }

  .tile, .vendor-card, .event, .review, .faq details, .photo-slide figure {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.25s ease;
  }
  .tile:hover, .vendor-card:hover, .event:hover, .review:hover, .faq details:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-lift);
  }
  .vendor-photo, .photo-slide img { transition: transform 0.6s var(--ease-out); }
  .tile-icon { display: inline-block; transition: transform 0.35s var(--ease-spring); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); }
  .btn:active { transform: translateY(0) scale(0.97); box-shadow: none; }
  .tile:hover, .vendor-card:hover, .event:hover, .review:hover { transform: translateY(-6px); }
  .vendor-card:hover .vendor-photo, .photo-slide figure:hover img { transform: scale(1.07); }
  .tile:hover .tile-icon { transform: scale(1.2) rotate(-6deg); }
}
.vendor-card { isolation: isolate; } /* keeps the zoomed photo inside the rounded card */

/* ---------- 4. Carousels (Swiper) ---------- */
.carousel-wrap { margin-top: 1.5rem; }
.carousel .swiper-slide { height: auto; display: flex; }
.carousel .swiper-slide > * { flex: 1; }
.carousel-controls {
  display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem;
}
.carousel-btn {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 2px solid var(--brand); background: var(--surface); color: var(--text);
  cursor: pointer;
}
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn.swiper-button-disabled { opacity: 0.35; cursor: default; }
.carousel-btn.swiper-button-lock, .carousel-pagination.swiper-pagination-lock { display: none; }
@media (hover: hover) {
  .carousel-btn { transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-spring); }
  .carousel-btn:not(.swiper-button-disabled):hover { background: var(--brand); color: var(--brand-ink); }
}
.carousel-pagination { position: static !important; width: auto !important; display: flex; gap: 0.15rem; }
.carousel-pagination .swiper-pagination-bullet {
  width: 12px; height: 12px; margin: 0 4px !important; opacity: 1;
  background: var(--border);
}
.carousel-pagination .swiper-pagination-bullet-active { background: var(--brand); }
/* Before Swiper loads (or if it can't), show the slides as a simple grid */
.carousel:not(.swiper-initialized) .swiper-wrapper {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.carousel:not(.swiper-initialized) + .carousel-controls { display: none; }

/* Photo gallery (fills from data/photos.csv; hidden while empty) */
.gallery { margin-top: 2.5rem; }
.gallery h3 { font-size: 1.5rem; }
.photo-slide figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); isolation: isolate; }
.photo-slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-slide figcaption { padding: 0.6rem 0.9rem; font-weight: 600; background: var(--surface); }

/* Featured makers on the home page: 3 across so 6 cards make 2 even rows */
@media (min-width: 60rem) {
  #featured-vendors { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 5. Micro-interactions (every device, including touch) ----------
   Buttons give a small "press", the FAQ icon turns into an x, and an
   opened answer eases in. */
@media (prefers-reduced-motion: no-preference) {
  .btn, .carousel-btn { transition: transform 0.2s var(--ease-spring); }
  .btn:active, .carousel-btn:not(.swiper-button-disabled):active { transform: scale(0.97); }
  .faq summary::after { transition: transform 0.3s var(--ease-spring); }
  .faq details[open] > div { animation: tm-rise 0.4s var(--ease-out) both; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* the hover rules above set the full transition list for mouse users */
  .btn { transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
  .carousel-btn { transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-spring); }
}

/* ---------- 6. Loading placeholders (skeletons) ----------
   Grey cards hold the space while events and makers load, so nothing jumps.
   They're hidden from screen readers; the list says aria-busy until it fills. */
.skeleton { pointer-events: none; }
.skeleton .sk {
  position: relative; overflow: hidden; display: block;
  background: var(--surface-2); border-radius: 8px;
}
.skeleton .sk-photo { aspect-ratio: 4 / 3; border-radius: 0; }
.skeleton .sk-line { height: 1.05rem; margin: 0.35rem 0; }
.skeleton .sk-title { height: 1.5rem; width: 70%; }
.skeleton .sk-short { width: 40%; }
.skeleton .sk-date { width: 4.5rem; height: 4.6rem; border-radius: 10px; }
.skeleton .sk-btn { height: 44px; width: 7rem; border-radius: 999px; margin-top: 0.8rem; }
@keyframes tm-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: no-preference) {
  .skeleton .sk::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, var(--shimmer), transparent);
    transform: translateX(-100%);
    animation: tm-shimmer 1.4s ease-in-out infinite;
  }
}

/* ---------- 7. Page transitions (View Transitions API) ----------
   Going between Home and Vendors cross-fades instead of flashing white.
   The header and menu stay put. Browsers without support just load normally. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  .site-nav { view-transition-name: site-nav; }
  ::view-transition-group(root) { animation-duration: 0.35s; animation-timing-function: var(--ease-out); }
}

/* ---------- Scroll reveals (js/reveal.js) ----------
   Kept last on purpose so it wins over the hover transitions while a block slides in.
   scroll reveal: each block starts fully off-screen on the side it lands on, then slides all the way in */
html,body{overflow-x:clip}
.reveal{opacity:0;transition:transform .9s cubic-bezier(.2,.8,.2,1),opacity .9s ease;transition-delay:var(--d,0s);will-change:transform}
.reveal.from-left{transform:translateX(-100vw)}
.reveal.from-right{transform:translateX(100vw)}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){.reveal{opacity:1!important;transform:none!important;transition:none!important}}

