/*
 * Theme: Craft Fair
 *
 * A church-basement craft table that got into the mimosas. Every card is a
 * different object — carved wood, chalkboard, embroidery hoop, gingham,
 * polaroid, washi tape — hung slightly crooked and straightened on hover.
 *
 * Everything is scoped under .theme-craft-fair so themes can never collide.
 * Fonts are system faces on purpose: Snell Roundhand and Brush Script are the
 * genuine craft-store hands, and anything more refined undercuts the joke.
 */

.theme-craft-fair {
  --linen:    #FAF3E7;
  --linen-2:  #F2E7D5;
  --card:     #FFFCF6;
  --ink:      #3A2E2A;
  --ink-soft: #7A6659;
  --rule:     #DCCBB2;
  --blush:    #E3A2A0;
  --blush-dp: #C4767B;
  --sage:     #9DB08C;
  --sage-dp:  #6F8560;
  --plum:     #7C4B62;
  --gold:     #D3A03C;
  --wood-1:   #A97F5C;
  --wood-2:   #8A6244;
  --slate:    #37413C;
  --chalk:    #EFE9DC;
  --shadow:   rgba(58, 46, 42, .18);

  --font-script:  "Snell Roundhand", "Brush Script MT", "Segoe Script",
                  "Bradley Hand", cursive;
  --font-serif:   "Didot", "Bodoni 72", "Hoefler Text", Georgia,
                  "Times New Roman", serif;
  --font-sans:    "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --font-stamp:   "Courier New", Courier, monospace;

  --nav-bg: #2E241F;
  --nav-fg: #FAF3E7;

  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(90deg, rgba(124, 75, 98, .035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg,  rgba(124, 75, 98, .035) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 0%, rgba(227, 162, 160, .16), transparent 60%);
  color: var(--ink);
  font-family: var(--font-sans);
}

/* Evening barn: stained walnut ground, the same palette warmed up. */
@media (prefers-color-scheme: dark) {
  .theme-craft-fair {
    --linen:    #241C18;
    --linen-2:  #2E2420;
    --card:     #33271F;
    --ink:      #F5E9D6;
    --ink-soft: #C2AC94;
    --rule:     #4C3B2E;
    --blush:    #E0A19E;
    --blush-dp: #EFB9B5;
    --sage:     #A8BA96;
    --sage-dp:  #BDCCAC;
    --plum:     #D69CB6;
    --gold:     #E8B855;
    --wood-1:   #7A5940;
    --wood-2:   #553B29;
    --slate:    #191F1C;
    --shadow:   rgba(0, 0, 0, .45);
    --nav-bg:   #16100C;
  }
}

:root[data-theme="dark"] .theme-craft-fair {
  --linen:    #241C18;
  --linen-2:  #2E2420;
  --card:     #33271F;
  --ink:      #F5E9D6;
  --ink-soft: #C2AC94;
  --rule:     #4C3B2E;
  --blush:    #E0A19E;
  --blush-dp: #EFB9B5;
  --sage:     #A8BA96;
  --sage-dp:  #BDCCAC;
  --plum:     #D69CB6;
  --gold:     #E8B855;
  --wood-1:   #7A5940;
  --wood-2:   #553B29;
  --slate:    #191F1C;
  --shadow:   rgba(0, 0, 0, .45);
  --nav-bg:   #16100C;
}

:root[data-theme="light"] .theme-craft-fair {
  --linen:    #FAF3E7;
  --linen-2:  #F2E7D5;
  --card:     #FFFCF6;
  --ink:      #3A2E2A;
  --ink-soft: #7A6659;
  --rule:     #DCCBB2;
  --blush:    #E3A2A0;
  --blush-dp: #C4767B;
  --sage:     #9DB08C;
  --sage-dp:  #6F8560;
  --plum:     #7C4B62;
  --gold:     #D3A03C;
  --wood-1:   #A97F5C;
  --wood-2:   #8A6244;
  --slate:    #37413C;
  --shadow:   rgba(58, 46, 42, .18);
  --nav-bg:   #2E241F;
}

/* ─── hero ──────────────────────────────────────────────────────────── */

.theme-craft-fair .hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.theme-craft-fair .bunting {
  display: flex;
  justify-content: center;
  gap: .35rem;
  width: 100%;
  margin-bottom: .5rem;
}
.theme-craft-fair .flag {
  width: 34px;
  height: 40px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  opacity: .85;
}
.theme-craft-fair .flag:nth-child(4n+1) { background: var(--blush); }
.theme-craft-fair .flag:nth-child(4n+2) { background: var(--sage); }
.theme-craft-fair .flag:nth-child(4n+3) { background: var(--gold); }
.theme-craft-fair .flag:nth-child(4n+4) {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 6px, transparent 6px 12px),
    var(--blush);
}

