@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --paper: #f4efde;
  --ink: #252720;
  --moss: #4c6a47;
  --deep-moss: #1f3b2a;
  --acid: #d7e85d;
  --yellow: #f2d95c;
  --pink: #efb8c8;
  --blue: #bedee0;
  --rust: #b85f44;
  --line: rgba(37, 39, 32, 0.32);
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 20px 60px rgba(55, 59, 43, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(215,232,93,.22), transparent 26rem),
    radial-gradient(circle at 86% 34%, rgba(190,222,224,.38), transparent 28rem),
    var(--paper);
  font-family: var(--mono);
  overflow-x: hidden;
}

body::selection { background: var(--deep-moss); color: var(--paper); }

a { color: inherit; }
button, input { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  z-index: 50;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.sky-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .2;
  pointer-events: none;
  z-index: -1;
}
.sky-glow-a { background: var(--acid); top: 10%; left: -16rem; }
.sky-glow-b { background: var(--blue); right: -12rem; bottom: 6%; }

.site-header {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  text-decoration: none;
  font-size: clamp(.78rem, 2vw, 1rem);
  letter-spacing: -0.04em;
  font-weight: 500;
}
.wordmark .dot { color: var(--rust); padding: 0 .08em; }

nav { display: flex; align-items: center; gap: 18px; }
nav a {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  font-size: .75rem;
}
.sound-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244,239,222,.56);
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
}

main, footer {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
  padding: 70px 0 90px;
}

.kicker, .eyebrow, .margin-note {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .68rem;
  color: var(--moss);
  font-weight: 500;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(4.2rem, 9vw, 8.8rem);
  line-height: .82;
  font-weight: 400;
  letter-spacing: -.055em;
  margin: 26px 0 30px;
  max-width: 8ch;
}

.growing-word {
  color: var(--deep-moss);
  font-style: italic;
  position: relative;
  display: inline-block;
  transition: opacity .2s ease, transform .2s ease;
}
.growing-word::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 0;
  bottom: -.08em;
  height: .07em;
  background: var(--acid);
  border-radius: 50%;
  transform: rotate(-1.5deg);
  z-index: -1;
}

