:root {
  --cream: #f3ead8;
  --foam: #faf4ea;
  --parchment: #e6d4b8;
  --tan: #c9a27a;
  --gold: #d4a574;
  --saddle: #8b5a36;
  --leather: #6b3e26;
  --chocolate: #3d2618;
  --mane: #23160f;
  --dust: #a89478;
  --olive: #6d7358;
  --ring: #b8895a;
  --script: "Caveat", cursive;
  --stamp: "Rye", serif;
  --fuzzy: "Fuzzy Bubbles", "Quicksand", sans-serif;
  --serif: "Libre Baskerville", Georgia, serif;
  --ui: "Quicksand", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--saddle) var(--parchment);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb {
  background: var(--saddle);
  border-radius: 99px;
}

body {
  font-family: var(--serif);
  color: var(--chocolate);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(212, 165, 116, 0.28), transparent 55%),
    radial-gradient(900px 600px at 100% 8%, rgba(109, 115, 88, 0.12), transparent 50%),
    linear-gradient(180deg, var(--foam) 0%, var(--cream) 40%, #eadcc4 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }

::selection {
  background: var(--saddle);
  color: var(--foam);
}

.grain,
#motes,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grain {
  z-index: 40;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

#motes { z-index: 3; }

.vignette {
  z-index: 4;
  box-shadow: inset 0 0 180px 40px rgba(35, 22, 15, 0.16);
}

.scroll-heat {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 60;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--gold), var(--saddle));
}

.script { font-family: var(--script); font-weight: 600; }
.stamp { font-family: var(--stamp); }

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background: var(--cream);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 7px;
  background: conic-gradient(from 180deg, var(--gold), var(--saddle), var(--chocolate), var(--gold));
  animation: spin 2.8s linear infinite;
}

.loader-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  animation: spin 2.8s linear infinite reverse;
}

.loader .script {
  font-size: 2rem;
  color: var(--saddle);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 6vw;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

.nav.scrolled {
  padding: 10px 6vw;
  background: rgba(243, 234, 216, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(61, 38, 24, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px var(--ring);
}

.nav-brand em {
  display: block;
  font-family: var(--script);
  font-size: 1.05rem;
  line-height: 1;
  color: var(--saddle);
}

.nav-brand strong {
  font-family: var(--stamp);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--tan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--chocolate);
  color: var(--foam);
}

.icon-btn img {
  width: 16px;
  height: 16px;
  filter: invert(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--chocolate);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui);
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-saddle {
  background: linear-gradient(180deg, #a86d42, var(--saddle));
  color: var(--foam);
  box-shadow: 0 10px 22px rgba(107, 62, 38, 0.28);
}

.btn-ghost {
  border: 1.5px solid var(--saddle);
  color: var(--chocolate);
  background: rgba(250, 244, 234, 0.5);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(107, 62, 38, 0.22);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 6vw 120px;
  display: flex;
  align-items: center;
}

.sun-haze {
  position: absolute;
  width: 640px;
  height: 640px;
  right: 4vw;
  top: 12vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.42), rgba(243, 234, 216, 0) 68%);
  animation: pulse 7s ease-in-out infinite;
  pointer-events: none;
}

.wheat {
  position: absolute;
  bottom: 70px;
  width: 70px;
  height: 220px;
  color: var(--olive);
  opacity: 0.42;
  pointer-events: none;
}

.wheat.left { left: 2vw; }
.wheat.right { right: 2vw; }
.wheat .sway {
  transform-origin: bottom center;
  animation: sway 5s ease-in-out infinite;
}

.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--ui);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--olive);
  margin-bottom: 10px;
}

h1 .line {
  display: block;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--saddle);
  line-height: 0.8;
}

h1 .stamp {
  display: block;
  font-size: clamp(4.2rem, 9vw, 8rem);
  line-height: 0.9;
  color: var(--mane);
  text-shadow: 0 8px 0 rgba(184, 137, 90, 0.18);
}

.lede {
  margin: 22px 0 26px;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.ticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.chip {
  font-family: var(--ui);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(139, 90, 54, 0.18);
  padding: 8px 14px;
  border-radius: 999px;
}

.chip.sol {
  padding: 4px 12px;
  background: var(--mane);
}

.chip.sol img { height: 18px; width: auto; }

.ca-plaque {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 22px;
  max-width: 540px;
  background:
    linear-gradient(180deg, #d8b48a, #b8895a);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 10px 24px rgba(61, 38, 24, 0.16);
}

.ca-label {
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mane);
}

#caText {
  flex: 1;
  font-family: var(--ui);
  font-size: 0.86rem;
  color: var(--chocolate);
  word-break: break-all;
}