.theme-craft-fair .sign {
  position: relative;
  padding: 2.6rem clamp(1.6rem, 5vw, 4.5rem);
  border-radius: 10px;
  background:
    repeating-linear-gradient(91deg, rgba(0,0,0,.055) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(89deg, rgba(255,255,255,.07) 0 1px, transparent 1px 15px),
    linear-gradient(168deg, var(--wood-1), var(--wood-2));
  box-shadow:
    inset 0 0 0 7px rgba(255, 252, 246, .82),
    inset 0 0 0 9px rgba(0, 0, 0, .12),
    0 18px 34px -16px var(--shadow);
  transform: rotate(-1.1deg);
}
.theme-craft-fair .sign::before,
.theme-craft-fair .sign::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8DCC6, #7A6144 70%);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.theme-craft-fair .sign::before { left: 20px; }
.theme-craft-fair .sign::after  { right: 20px; }

.theme-craft-fair .eyebrow {
  font-family: var(--font-stamp);
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 252, 246, .8);
  margin-bottom: .7rem;
}

.theme-craft-fair .hero-title {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 9vw, 6.2rem);
  line-height: .95;
  font-weight: 400;
  color: #FFFCF6;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(0,0,0,.22), 0 12px 26px rgba(0,0,0,.3);
}

.theme-craft-fair .hero-sub {
  max-width: 47ch;
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 2.1vw, 1.24rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
}

.theme-craft-fair .credit {
  font-family: var(--font-stamp);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 2px solid var(--blush-dp);
  border-radius: 999px;
  padding: .55rem 1.15rem;
  transform: rotate(2.4deg);
  opacity: .9;
}

/* Live Laugh Yinz — staggered symmetrically about the centre so the
   cascade reads without the block drifting off-axis in its frame. */
.theme-craft-fair .llv {
  margin: .6rem auto 0;
  padding: 1.5rem 3rem;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow:
    inset 0 0 0 4px var(--linen-2),
    0 12px 24px -14px var(--shadow);
  transform: rotate(1.6deg);
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 4.6vw, 2.5rem);
  line-height: 1.25;
  color: var(--plum);
  text-align: center;
}
.theme-craft-fair .llv--tilt-left { transform: rotate(-1.4deg); }
.theme-craft-fair .llv span { display: block; }
.theme-craft-fair .llv span:nth-child(1) { margin-right: 3em; }
.theme-craft-fair .llv span:nth-child(3) { margin-left: 3em; }

/* ─── the brief ─────────────────────────────────────────────────────── */

