/* Silly Farmers: colours taken from the game (fair signs, Hazel's stall, the farmhouse) */
:root {
  --cream: #FFF7E8;
  --paper: #FBEFD9;
  --ink: #3A2B22;
  --ink-soft: #6B5546;
  --red: #D9443A;
  --red-dark: #B5322A;
  --green: #5E9E4A;
  --green-dark: #3E7D3A;
  --navy: #1F2A5C;
  --gold: #F2C744;
  --sky: #A9C8F0;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(58, 43, 34, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 18px/1.6 "Nunito", system-ui, sans-serif;
}
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--red-dark); }
.kicker {
  font-family: "Fredoka", sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.85rem; color: var(--green-dark); margin-bottom: 0.4em;
}
.kicker.light { color: var(--gold); }

/* ---------- the little marquee sign (nav + footer) */
.mini-sign {
  display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.04em; color: var(--gold); background: var(--navy);
  padding: 0.3em 0.8em; border-radius: 10px; border: 3px solid var(--gold);
  text-shadow: 0 2px 0 var(--red-dark);
}

/* ---------- nav */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(255, 247, 232, 0.92); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--red);
}
.nav-logo { text-decoration: none; }
.nav-links { display: flex; gap: clamp(12px, 2.5vw, 32px); }
.nav-links a {
  font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 6px 2px; border-bottom: 3px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.8rem; color: var(--ink); cursor: pointer; }

/* ---------- hero */
.hero {
  position: relative; min-height: min(92vh, 900px); display: grid; place-items: center;
  overflow: hidden; text-align: center; padding: 60px 16px;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transform: scale(1.04); animation: drift 30s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(31, 42, 92, 0.15) 0%, rgba(31, 42, 92, 0.05) 40%, rgba(58, 43, 34, 0.55) 100%);
}
@keyframes drift { from { transform: scale(1.04) translateX(-1%); } to { transform: scale(1.1) translateX(1%); } }
.hero-inner { max-width: 760px; }
.hero-text {
  color: #fff; font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); margin: 18px auto 26px; max-width: 600px;
}
.coming { color: #fff; font-weight: 700; opacity: 0.9; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); margin-top: 22px; }

/* the big marquee sign, like the fair's arch board */
.marquee {
  position: relative; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0 0.35em;
  margin: 0; padding: 0.35em 0.7em 0.4em;
  font-size: clamp(2.6rem, 9vw, 6rem); font-weight: 700; letter-spacing: 0.02em;
  background: var(--navy); border: 0.09em solid var(--gold); border-radius: 0.35em;
  box-shadow: 0 0.12em 0 #C79A25, var(--shadow);
}
.marquee::before {                      /* the light bulbs round the edge */
  content: ""; position: absolute; inset: 0.07em; border-radius: 0.28em; pointer-events: none;
  background:
    radial-gradient(circle, #FFF9DC 0 0.045em, transparent 0.05em) 0 0 / 0.32em 0.32em repeat-x,
    radial-gradient(circle, #FFF9DC 0 0.045em, transparent 0.05em) 0 100% / 0.32em 0.32em repeat-x;
  animation: twinkle 1.6s steps(2) infinite;
}
@keyframes twinkle { 50% { opacity: 0.55; } }
.marquee-word { display: inline-flex; }
.marquee-word .l { display: inline-block; text-shadow: 0 0.05em 0 #fff, 0 0.1em 0 rgba(0, 0, 0, 0.35); transition: transform 0.2s; }
.marquee-word .l:nth-child(odd) { color: var(--red); }
.marquee-word .l:nth-child(even) { color: var(--gold); }
.marquee:hover .l { animation: hop 0.5s ease; }
@keyframes hop { 40% { transform: translateY(-0.12em); } }

/* the red ribbon under it */
.ribbon { margin: -0.4em 0 0; position: relative; z-index: 1; }
.ribbon span {
  display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 600; color: #fff;
  font-size: clamp(1rem, 2.4vw, 1.35rem); background: var(--red); padding: 0.35em 1.4em;
  border: 3px solid var(--gold); border-radius: 6px; box-shadow: 0 4px 0 var(--red-dark);
  transform: rotate(-1.5deg);
}

.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.1rem;
  padding: 0.75em 1.6em; border-radius: 999px; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-dark); }
.btn-cream { background: var(--cream); color: var(--ink); box-shadow: 0 5px 0 #D9C7A6; }

/* ---------- bunting (the fair's pennants) */
.bunting {
  height: 34px;
  background:
    linear-gradient(135deg, var(--red) 25%, transparent 25%) 0 0 / 60px 34px,
    linear-gradient(225deg, var(--red) 25%, transparent 25%) 0 0 / 60px 34px,
    linear-gradient(135deg, var(--gold) 25%, transparent 25%) 30px 0 / 60px 34px,
    linear-gradient(225deg, var(--gold) 25%, transparent 25%) 30px 0 / 60px 34px;
  background-repeat: repeat-x;
  border-top: 3px solid var(--ink);
}

/* ---------- three pillars */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 1100px; margin: 40px auto 30px; padding: 0 16px; text-align: center;
}
.pillar { background: #fff; border-radius: var(--radius); padding: 28px 22px; box-shadow: var(--shadow); }
.pillar-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 10px; }
.pillar p { color: var(--ink-soft); margin: 0; }

/* ---------- feature rows */
.feature {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: 1200px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) 16px;
}
.feature.flip .feature-pic { order: 2; }
.feature-pic img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 6px solid #fff; transform: rotate(-1deg);
}
.feature.flip .feature-pic img { transform: rotate(1deg); }
.feature-text p { color: var(--ink-soft); }