.copy-btn {
  font-family: var(--ui);
  font-weight: 700;
  background: var(--chocolate);
  color: var(--foam);
  border-radius: 999px;
  padding: 7px 12px;
}

.copy-btn.copied { background: var(--olive); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-portrait-wrap {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.portrait-glow {
  position: absolute;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 122, 0.55), transparent 70%);
  filter: blur(18px);
  animation: pulse 6s ease-in-out infinite;
}

.portrait-frame {
  position: relative;
  width: min(460px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 14px;
  background:
    radial-gradient(circle at 30% 25%, #e6c89a, #8b5a36 55%, #3d2618);
  box-shadow:
    0 30px 60px rgba(35, 22, 15, 0.28),
    inset 0 0 0 6px rgba(184, 137, 90, 0.45);
  transition: transform 0.2s ease;
  transform-style: preserve-3d;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  animation: float 6.5s ease-in-out infinite;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  mask-image: radial-gradient(circle at 50% 46%, #000 58%, transparent 78%);
}

.hee-lines {
  position: absolute;
  right: 6%;
  top: 18%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hee-lines i {
  display: block;
  height: 2px;
  background: var(--saddle);
  border-radius: 2px;
  opacity: 0.55;
  animation: hee 2.8s ease-in-out infinite;
}

.hee-lines i:nth-child(1) { width: 26px; }
.hee-lines i:nth-child(2) { width: 38px; animation-delay: 0.15s; }
.hee-lines i:nth-child(3) { width: 20px; animation-delay: 0.3s; }

.portrait-caption {
  margin-top: 16px;
  font-size: 1.55rem;
  color: var(--saddle);
}

.fence {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 90px;
  stroke: var(--leather);
  stroke-width: 6;
  fill: none;
  opacity: 0.28;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head .script {
  font-size: 1.8rem;
  color: var(--saddle);
}

.section-head h2 {
  font-family: var(--fuzzy);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--mane);
}

.about,
.howto,
.chart {
  padding: 110px 6vw;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.about-photo {
  position: relative;
}

.about-photo img {
  width: 100%;
  border-radius: 28px 28px 80px 28px;
  object-fit: cover;
  box-shadow: 24px 24px 0 var(--parchment), 0 30px 50px rgba(61, 38, 24, 0.16);
}

.about-photo figcaption {
  margin-top: 16px;
  font-family: var(--script);
  font-size: 1.45rem;
  color: var(--saddle);
}

.manifesto {
  font-size: 1.06rem;
  line-height: 1.85;
  margin-bottom: 22px;
}

.manifesto em { font-family: var(--script); font-size: 1.4rem; color: var(--saddle); }
.manifesto.close { font-family: var(--fuzzy); font-size: 1.25rem; }

.no-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 18px;
  margin-top: 56px;
}

.no-list li {
  position: relative;
  min-width: 150px;
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, #d7b48c, #b07d4e);
  border-radius: 6px 6px 10px 10px;
  box-shadow: 0 10px 0 var(--leather), 0 16px 24px rgba(61, 38, 24, 0.12);
  text-align: center;
  font-family: var(--ui);
  font-weight: 700;
}

.no-list li::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 16px;
  background: #8a6a3e;
}

.no-list span {
  position: relative;
}

.no-list span::after {
  content: "";
  position: absolute;
  left: -4%;
  top: 52%;
  width: 108%;
  height: 2px;
  background: var(--mane);
  transform: rotate(-8deg);
}

.trail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}

.trail::before {
  content: "";
  position: absolute;
  top: 46px;
  left: 8%;
  right: 8%;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--tan) 0 16px, transparent 16px 26px);
  opacity: 0.55;
}

.stall {
  position: relative;
  background: rgba(250, 244, 234, 0.72);
  border: 1px solid rgba(139, 90, 54, 0.16);
  border-radius: 22px;
  padding: 28px 22px 26px;
  box-shadow: 0 18px 36px rgba(61, 38, 24, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stall:hover {
  transform: translateY(-8px) rotate(-0.6deg);
  box-shadow: 0 24px 40px rgba(61, 38, 24, 0.14);
}

.hoof {
  font-family: var(--stamp);
  color: var(--saddle);
  font-size: 1.1rem;
}

.stall-icon {
  width: 64px;
  height: 64px;
  margin: 14px 0 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--chocolate);
  overflow: hidden;
}

.stall-icon img { width: 36px; height: 36px; object-fit: contain; }
.stall:last-child .stall-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stall-icon.pump { background: #1d3934; }
.stall-icon.sol-mark { background: #111; padding: 8px; }
.stall-icon.sol-mark img { width: 46px; height: auto; }

.stall h3 {
  font-family: var(--fuzzy);
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.stall p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #5a4332;
}

.stall p a {
  color: var(--saddle);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.howto-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 42px;
}

.barn {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border: 12px solid #6b3e26;
  border-radius: 18px;
  background: #3d2618;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(35, 22, 15, 0.25);
}

.barn-sill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #5a3320;
  color: var(--foam);
  font-family: var(--ui);
  font-weight: 600;
}

.barn-sill img { width: 18px; height: 18px; }

.barn-window {
  height: 640px;
  background: #f3ead8;
}

.barn-window iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.chart-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  padding: 32px;
}

.chart-placeholder img {
  width: 120px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--ring);
}