.theme-craft-fair .brief {
  margin: 2rem auto 1rem;
  max-width: 760px;
  padding: 2.4rem clamp(1.5rem, 4vw, 3rem);
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.05), transparent 55%),
    var(--slate);
  border: 12px solid var(--wood-2);
  box-shadow: 0 20px 40px -20px var(--shadow);
  --tilt: -.7deg;
  color: var(--chalk);
  text-align: left;
}
.theme-craft-fair .brief h2 {
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 1.4rem;
  color: #FFF;
  text-shadow: 0 0 12px rgba(255,255,255,.28);
}
.theme-craft-fair .brief ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .85rem;
}
.theme-craft-fair .brief li {
  display: flex;
  gap: .85rem;
  align-items: baseline;
  font-size: .97rem;
  line-height: 1.5;
  opacity: .95;
}
.theme-craft-fair .brief li::before {
  content: "\2715";
  color: var(--blush);
  font-size: .8rem;
  flex: none;
}
.theme-craft-fair .brief li.yes::before { content: "\2713"; color: var(--sage); }
.theme-craft-fair .brief .sig {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px dashed rgba(239, 233, 220, .3);
  text-align: right;
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: rgba(239, 233, 220, .85);
}

/* ─── section banners ───────────────────────────────────────────────── */

.theme-craft-fair .banner {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2.2rem;
  padding: .9rem 3.2rem;
  background: var(--blush);
  clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 50%, 100% 100%, 0 100%, 26px 50%);
  box-shadow: 0 10px 20px -14px var(--shadow);
  --tilt: -.8deg;
  text-align: center;
}
.theme-craft-fair .list-section:nth-of-type(2n) .banner {
  background: var(--sage);
  --tilt: .9deg;
}
.theme-craft-fair .list-section:nth-of-type(3n) .banner { background: var(--gold); }

.theme-craft-fair .banner h2 {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  line-height: 1.1;
  color: #2E241F;
}
.theme-craft-fair .banner .kicker {
  display: block;
  font-family: var(--font-stamp);
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(46, 36, 31, .72);
  margin-top: .3rem;
}

/* ─── card base ─────────────────────────────────────────────────────── */

.theme-craft-fair .card {
  padding: 1.5rem 1.4rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 26px -18px var(--shadow);
}

.theme-craft-fair .card:nth-child(6n+1) { --tilt: -1.5deg; }
.theme-craft-fair .card:nth-child(6n+2) { --tilt: 1.2deg; }
.theme-craft-fair .card:nth-child(6n+3) { --tilt: -.6deg; }
.theme-craft-fair .card:nth-child(6n+4) { --tilt: 1.8deg; }
.theme-craft-fair .card:nth-child(6n+5) { --tilt: -1.1deg; }
.theme-craft-fair .card:nth-child(6n+6) { --tilt: .5deg; }

/* Straighten the crooked sign on hover. */
.theme-craft-fair .card:hover,
.theme-craft-fair .card:focus-within {
  --tilt: 0deg;
  --rise: -5px;
  box-shadow: 0 22px 40px -20px var(--shadow);
  z-index: 3;
}

.theme-craft-fair .card__title {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  line-height: 1.18;
  font-weight: 400;
  margin-bottom: .3rem;
}

.theme-craft-fair .card__where {
  font-family: var(--font-stamp);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .9rem;
}

.theme-craft-fair .card__body {
  font-size: .95rem;
  line-height: 1.62;
}

/* Mentions have to stay legible on every material, including the dark wood
   and chalkboard cards, so they key off currentColor rather than a token. */
.theme-craft-fair .blurb__mention {
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  opacity: .85;
}
.theme-craft-fair .blurb__mention:hover { opacity: 1; }

.theme-craft-fair .card__note {
  margin-top: .9rem;
  padding: .7rem .85rem;
  background: var(--linen-2);
  border-left: 3px solid var(--sage-dp);
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.theme-craft-fair .card__note--warning { border-left-color: var(--blush-dp); }
.theme-craft-fair .card__note b {
  font-family: var(--font-stamp);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  display: block;
  margin-bottom: .25rem;
  color: var(--sage-dp);
}
.theme-craft-fair .card__note--warning b { color: var(--blush-dp); }

.theme-craft-fair .card__by {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px dotted var(--rule);
  font-family: var(--font-stamp);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

.theme-craft-fair .card__votes {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .6rem;
  border: 1.5px solid var(--plum);
  border-radius: 999px;
  color: var(--plum);
  font-size: .64rem;
  letter-spacing: .1em;
  transform: rotate(-2deg);
}

/* ─── materials ─────────────────────────────────────────────────────── */

/* washi tape */
.theme-craft-fair .card--tape::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 92px;
  height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.4) 0 5px, transparent 5px 10px),
    var(--gold);
  opacity: .82;
}
.theme-craft-fair .card--tape:nth-child(even)::before {
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,.4) 0 5px, transparent 5px 10px),
    var(--sage);
}

