/* ===========================================================
   Gnomestead Farms — shared design system
   =========================================================== */

:root {
  /* surfaces */
  --hero-bg:    #F0DFC8;  /* exact logo background — lets lettering blend */
  --parchment:  #F5EEDF;
  --parchment-2:#EFE6D2;
  --panel:      #FBF7ED;  /* raised card surface */
  --night:      #26342A;  /* deep forest green */
  --night-2:    #1B2620;

  /* ink */
  --ink:       #2A1B10;
  --ink-soft:  #5C4A39;
  --ink-faint: rgba(42, 27, 16, 0.50);
  --line:      rgba(42, 27, 16, 0.12);

  /* brand accents */
  --red:       #B23A2E;   /* gnome hat */
  --red-deep:  #8E2A20;
  --sage:      #6E7B54;   /* gnome vest */
  --sage-deep: #55603F;
  --blue:      #4E7C9B;   /* gnome pants / winter sky */
  --gold:      #D99A2B;   /* bee */

  --max: 1140px;
  --radius: 16px;
  --shadow: 0 14px 34px -18px rgba(42, 27, 16, 0.40);
  --shadow-lg: 0 26px 60px -24px rgba(42, 27, 16, 0.52);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --script: "Caveat", "Segoe Script", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle parchment grain overlaid on the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.2rem; text-wrap: pretty; }
a { color: var(--red); text-decoration: none; }

/* ---------- shared layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }

.eyebrow {
  font-family: var(--script);
  font-size: 1.5rem;
  color: var(--red);
  line-height: 1;
  display: inline-block;
  transform: rotate(-2deg);
  margin-bottom: 0.4rem;
}
.section-head { text-align: center; margin-bottom: 2.8rem; }
.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}
.section-head .lead {
  max-width: 620px;
  margin: 0.9rem auto 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #FBF3E4;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.02rem;
  border: 1.5px solid var(--red);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 22px -12px rgba(178, 58, 46, 0.8);
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(142, 42, 32, 0.85); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(42, 27, 16, 0.28);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(42, 27, 16, 0.06); border-color: rgba(42,27,16,0.45); box-shadow: none; }
.btn--light { background: #FBF3E4; color: var(--ink); border-color: #FBF3E4; }
.btn--light:hover { background: #fff; border-color: #fff; }
.btn--ghost-light { background: transparent; color: #FBF3E4; border-color: rgba(251,243,228,0.5); box-shadow:none; }
.btn--ghost-light:hover { background: rgba(251,243,228,0.12); border-color: rgba(251,243,228,0.8); box-shadow:none; }

/* ---------- sprig divider ---------- */
.sprig { display: block; margin: 0 auto; width: 220px; max-width: 60%; color: var(--gold); }
.sprig svg { width: 100%; height: auto; display: block; }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.5rem;
  background: rgba(245, 238, 223, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.nav__brand img { height: 38px; width: auto; border-radius: 6px; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  color: var(--ink-soft); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.01em;
  position: relative; padding: 0.2rem 0;
}
.nav__links a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px; background: var(--red); transition: right 0.25s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }
.nav__social { display:flex; gap:0.5rem; }
.nav__social a { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; border:1.5px solid var(--line); color:var(--ink); transition: background .2s, transform .2s, border-color .2s; }
.nav__social a:hover { background: var(--red); color:#FBF3E4; border-color: var(--red); transform: translateY(-2px); }
.nav__social svg { width:18px; height:18px; }
@media (max-width: 820px) { .nav__links { display:none; } }

/* =========================================================
   HERO — shared shell + 3 directions (.hero--a / b / c)
   ========================================================= */
.hero { position: relative; overflow: hidden; }

/* ---- A: hand-painted farm sign ---- */
.hero--a {
  background:
    radial-gradient(120% 90% at 50% 0%, #F6E9D2 0%, var(--hero-bg) 55%, #E7D3B4 100%);
  text-align: center;
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem clamp(3.5rem, 6vw, 5.5rem);
}
.hero--a .hero__frame {
  max-width: 900px; margin: 0 auto;
  border: 2px solid rgba(42,27,16,0.16);
  border-radius: 26px;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3rem) clamp(2.2rem,4vw,3rem);
  position: relative;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(255,255,255,0.35), transparent 70%);
  box-shadow: inset 0 0 0 6px rgba(255,255,255,0.25);
}
.hero--a .hero__corner { position:absolute; width:38px; height:38px; color: var(--gold); opacity:0.9; }
.hero--a .hero__corner.tl { top:14px; left:14px; }
.hero--a .hero__corner.tr { top:14px; right:14px; transform: scaleX(-1); }
.hero--a .hero__corner.bl { bottom:14px; left:14px; transform: scaleY(-1); }
.hero--a .hero__corner.br { bottom:14px; right:14px; transform: scale(-1,-1); }
.hero--a .hero__logo { width: min(560px, 92%); height:auto; display:block; margin: 0 auto 0.6rem; }
.hero--a .hero__tag { font-family: var(--serif); font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-style: italic; font-weight: 500; margin: 0.4rem auto 0.8rem; max-width: 640px; }
.hero--a .hero__sub { color: var(--ink-soft); font-size: 1.12rem; max-width: 580px; margin: 0 auto 1.7rem; }

