/* Main Street Merchants: white like the storefront sign, with kraft tags and twine. */
@font-face { font-family: "Young Serif"; src: url(/assets/fonts/young-serif-latin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url(/assets/fonts/karla-latin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url(/assets/fonts/karla-latin-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #ffffff;
  --ink: #191714;
  --ink-soft: #4b463f;
  --kraft: #d8bf98;
  --kraft-light: #e8d8bd;
  --kraft-edge: #b8986a;
  --twine: #8a6a3f;
  --hairline: #e4ddd2;
  --seal: #86323d;
  --seal-wash: #f8efe8;
  --seal-edge: #e8cfc9;
  --serif: "Young Serif", Georgia, serif;
  --sans: Karla, system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 74rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  padding-bottom: var(--analytics-space, 0px);
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--twine); }
:focus-visible { outline: 3px solid var(--twine); outline-offset: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--paper); }
.nowrap { white-space: nowrap; }
abbr[title] { text-decoration: none; }
.hero-tag h2, .event h3, .tags h3, .visit h2, .page h1 { text-wrap: balance; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

.btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-fill { background: var(--ink); color: var(--paper); }
.btn-fill:hover { border-color: var(--twine); background: var(--twine); color: var(--paper); }

/* Top line */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1rem; font-size: 0.95rem; }
.top-place { color: var(--ink-soft); text-wrap: balance; }
.top nav { display: flex; gap: 1.25rem; font-weight: 700; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* The sign: the logo on a white disc, as it hangs over the storefront. */
.sign { display: flex; justify-content: center; padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(2rem, 4vw, 3rem); }
.sign-disc {
  display: grid;
  place-items: center;
  width: clamp(17rem, 42vw, 32rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 9px var(--paper), 0 0 0 10px var(--hairline), 0 18px 40px -18px rgb(25 23 20 / 0.35);
}
.sign-disc img { width: 84%; }

/* Tags: kraft card stock with a punched hole. */
.tag {
  position: relative;
  padding: 3rem clamp(1.25rem, 3vw, 2.25rem) 1.75rem;
  border-radius: 0.6rem 0.6rem 0.3rem 0.3rem;
  background: var(--kraft);
  box-shadow: inset 0 0 0 1px var(--kraft-edge);
}
.tag::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 50%;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: -0.525rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--kraft-edge);
}

/* Hero: the shop window photo, with the tag tied over its corner. */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; }
.hero-photo { grid-area: 1 / 1; overflow: hidden; border-radius: 4px; aspect-ratio: 720 / 458; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-tag {
  grid-area: 1 / 2;
  margin-left: -4rem;
  padding-top: 3.25rem;
  clip-path: polygon(18% 0, 82% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
  border-radius: 0;
  transform: rotate(2deg);
}
.hero-tag h2 { margin-top: 0.6rem; font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4vw, 3.3rem); line-height: 1.03; }
.hero-tag > p:not(.kicker) { margin-top: 1rem; font-size: 1.125rem; }
.hero-tag .btns { margin-top: 1.5rem; }

/* Award */
.award {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 2.75rem);
  align-items: center;
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
.seals { display: flex; align-items: flex-start; gap: clamp(1rem, 2.5vw, 1.75rem); }
.seals figure { display: grid; justify-items: center; gap: 0.5rem; }
.seals img { width: clamp(7.5rem, 12vw, 10rem); }
.seals figcaption { padding: 0.15rem 0.7rem; border: 1px solid var(--seal-edge); border-radius: 999px; background: var(--seal-wash); color: var(--seal); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.award h2 { max-width: 27ch; text-wrap: balance; margin-top: 0.4rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; }
.award p:last-child { max-width: 40rem; text-wrap: pretty; margin-top: 0.6rem; color: var(--ink-soft); }

/* Section headings */
.section-head { display: grid; gap: 0.75rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.section-head h2 { text-wrap: balance; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.8vw, 2.8rem); line-height: 1.05; }
.section-head p { max-width: 42rem; text-wrap: pretty; color: var(--ink-soft); font-size: 1.125rem; }

/* Holidays */
.holidays {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
.holidays .section-head { grid-column: 1 / -1; }
.gifts { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.5rem, 1.5vw, 1rem); }
.gifts img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.event { grid-column: 2; grid-row: 2; align-self: start; background: var(--kraft-light); transform: rotate(-1.5deg); }
.event::after { content: ""; position: absolute; top: -2.25rem; left: 50%; width: 2px; height: 3.5rem; background: var(--twine); }
.event h3 { margin-top: 0.5rem; font-family: var(--serif); font-weight: 400; font-size: 1.85rem; line-height: 1.05; }
.event-when { margin-top: 0.85rem; font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
.event ul { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px dashed var(--kraft-edge); }
.event li + li { margin-top: 0.2rem; }
.event[hidden] { display: none; }
.event[hidden] ~ .gifts { grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* What you'll find: tags hang from one twine line. */
.shop { margin-top: clamp(3.5rem, 8vw, 6rem); }
.tags { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); margin-top: 1.5rem; padding-top: 3rem; }
.tags::before { content: ""; position: absolute; top: 1rem; left: 0; right: 0; height: 2px; background: var(--twine); }
.tags .tag { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 2.75rem; }
.tags .tag::after { content: ""; position: absolute; top: -2rem; left: 50%; width: 2px; height: 3.2rem; background: var(--twine); }
.tags .tag:nth-child(1) { transform: rotate(-1.2deg); }
.tags .tag:nth-child(2) { transform: rotate(0.8deg); background: var(--kraft-light); }
.tags .tag:nth-child(3) { transform: rotate(-0.4deg); }
.tags img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.tags h3 { margin-top: 0.4rem; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.1; }
.tags p { color: var(--ink-soft); }

/* Visit */
.visit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 4rem);
  padding-top: 2rem;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 2px;
}
.visit-photo img { width: 100%; border-radius: 4px; }
.visit h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
.visit dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin-top: 1.5rem; }
.visit dt { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.visit dd { margin-top: 0.25rem; font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.visit .btns { margin-top: 1.75rem; }
.visit-note { margin-top: 1.25rem; color: var(--ink-soft); }

/* Footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 1.5rem 2.5rem; background: linear-gradient(var(--hairline), var(--hairline)) no-repeat var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px; color: var(--ink-soft); font-size: 0.95rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.analytics-preferences { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; cursor: pointer; }
.analytics-preferences:hover { color: var(--twine); }

/* Consent bar: plain white strip; Decline and Allow share one style so neither is favored. */
.analytics-panel {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-height: 50vh;
  overflow: auto;
  padding: 0.85rem max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  border-top: 2px solid var(--ink);
  background: var(--paper);
  font-size: 1rem;
}
.analytics-panel[hidden], .analytics-preferences[hidden] { display: none; }
.analytics-panel p { flex: 1 1 20rem; }
.analytics-actions { display: flex; gap: 0.5rem; }
.analytics-actions button {
  min-width: 6.5rem;
  min-height: 2.75rem;
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.analytics-actions button:hover { background: var(--ink); color: var(--paper); }

/* Secondary pages */
.page { max-width: 44rem; margin: 0 auto; padding: 1rem var(--gutter) 3.5rem; }
.page-sign { display: block; width: 9rem; margin-bottom: 2rem; }
.page h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; }
.page h2 { margin-top: 2rem; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.page p, .page address { margin-top: 0.75rem; }
.page address { font-style: normal; }

@media (max-width: 960px) {
  .holidays { grid-template-columns: minmax(0, 1fr); }
  .event { grid-column: 1; grid-row: 2; max-width: 24rem; margin-top: 1.5rem; }
  .gifts { grid-row: 3; }
}

@media (min-width: 861px) and (max-width: 1100px) {
  .visit dl { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-tag { grid-area: 2 / 1; margin: -3rem 0.75rem 0; transform: rotate(1.2deg); }
  .tags { grid-template-columns: minmax(0, 1fr); gap: 3.25rem; max-width: 26rem; }
  .tags::before { display: none; }
  .tags img { aspect-ratio: 4 / 3; }
  .visit { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .top { justify-content: center; text-align: center; }
  .top nav { display: none; }
  .sign-disc { width: min(84vw, 21rem); }
  .award { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .award h2 { margin-inline: auto; }
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event[hidden] ~ .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit dl { grid-template-columns: minmax(0, 1fr); }
  .btns .btn { flex: 1 1 100%; }
  .analytics-panel { padding-block: 0.85rem 1rem; }
  .analytics-actions { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-actions button { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