/* carved wooden sign */
.theme-craft-fair .card--wood {
  background:
    repeating-linear-gradient(91deg, rgba(0,0,0,.05) 0 2px, transparent 2px 9px),
    linear-gradient(165deg, var(--wood-1), var(--wood-2));
  border-color: transparent;
  box-shadow:
    inset 0 0 0 5px rgba(255, 252, 246, .8),
    inset 0 0 0 7px rgba(0,0,0,.1),
    0 14px 28px -18px var(--shadow);
  padding: 1.9rem 1.6rem 1.6rem;
}
.theme-craft-fair .card--wood .card__title {
  font-family: var(--font-script);
  font-size: 2.1rem;
  color: #FFFCF6;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.theme-craft-fair .card--wood .card__where { color: rgba(255,252,246,.7); }
.theme-craft-fair .card--wood .card__body  { color: rgba(255,252,246,.94); }
.theme-craft-fair .card--wood .card__by {
  color: rgba(255,252,246,.72);
  border-top-color: rgba(255,252,246,.28);
}
.theme-craft-fair .card--wood .card__votes {
  color: #FFFCF6;
  border-color: rgba(255,252,246,.6);
}
.theme-craft-fair .card--wood .card__note {
  background: rgba(0,0,0,.16);
  color: rgba(255,252,246,.9);
  border-left-color: rgba(255,252,246,.55);
}
.theme-craft-fair .card--wood .card__note b { color: rgba(255,252,246,.8); }

/* chalkboard in a wood frame */
.theme-craft-fair .card--chalkboard {
  background: var(--slate);
  border: 9px solid var(--wood-2);
  color: var(--chalk);
}
.theme-craft-fair .card--chalkboard .card__title {
  font-family: var(--font-script);
  font-size: 2rem;
  color: #FFF;
  text-shadow: 0 0 10px rgba(255,255,255,.25);
}
.theme-craft-fair .card--chalkboard .card__where { color: rgba(239,233,220,.62); }
.theme-craft-fair .card--chalkboard .card__body  { color: rgba(239,233,220,.93); }
.theme-craft-fair .card--chalkboard .card__by {
  color: rgba(239,233,220,.62);
  border-top-color: rgba(239,233,220,.28);
}
.theme-craft-fair .card--chalkboard .card__votes {
  color: var(--chalk);
  border-color: rgba(239,233,220,.5);
}
.theme-craft-fair .card--chalkboard .card__note {
  background: rgba(255,255,255,.07);
  color: rgba(239,233,220,.88);
  border-left-color: var(--blush);
}
.theme-craft-fair .card--chalkboard .card__note b { color: var(--blush); }

/* embroidery hoop */
.theme-craft-fair .card--hoop {
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 2.6rem 2.1rem;
  border: 12px solid var(--wood-1);
  background:
    repeating-linear-gradient(45deg,  rgba(124,75,98,.05) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(124,75,98,.05) 0 1px, transparent 1px 5px),
    var(--linen-2);
  box-shadow:
    inset 0 0 0 3px rgba(255,252,246,.5),
    0 14px 28px -18px var(--shadow);
}
.theme-craft-fair .card--hoop .card__title {
  font-family: var(--font-script);
  font-size: 1.9rem;
  color: var(--plum);
}
.theme-craft-fair .card--hoop .card__where { margin-bottom: .55rem; }
.theme-craft-fair .card--hoop .card__body  { font-size: .88rem; }
.theme-craft-fair .card--hoop .card__by {
  justify-content: center;
  flex-wrap: wrap;
  border-top: none;
}

/* gingham */
.theme-craft-fair .card--gingham {
  background:
    repeating-linear-gradient(0deg,  rgba(157,176,140,.32) 0 14px, transparent 14px 28px),
    repeating-linear-gradient(90deg, rgba(157,176,140,.32) 0 14px, transparent 14px 28px),
    var(--card);
  border: 3px double var(--sage-dp);
}
.theme-craft-fair .card--gingham .card__title {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--sage-dp);
}