.intro {
  max-width: 640px;
  font-size: clamp(.88rem, 1.8vw, 1.02rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: 4px 5px 0 var(--ink); }
.button-primary { background: var(--deep-moss); color: var(--paper); }
.button-ghost { background: transparent; color: var(--ink); }

.terrarium {
  aspect-ratio: .82;
  max-width: 470px;
  width: 100%;
  justify-self: center;
  position: relative;
  overflow: hidden;
  border-radius: 48% 48% 18% 18% / 14% 14% 9% 9%;
  border: 1px solid rgba(31,59,42,.5);
  background:
    linear-gradient(to bottom, rgba(190,222,224,.68) 0 62%, #886247 62% 65%, #563c2f 65% 100%);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.16), var(--shadow);
  cursor: crosshair;
}

.terrarium-glass {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(255,255,255,.2), transparent 23%),
    linear-gradient(90deg, transparent 0 78%, rgba(255,255,255,.15) 79%, transparent 84%);
  pointer-events: none;
  z-index: 10;
}

.sun {
  position: absolute; width: 84px; height: 84px; border-radius: 50%;
  background: var(--yellow); top: 12%; right: 16%;
  box-shadow: 0 0 0 14px rgba(242,217,92,.16), 0 0 0 28px rgba(242,217,92,.08);
  animation: breathe 5s ease-in-out infinite;
}

.cloud {
  position: absolute;
  width: 96px; height: 18px;
  background: rgba(244,239,222,.76);
  border-radius: 999px;
  filter: blur(.2px);
}
.cloud::before, .cloud::after {
  content:""; position:absolute; bottom:0; background:inherit; border-radius:50%;
}
.cloud::before { width: 34px; height: 34px; left:18px; }
.cloud::after { width: 46px; height: 46px; right:12px; }
.cloud-one { top: 20%; left: -100px; animation: drift 20s linear infinite; }
.cloud-two { top: 31%; left: -120px; transform: scale(.68); animation: drift 27s 7s linear infinite; }

.hill {
  position: absolute;
  bottom: 34%;
  width: 120%;
  height: 26%;
  border-radius: 50% 50% 0 0;
}
.hill-back { left: -48%; background: #78906a; transform: rotate(8deg); }
.hill-front { right: -58%; bottom: 30%; background: #466348; transform: rotate(-11deg); }

.plant {
  position: absolute;
  bottom: 12%;
  width: 60px;
  height: 180px;
  transform-origin: bottom center;
  animation: sway 4s ease-in-out infinite;
}
.plant-a { left: 18%; height: 170px; animation-delay: -.8s; }
.plant-b { left: 45%; height: 230px; animation-delay: -2s; }
.plant-c { right: 11%; height: 145px; animation-delay: -1.4s; }

.stem {
  position:absolute; left:50%; bottom:0; width:4px; height:86%;
  background: var(--deep-moss); border-radius: 999px;
  transform: translateX(-50%);
}
.leaf {
  position:absolute; width:34px; height:17px; background: var(--moss);
  border-radius: 100% 0 100% 0;
  bottom:42%;
}
.leaf-l { left:1px; transform: rotate(20deg); }
.leaf-r { right:1px; transform: scaleX(-1) rotate(20deg); bottom:60%; }
.bud {
  position:absolute; top:0; left:50%; width:31px; height:31px; background:var(--pink);
  border-radius: 50% 50% 42% 42%; transform:translateX(-50%);
  box-shadow: -13px 4px 0 -4px var(--rust), 13px 4px 0 -4px var(--yellow);
}

.pixel-bug {
  position: absolute;
  color: var(--paper);
  font-size: 18px;
  z-index: 4;
}
.bug-one { top: 40%; left: 24%; animation: bug 8s ease-in-out infinite; }
.bug-two { top: 50%; right: 24%; animation: bug 11s -2s ease-in-out infinite reverse; }
.terrarium-note {
  position:absolute; bottom:18px; left:50%; transform:translateX(-50%);
  color:rgba(244,239,222,.78); font-size:.62rem; z-index:5;
  white-space:nowrap;
}

.manifesto {
  margin: 30px 0 150px;
  padding: 55px 0 45px 13%;
  display: grid;
  grid-template-columns: .42fr 1.4fr 1fr;
  gap: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifesto blockquote {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.03em;
  margin: 0;
}
.manifesto > p:last-child { line-height:1.8; align-self:end; font-size:.82rem; }

.section-heading {
  display:grid;
  grid-template-columns: .5fr 1.2fr 1fr;
  gap: 30px;
  align-items:end;
  margin-bottom: 40px;
}
.section-heading h2, .seed-lab h2, .compost h2 {
  font-family:var(--serif);
  font-weight:400;
  font-size:clamp(2.5rem, 5vw, 5rem);
  line-height:.95;
  letter-spacing:-.035em;
  margin:0;
}
.section-heading > p:last-child { font-size:.78rem; line-height:1.7; }

.garden-grid {
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.garden-card {
  min-height: 280px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 22px;
  background: rgba(244,239,222,.76);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition: transform .2s ease, box-shadow .2s ease;
  transform-style: preserve-3d;
}
.garden-card:focus-visible { outline: 3px solid var(--rust); outline-offset:4px; }
.card-large { grid-column: span 7; min-height: 430px; }
.card-tall { grid-column: span 5; min-height: 430px; }
.card-small { grid-column: span 4; }
.card-wide { grid-column: span 8; }
.card-medium { grid-column: 3 / span 8; min-height: 340px; }
.card-dark { background: var(--deep-moss); color: var(--paper); border-color: var(--deep-moss); }
.card-yellow { background: var(--yellow); }
.card-pink { background: var(--pink); }

.card-topline {
  display:flex; justify-content:space-between; text-transform:uppercase;
  letter-spacing:.1em; font-size:.58rem; opacity:.76;
}
.garden-card h3 {
  font-family:var(--serif); font-size:clamp(2rem, 3.9vw, 4rem);
  font-weight:400; line-height:.95; letter-spacing:-.03em; margin:16px 0;
}
.garden-card p, .garden-card li { font-size:.76rem; line-height:1.75; }
.card-symbol { font-size:3rem !important; margin:0; }
.card-foot { opacity:.58; margin:0; }
.ascii-flower pre { font: inherit; font-size:clamp(.75rem, 1.6vw, 1rem); line-height:1.1; margin:30px 0 0; }
.worm { font-size:4rem; transform:rotate(-12deg); align-self:flex-end; }
.microcopy { max-width:50ch; }
.boundary-lines { display:grid; grid-template-columns:repeat(4,1fr); height:92px; gap:9px; align-items:end; }
.boundary-lines i { display:block; border:1px solid currentColor; border-radius:50% 50% 0 0; height:var(--h,50%); }
.boundary-lines i:nth-child(1){--h:58%}.boundary-lines i:nth-child(2){--h:88%}.boundary-lines i:nth-child(3){--h:43%}.boundary-lines i:nth-child(4){--h:72%}
.garden-card ol { padding-left:1.4em; columns:2; column-gap:3rem; }

.seed-lab {
  margin: 150px 0 0;
  border: 1px solid var(--ink);
  padding: clamp(26px, 5vw, 60px);
  background: var(--blue);
  display:grid;
  grid-template-columns: .9fr 1.1fr;
  gap:50px;
}
.seed-lab > div:first-child > p:last-child { line-height:1.75; max-width:55ch; font-size:.8rem; }
.seed-form { align-self:center; }
.seed-form label { display:block; margin-bottom:12px; font-size:.67rem; text-transform:uppercase; letter-spacing:.08em; }
.seed-row { display:flex; gap:10px; }
.seed-row input {
  width:100%; border:1px solid var(--ink); background:rgba(244,239,222,.8);
  min-height:48px; padding:0 14px; border-radius:0; color:var(--ink);
}
.seed-row input:focus { outline:3px solid rgba(31,59,42,.22); outline-offset:2px; }
.seed-patch { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:12px; min-height:10px; }
.planted-seed {
  position:relative; max-width:330px; padding:20px 38px 18px 18px;
  background:var(--paper); border:1px solid var(--ink); box-shadow:5px 5px 0 rgba(37,39,32,.18);
  animation: sproutIn .45s cubic-bezier(.2,.7,.2,1);
}
.planted-seed .sprout { display:block; font-size:2rem; color:var(--moss); transform:rotate(-12deg); }
.planted-seed p { margin:4px 0 0; font-family:var(--serif); font-size:1.35rem; line-height:1.1; }
.planted-seed button { position:absolute; top:7px; right:8px; border:0; background:none; cursor:pointer; font-size:1.2rem; }

.compost {
  margin: 100px 0;
  background:#76533f;
  color:var(--paper);
  padding:clamp(28px,5vw,60px);
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:50px;
}
.compost .eyebrow { color:var(--acid); }
.compost-copy > p:last-child { font-size:.8rem; line-height:1.75; max-width:48ch; }
.compost-playground { display:grid; grid-template-columns:1fr .9fr; gap:20px; align-items:center; }
.scraps { display:flex; flex-wrap:wrap; gap:10px; align-content:center; }
.scrap {
  border:1px solid var(--paper); color:var(--paper); background:transparent;
  padding:10px 12px; cursor:grab; transform:rotate(var(--r,0deg));
}
.scrap:nth-child(1){--r:-2deg}.scrap:nth-child(2){--r:1.5deg}.scrap:nth-child(3){--r:-1deg}.scrap:nth-child(4){--r:2deg}
.scrap.composted { animation: composted .45s forwards; pointer-events:none; }
.heap {
  aspect-ratio:1.35; border-radius:50% 50% 18% 18% / 60% 60% 22% 22%;
  background:#2b3323; position:relative; display:grid; place-items:center;
  border:1px solid rgba(244,239,222,.5);
  transition:transform .2s ease, background .2s ease;
}
.heap.over { transform:scale(1.04); background:#36442a; }
.heap-label { position:absolute; top:16px; opacity:.55; font-size:.65rem; }
.heap-face { font-size:3.5rem; transform:rotate(5deg); color:var(--acid); }

.closing {
  min-height:70vh; display:grid; place-items:center; align-content:center; text-align:center;
  gap:24px;
}
.closing-mark { font-size:6rem; color:var(--moss); animation:spinSlow 18s linear infinite; }
.closing p { font-family:var(--serif); font-size:clamp(2.2rem,5vw,4.8rem); line-height:.98; margin:0; }
.link-button { background:none; border:0; text-decoration:underline; text-underline-offset:4px; cursor:pointer; color:inherit; }

footer {
  border-top:1px solid var(--line);
  padding:22px 0 35px;
  display:flex; justify-content:space-between; gap:20px;
  font-size:.62rem; text-transform:uppercase; letter-spacing:.06em;
}
.status-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--moss); animation:breathe 2s infinite; }

.reveal { opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity:1; transform:none; }

.cursor-seed {
  position:absolute; z-index:7; pointer-events:none; color:var(--acid);
  font-size:28px; transform:translate(-50%,-100%);
  animation:cursorGrow 1.8s ease forwards;
}

@keyframes breathe { 50% { transform:scale(1.08); opacity:.72; } }
@keyframes drift { to { left:120%; } }
@keyframes sway { 0%,100%{ transform:rotate(-2deg)} 50%{transform:rotate(3deg)} }
@keyframes bug { 0%,100%{ transform:translate(0,0) rotate(0)} 25%{transform:translate(28px,-24px) rotate(30deg)} 55%{transform:translate(-13px,-58px) rotate(-18deg)} 75%{transform:translate(25px,-72px) rotate(22deg)} }
@keyframes sproutIn { from{opacity:0;transform:translateY(20px) scale(.92) rotate(-2deg)} to{opacity:1;transform:none} }
@keyframes composted { to{opacity:0; transform:translate(90px,60px) rotate(20deg) scale(.2)} }
@keyframes spinSlow { to{ transform:rotate(360deg)} }
@keyframes cursorGrow { 0%{opacity:0;transform:translate(-50%,-30%) scale(.3)} 20%{opacity:1} 100%{opacity:0;transform:translate(-50%,-100%) scale(1.5) rotate(12deg)} }

@media (max-width: 820px) {
  .site-header { width:min(100% - 24px,1200px); }
  main, footer { width:min(100% - 24px,1200px); }
  .site-header nav a { display:none; }
  .hero { grid-template-columns:1fr; padding-top:45px; }
  .hero h1 { font-size:clamp(4rem,17vw,7rem); }
  .terrarium { max-width:430px; }
  .manifesto, .section-heading, .seed-lab, .compost { grid-template-columns:1fr; }
  .manifesto { padding-left:0; gap:22px; margin-bottom:100px; }
  .section-heading { gap:12px; }
  .garden-grid { grid-template-columns:1fr; }
  .card-large,.card-tall,.card-small,.card-wide,.card-medium { grid-column:auto; min-height:300px; }
  .garden-card ol { columns:1; }
  .seed-lab { gap:28px; }
  .seed-patch { grid-column:auto; }
  .seed-row { flex-direction:column; }
  .compost-playground { grid-template-columns:1fr; }
  .heap { max-width:320px; width:100%; justify-self:center; }
  footer { flex-direction:column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.001ms !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:#20241f;
    --ink:#e7e3d2;
    --line:rgba(231,227,210,.28);
    --blue:#446163;
    --pink:#855969;
    --yellow:#9b873d;
    --shadow:0 20px 60px rgba(0,0,0,.18);
  }
  body { background:radial-gradient(circle at 12% 8%, rgba(76,106,71,.28), transparent 26rem), var(--paper); }
  .button-primary { color:#f4efde; }
  .seed-row input, .planted-seed { background:#2a2f29; color:var(--ink); }
}