/* ---- B: field journal split ---- */
.hero--b {
  background: linear-gradient(180deg, var(--hero-bg) 0%, var(--hero-bg) 58%, #E8D5B8 100%);
  padding: clamp(2rem,4vw,3rem) 0 clamp(3rem,5vw,4.5rem);
}
.hero--b .hero__grid {
  max-width: var(--max); margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero--b .hero__logo { width: 250px; max-width: 70%; display:block; margin-bottom: 1.4rem; }
.hero--b .hero__tag { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 600; line-height: 1.04; }
.hero--b .hero__tag em { font-style: italic; color: var(--red); }
.hero--b .hero__sub { color: var(--ink-soft); font-size: 1.14rem; max-width: 460px; margin: 1.1rem 0 1.8rem; }
.hero--b .hero__cta { display:flex; gap:0.8rem; flex-wrap:wrap; }
.hero--b .hero__photo {
  position: relative; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.4deg);
  border: 8px solid #fff;
  aspect-ratio: 4/5;
}
.hero--b .hero__photo img { width:100%; height:100%; object-fit: cover; display:block; }
.hero--b .hero__tape {
  position:absolute; bottom:14px; left:14px; right:14px;
  font-family: var(--script); font-size: 1.5rem; color:#fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6); transform: rotate(-1.4deg); text-align:center;
}
@media (max-width: 820px) {
  .hero--b .hero__grid { grid-template-columns: 1fr; text-align:center; }
  .hero--b .hero__logo { margin: 0 auto 1.2rem; }
  .hero--b .hero__sub { margin-left:auto; margin-right:auto; }
  .hero--b .hero__cta { justify-content:center; }
  .hero--b .hero__photo { max-width: 380px; margin: 0.5rem auto 0; }
}

/* ---- C: twilight homestead ---- */
.hero--c {
  background: radial-gradient(120% 120% at 50% 10%, #33463a 0%, var(--night) 45%, var(--night-2) 100%);
  color: #F4ECDC; text-align:center;
  padding: clamp(3rem,6vw,5rem) 1.5rem clamp(3.5rem,6vw,5.5rem);
}
.hero--c .hero__inner { max-width: 820px; margin: 0 auto; position: relative; z-index:2; }
.hero--c .hero__art { width: min(280px, 60%); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7); margin: 0 auto 1.6rem; display:block; }
.hero--c .hero__logo { width: min(520px, 92%); display:block; margin: 0 auto 0.5rem; border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(0,0,0,0.55); }
.hero--c .hero__tag { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.5rem,3.4vw,2.3rem); color:#F4ECDC; margin: 0.2rem auto 0.8rem; }
.hero--c .hero__sub { color: rgba(244,236,220,0.82); font-size: 1.12rem; max-width: 560px; margin: 0 auto 1.8rem; }
.hero--c .hero__cta { display:flex; gap:0.8rem; justify-content:center; flex-wrap:wrap; }
.hero--c .firefly { position:absolute; width:6px; height:6px; border-radius:50%; background: var(--gold); filter: blur(0.5px); box-shadow: 0 0 10px 2px rgba(217,154,43,0.8); opacity:0; animation: fly 6s ease-in-out infinite; z-index:1; }
@keyframes fly { 0%,100%{ opacity:0; transform: translateY(8px) scale(0.6);} 50%{ opacity:0.9; transform: translateY(-10px) scale(1);} }

/* ---- drifting bee + ladybug motifs in hero A/B ---- */
.bug { position:absolute; z-index:3; }
.bee  { width:46px; animation: drift 11s ease-in-out infinite; }
.ladybug { width:34px; animation: drift2 13s ease-in-out infinite; }
@keyframes drift  { 0%,100%{ transform: translate(0,0) rotate(-4deg);} 33%{transform:translate(20px,-14px) rotate(6deg);} 66%{transform:translate(-12px,10px) rotate(-2deg);} }
@keyframes drift2 { 0%,100%{ transform: translate(0,0) rotate(3deg);} 50%{transform:translate(-16px,-12px) rotate(-5deg);} }

@media (prefers-reduced-motion: reduce) {
  .bug, .firefly { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   STORY
   ========================================================= */
.story { background: var(--parchment); }
.story__grid { display:grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem,5vw,4rem); align-items:center; }
.story__media { position: relative; }
.story__media img { width:100%; border-radius: var(--radius); box-shadow: var(--shadow); display:block; }
.story__media .sticker {
  position:absolute; bottom:-22px; right:-14px; width: 120px; transform: rotate(6deg);
  filter: drop-shadow(0 8px 14px rgba(42,27,16,0.25));
}
.story__body p { color: var(--ink-soft); }
.story__body p:first-of-type { font-size: 1.18rem; color: var(--ink); }
.pullquote {
  margin: 2rem 0 0; padding: 1.4rem 1.6rem; border-left: 4px solid var(--red);
  background: var(--parchment-2); border-radius: 0 14px 14px 0;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height:1.4; color: var(--ink);
}
@media (max-width:820px){ .story__grid{ grid-template-columns:1fr; } .story__media{ max-width:460px; margin:0 auto; } }

/* =========================================================
   WHAT WE'RE BUILDING — cards
   ========================================================= */
.building { background: var(--parchment-2); }
.cards { display:grid; grid-template-columns: repeat(4,1fr); gap: 1.4rem; }
.card {
  background: var(--panel); border:1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.45rem; transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: 0 2px 0 rgba(255,255,255,0.6) inset;
  position: relative;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__icon { width:52px; height:52px; border-radius:14px; display:grid; place-items:center; margin-bottom:1rem; background: rgba(110,123,84,0.14); color: var(--sage-deep); }
.card:nth-child(2) .card__icon{ background: rgba(178,58,46,0.12); color: var(--red); }
.card:nth-child(3) .card__icon{ background: rgba(78,124,155,0.14); color: var(--blue); }
.card:nth-child(4) .card__icon{ background: rgba(217,154,43,0.16); color: #b07d18; }
.card__icon svg{ width:28px; height:28px; }
.card h3 { font-size: 1.24rem; margin-bottom: 0.4rem; }
.card p { margin:0; font-size: 0.98rem; color: var(--ink-soft); line-height:1.55; }
@media (max-width:960px){ .cards{ grid-template-columns: repeat(2,1fr);} }
@media (max-width:520px){ .cards{ grid-template-columns: 1fr;} }

/* =========================================================
   RIGHT NOW — field-notes ledger
   ========================================================= */
.rightnow { background: var(--parchment); }
.ledger { display:grid; grid-template-columns: repeat(3,1fr); gap:1.5rem; }
.note {
  background: var(--panel); border:1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; position:relative;
  box-shadow: var(--shadow);
}
.note::before { content:""; position:absolute; left:0; top:18px; bottom:18px; width:4px; border-radius:4px; background: var(--accent, var(--sage)); }
.note--animals { --accent: var(--red); }
.note--land    { --accent: var(--sage); }
.note--focus   { --accent: var(--blue); }
.note__kicker { font-family: var(--script); font-size:1.35rem; color: var(--accent, var(--sage)); line-height:1; }
.note h3 { font-size:1.2rem; margin: 0.1rem 0 0.9rem; }
.note ul { list-style:none; margin:0; padding:0; }
.note li { display:flex; gap:0.6rem; align-items:flex-start; padding:0.4rem 0; font-size:0.98rem; color:var(--ink-soft); border-top:1px dashed var(--line); }
.note li:first-child { border-top:none; }
.note li::before { content:""; flex:none; width:8px; height:8px; margin-top:0.5rem; border-radius:50%; background:var(--accent,var(--sage)); }
@media (max-width:900px){ .ledger{ grid-template-columns:1fr; } }

/* =========================================================
   GALLERY — staggered
   ========================================================= */
.gallery-sec { background: var(--parchment-2); }
.masonry { columns: 3; column-gap: 1.3rem; }
.masonry figure {
  margin:0 0 1.3rem; break-inside: avoid; background: var(--panel);
  border-radius: 14px; overflow:hidden; box-shadow: var(--shadow);
  border:6px solid #fff; transition: transform .25s ease, box-shadow .25s ease;
}
.masonry figure:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: var(--shadow-lg); }
.masonry img { width:100%; display:block; }
.masonry figcaption { padding:0.7rem 0.9rem 0.85rem; font-family: var(--script); font-size:1.25rem; color: var(--ink-soft); text-align:center; line-height:1.1; }
@media (max-width:900px){ .masonry{ columns:2; } }
@media (max-width:560px){ .masonry{ columns:1; } }

/* =========================================================
   FUTURE — dark forest section
   ========================================================= */
.future { background: radial-gradient(130% 120% at 50% 0%, #33463a, var(--night) 55%, var(--night-2)); color:#F4ECDC; }
.future .section-head h2 { color:#F8F1E2; }
.future .eyebrow { color: var(--gold); }
.future .lead { color: rgba(244,236,220,0.8); }
.future__row { display:grid; grid-template-columns: repeat(4,1fr); gap:1.2rem; margin-top:0.5rem; }
.future__item { padding:1.4rem 1.3rem; border-radius:14px; background: rgba(255,255,255,0.05); border:1px solid rgba(244,236,220,0.14); }
.future__item h3 { color:#F8F1E2; font-size:1.12rem; margin-bottom:0.4rem; }
.future__item p { margin:0; color: rgba(244,236,220,0.72); font-size:0.96rem; line-height:1.5; }
.future__note { text-align:center; max-width:680px; margin: 2.4rem auto 0; font-family: var(--serif); font-style:italic; font-size:1.25rem; color:#F4ECDC; }
@media (max-width:900px){ .future__row{ grid-template-columns: repeat(2,1fr);} }
@media (max-width:480px){ .future__row{ grid-template-columns: 1fr;} }

/* =========================================================
   CONNECT
   ========================================================= */
.connect { background: var(--parchment); text-align:center; }
.connect__card {
  max-width: 760px; margin:0 auto; background: var(--panel);
  border:1px solid var(--line); border-radius: 22px; padding: clamp(2.2rem,5vw,3.4rem);
  box-shadow: var(--shadow); position:relative; overflow:hidden;
}
.connect__card .gnome-mini { width:96px; margin: 0 auto 0.6rem; display:block; }
.connect__card h2 { font-size: clamp(1.9rem,3.6vw,2.6rem); }
.connect__card p { color: var(--ink-soft); max-width:520px; margin:0.8rem auto 1.8rem; }
.connect__btns { display:flex; gap:0.9rem; justify-content:center; flex-wrap:wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.foot { background: #E7D8BC; border-top:1px solid var(--line); color: var(--ink-soft); }
.foot__inner { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; flex-wrap:wrap; padding: 2.2rem 1.5rem 1.4rem; max-width: var(--max); margin:0 auto; }
.foot__brand { display:flex; align-items:center; gap:0.7rem; }
.foot__brand img { height:46px; border-radius:8px; }
.foot__brand b { font-family: var(--serif); font-size:1.05rem; color:var(--ink); display:block; white-space:nowrap; line-height:1.25; margin-bottom:0.1rem; }
.foot__brand span { font-size:0.9rem; }
.foot__links { display:flex; gap:1.4rem; }
.foot__links a { color: var(--ink-soft); font-weight:600; font-size:0.95rem; }
.foot__links a:hover { color: var(--red); }
.foot__legal { max-width:var(--max); margin:0 auto; padding: 0 1.5rem 1.8rem; color:var(--ink-faint); text-align:center; display:flex; flex-direction:column; gap:0.3rem; }
.foot__legal-copy { font-size:0.82rem; color:var(--ink-soft); }
.foot__legal-sep { font-size:0.74rem; color:var(--ink-faint); }
.foot__legal a { color: var(--ink-faint); text-decoration: underline; }

/* =========================================================
   scroll reveal
   ========================================================= */
/* only hide when JS is confirmed (html.js) so no-JS users see everything */
html.js .reveal { opacity:0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ html.js .reveal{ opacity:1 !important; transform:none !important; } }