.chart-placeholder p {
  font-family: var(--script);
  font-size: 1.8rem;
  color: var(--saddle);
}

.shutter {
  position: absolute;
  top: 44px;
  bottom: 0;
  width: 50%;
  background:
    repeating-linear-gradient(90deg, #7a4a2c 0 18px, #623820 18px 20px);
  z-index: 2;
  transition: transform 1.1s cubic-bezier(0.65, 0.05, 0.2, 1);
}

.shutter.left { left: 0; transform-origin: left; }
.shutter.right { right: 0; transform-origin: right; }
.barn.open .shutter.left { transform: translateX(-102%); }
.barn.open .shutter.right { transform: translateX(102%); }

.join { padding: 0 0 80px; }

.join-banner {
  position: relative;
  min-height: min(72vh, 760px);
  overflow: hidden;
}

.join-banner img {
  width: 100%;
  height: min(72vh, 760px);
  object-fit: cover;
  object-position: center;
  animation: ken 22s ease-in-out infinite alternate;
}

.join-dock {
  width: min(1100px, 88vw);
  margin: -64px auto 0;
  position: relative;
  z-index: 2;
  padding: 36px 36px 32px;
  background: rgba(250, 244, 234, 0.94);
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(35, 22, 15, 0.16);
}

.join-copy { text-align: center; margin-bottom: 28px; }
.join-copy h2 {
  font-family: var(--fuzzy);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--mane);
}
.join-copy p:last-child {
  max-width: 40rem;
  margin: 12px auto 0;
  line-height: 1.7;
}

.join-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dock-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 12px;
  border-radius: 18px;
  background: var(--foam);
  border: 1px solid rgba(139, 90, 54, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font-family: var(--ui);
}

.dock-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(61, 38, 24, 0.12);
}

.dock-card img { width: 28px; height: 28px; object-fit: contain; }
.dock-card img[src*="pumpswap"] {
  width: 36px;
  height: 36px;
  padding: 5px;
  background: #1d3934;
  border-radius: 10px;
}
.dock-card span { font-weight: 700; }
.dock-card small { color: var(--dust); }

.footer {
  padding: 36px 6vw 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    repeating-linear-gradient(90deg, #3d2618 0 42px, #4a2e1c 42px 44px);
  color: var(--foam);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-brand em {
  display: block;
  font-family: var(--script);
  font-size: 1rem;
}

.footer-brand strong { font-family: var(--stamp); }

.footer p { font-family: var(--ui); opacity: 0.8; }

.footer-icons { display: flex; gap: 10px; }

.footer-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(250, 244, 234, 0.12);
  display: grid;
  place-items: center;
}

.footer-icons img { width: 18px; height: 18px; }
.footer-icons a img[src*="x"] { filter: invert(1); width: 15px; height: 15px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotateY(var(--tilt-y)) rotateX(var(--tilt-x)); }
  50% { transform: translateY(-12px) rotateY(var(--tilt-y)) rotateX(var(--tilt-x)); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}

@keyframes hee {
  0%, 70%, 100% { transform: scaleX(0.4); opacity: 0.15; }
  78% { transform: scaleX(1); opacity: 0.7; }
}

@keyframes ken {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .trail,
  .join-links { grid-template-columns: 1fr; }

  .trail::before { display: none; }
  .hero { padding-top: 120px; }
  .wheat { display: none; }
  .barn-window { height: 520px; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    padding: 18px;
    background: var(--foam);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(35, 22, 15, 0.16);
  }

  .nav-links.open { display: flex; }
  .menu-toggle { display: flex; }
  .nav .btn { display: none; }
  h1 .stamp { font-size: 3.4rem; }
  .join-dock { padding: 28px 18px; margin-top: -40px; }
  .barn-window { height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .grain, #motes { display: none; }
}