/* polaroid — stays a light print in both themes, the way a photo would */
.theme-craft-fair .card--polaroid {
  background: #FFFDF9;
  padding: .9rem .9rem 1.3rem;
  border: none;
  box-shadow: 0 16px 30px -18px var(--shadow), 0 0 0 1px rgba(0,0,0,.06);
  color: #3A2E2A;
}
.theme-craft-fair .card--polaroid .snap {
  aspect-ratio: 4 / 3;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #E3A2A0, #D3A03C);
  box-shadow: inset 0 0 40px rgba(0,0,0,.18);
}
.theme-craft-fair .card--polaroid .snap--1 { background: linear-gradient(155deg, #A9C193, #5E7B4C); }
.theme-craft-fair .card--polaroid .snap--2 { background: linear-gradient(155deg, #F0C3BE, #C4767B); }
.theme-craft-fair .card--polaroid .snap--3 { background: linear-gradient(155deg, #C9A9BE, #6C4A63 70%, #3A2E4A); }
.theme-craft-fair .card--polaroid .snap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 78%, rgba(255,255,255,.42), transparent 42%),
    repeating-linear-gradient(120deg, rgba(255,255,255,.09) 0 2px, transparent 2px 9px);
}
.theme-craft-fair .card--polaroid .card__title,
.theme-craft-fair .card--polaroid .card__where,
.theme-craft-fair .card--polaroid .card__body,
.theme-craft-fair .card--polaroid .card__by { padding-inline: .5rem; }
.theme-craft-fair .card--polaroid .card__title { font-size: 1.3rem; color: #3A2E2A; }
.theme-craft-fair .card--polaroid .card__where { color: #7A6659; }
.theme-craft-fair .card--polaroid .card__body  { color: #3A2E2A; }
.theme-craft-fair .card--polaroid .card__by {
  color: #7A6659;
  border-top-color: #E4D8C4;
}
.theme-craft-fair .card--polaroid .card__votes { color: #7C4B62; border-color: #7C4B62; }
.theme-craft-fair .card--polaroid .card__note {
  background: #F4EDE0;
  color: #6B5A4C;
}

/* ─── closer ────────────────────────────────────────────────────────── */

.theme-craft-fair .closer .wrap {
  margin-top: 5rem;
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}
.theme-craft-fair .closer .quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 3.2vw, 1.6rem);
  line-height: 1.45;
  text-wrap: balance;
}
.theme-craft-fair .closer .quote::before { content: "\201C"; }
.theme-craft-fair .closer .quote::after  { content: "\201D"; }
.theme-craft-fair .closer .attrib {
  font-family: var(--font-stamp);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.theme-craft-fair .closer .colophon {
  margin-top: 1rem;
  font-family: var(--font-stamp);
  font-size: .7rem;
  line-height: 1.9;
  letter-spacing: .1em;
  color: var(--ink-soft);
  border-top: 1px dashed var(--rule);
  padding-top: 1.6rem;
  width: 100%;
}

/* ─── narrow screens ────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .theme-craft-fair .card { --tilt: 0deg !important; }
  .theme-craft-fair .flag { width: 24px; height: 28px; }
  .theme-craft-fair .llv span:nth-child(1) { margin-right: 1.6em; }
  .theme-craft-fair .llv span:nth-child(3) { margin-left: 1.6em; }
}