/* ---------- the valley band */
.band {
  position: relative; text-align: center; color: #fff; padding: clamp(60px, 10vw, 120px) 16px;
  background: linear-gradient(rgba(31, 42, 92, 0.55), rgba(31, 42, 92, 0.55)), url("../img/shots/steam-train-in-the-valley.jpg") center / cover;
}
.band-inner { max-width: 680px; margin: 0 auto; }
.band p { font-size: 1.15rem; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }

.duo {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
  max-width: 1200px; margin: 0 auto; padding: 48px 16px;
}
.duo figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.duo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.duo figcaption { font-family: "Fredoka", sans-serif; font-weight: 600; padding: 12px 18px; }

/* ---------- the fair */
.fair { background: var(--paper); padding: clamp(48px, 7vw, 90px) 16px; border-top: 3px dashed #E5CFA5; }
.fair-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.fair-head p:last-child { color: var(--ink-soft); }
.fair-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: 1200px; margin: 0 auto;
}
.fair-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border-top: 8px solid var(--red);
}
.fair-card:nth-child(2) { border-top-color: var(--gold); }
.fair-card:nth-child(3) { border-top-color: #3B6FD1; }
.fair-card:nth-child(4) { border-top-color: var(--green); }
.fair-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fair-card h3 { margin: 16px 18px 6px; }
.fair-card p { margin: 0 18px 20px; color: var(--ink-soft); font-size: 0.97rem; }
.fair-wide { max-width: 1200px; margin: 32px auto 0; }
.fair-wide img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 6px solid #fff; }

/* ---------- gallery */
.gallery { max-width: 1300px; margin: 0 auto; padding: clamp(48px, 7vw, 80px) 16px; text-align: center; }
.gallery-sub { color: var(--ink-soft); }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 26px;
}
.gallery-grid button {
  padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(58, 43, 34, 0.15); transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-grid button:hover, .gallery-grid button:focus-visible { transform: translateY(-3px) rotate(-0.5deg); box-shadow: var(--shadow); }
.gallery-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery-grid button { position: relative; }
.new-tag { position: absolute; top: 8px; left: 8px; background: var(--red, #d9534a); color: #fff; font-weight: 800;
  font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.25); letter-spacing: .02em; }

/* ---------- behind the scenes + footer */
.made { max-width: 760px; margin: 0 auto; padding: 20px 16px 70px; text-align: center; }
.made p:last-child { color: var(--ink-soft); }
.footer {
  background: var(--ink); color: var(--cream); text-align: center; padding: 36px 16px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer p { margin: 0; opacity: 0.85; }
.footer a { color: var(--gold); }

/* ---------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 16, 12, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1600px, 100%); text-align: center; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { color: var(--cream); font-family: "Fredoka", sans-serif; font-size: 1.15rem; margin-top: 12px; }
.lightbox button {
  position: absolute; background: rgba(255, 247, 232, 0.15); color: #fff; border: 0; cursor: pointer;
  font-size: 2.4rem; width: 56px; height: 56px; border-radius: 50%; line-height: 1;
}
.lightbox button:hover { background: rgba(255, 247, 232, 0.3); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- small screens */
@media (max-width: 900px) {
  .fair-grid { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-pic { order: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 3px solid var(--red);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-bottom: 1px solid #EADBC0; }
  .pillars, .duo, .fair-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .marquee::before { animation: none; }
  html { scroll-behavior: auto; }
}
