:root {
  --sky-top: #b9d8e4;
  --sky: #e4eef1;
  --paper: #f3f7f6;
  --ink: #1e2b30;
  --ink-soft: #46575d;
  --hedge: #2f5a34;
  --grass: #5f8f47;
  --gravel: #cbb892;
  --timber: #6b4a32;
  --gate: #e8b422;
  --gate-shade: #c9951a;
  --iron: #2a3336;

  --display: "Rockwell", "Roboto Slab", "Zilla Slab", "Museo Slab", Georgia, "Times New Roman", serif;
  --text: "Gill Sans", "Gill Sans Nova", "Seravek", "Ubuntu", "Segoe UI", "Noto Sans", "DejaVu Sans", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.55;
}

a { color: var(--hedge); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: min(68rem, 100% - 3rem);
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(to bottom, var(--sky-top), var(--sky) 70%);
  padding-top: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 7.5rem);
  letter-spacing: -0.02em;
}

.hero .intro {
  max-width: 34rem;
  margin: 1.25rem 0 1.75rem;
  font-size: clamp(1.125rem, 2.2vw, 1.3rem);
  color: var(--ink-soft);
}

.toggle {
  font: 600 1rem/1 var(--text);
  color: var(--ink);
  background: var(--gate);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
.toggle:hover { background: #f0c43e; }
.toggle:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

.field {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.scene {
  position: relative;
  width: min(640px, 92vw);
  aspect-ratio: 640 / 300;
  margin-inline: auto;
  perspective: 1400px;
  z-index: 1;
}

.post {
  position: absolute;
  bottom: 0;
  width: 5.5%;
  height: 100%;
  background: linear-gradient(to right, #7d5a40, var(--timber) 60%, #573b28);
  border-radius: 6px 6px 0 0;
}
.post::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  top: -3%;
  height: 6%;
  background: #573b28;
  border-radius: 4px;
}
.post.hinge { left: 0; }
.post.latch { right: 0; }

.leaf {
  position: absolute;
  left: 5.5%;
  right: 5.5%;
  top: 24%;
  bottom: 5%;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 1.8s cubic-bezier(0.25, 0.9, 0.3, 1);
}
.leaf svg { display: block; width: 100%; height: 100%; }

.scene.open .leaf { transform: rotateY(-72deg); }

.grass {
  position: relative;
  height: clamp(5rem, 12vw, 8rem);
  margin-top: -2px;
  background: linear-gradient(to bottom, var(--grass), var(--hedge));
}

.path {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(560px, 80vw);
  height: 100%;
  transform: translateX(-50%);
  background: var(--gravel);
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
  opacity: 0.85;
}

/* ---------- Sections ---------- */

section { padding-block: clamp(3.5rem, 8vw, 6rem); }

.why {
  display: grid;
  gap: 1rem 4rem;
  grid-template-columns: 1fr;
}
.why h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.why p { margin: 0 0 1rem; max-width: 38rem; }
.why .closing { font-family: var(--display); font-size: 1.35rem; }

@media (min-width: 52rem) {
  .why { grid-template-columns: 18rem 1fr; }
}

.guide { background: #e7efe9; }
.guide h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 2.5rem; max-width: 30rem; }

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 3.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .entries { grid-template-columns: 1fr 1fr; }
}

.entry {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 2px solid var(--hedge);
}
.entry svg {
  width: 5.5rem;
  height: 5.5rem;
  color: var(--ink);
}
.entry h3 { font-size: 1.4rem; margin-bottom: 0.35rem; }
.entry p { margin: 0; color: var(--ink-soft); max-width: 30rem; }

.etiquette { background: var(--hedge); color: #fff; }

.sign {
  background: var(--gate);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  max-width: 44rem;
  position: relative;
}
.sign::before,
.sign::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--iron);
}
.sign::before { left: 0.9rem; }
.sign::after { right: 0.9rem; }

.sign h2 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  margin-bottom: 1.25rem;
}
.sign ul { margin: 0; padding-left: 1.2rem; }
.sign li { margin: 0.4rem 0; max-width: 34rem; }

.etiquette .note {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  color: #dfe9dc;
}

footer {
  padding-block: 2.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
footer p { margin: 0.25rem 0; }

/* ---------- 404 ---------- */

.lost {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.lost .hero { flex: 1; display: flex; flex-direction: column; }
.lost .field { margin-top: auto; }
.lost .hero h1 { font-size: clamp(2.5rem, 8vw, 5.5rem); }

@media (prefers-reduced-motion: reduce) {
  .leaf { transition: none; }
}
