:root {
  --cream: #F5EAD8;
  --paper: #FBF5EC;
  --sand: #E8DCC6;
  --line: rgba(62, 36, 16, .16);
  --tan: #BD9573;
  --brown: #633C1C;
  --brown-dark: #3E2410;
  --rust: #C67139;
  --teal: #2A5A6B;
  --ink: #3A2A1E;
  --muted: #7A6453;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1rem/1.6 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  color: var(--brown-dark);
  line-height: 1.15;
  margin: 0;
}
h1, h2 {
  font-family: "Caprasimo", Georgia, serif;
  font-weight: 400;
}

a { color: var(--teal); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(245, 234, 216, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.nav-logo img { width: 44px; height: auto; }
.nav-logo span { font-family: "Caprasimo", Georgia, serif; font-size: 1.2rem; color: var(--brown-dark); }
.nav-links { display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 1.5rem); }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--rust); }
.nav-links .nav-join {
  background: var(--brown-dark);
  color: var(--cream);
  padding: .35rem .9rem;
  border-radius: 6px;
  font-weight: 600;
}
.nav-links .nav-join:hover { background: var(--brown); color: var(--cream); }

/* Hero */
.hero {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem 2rem;
}
.hero-img { width: min(280px, 70vw); margin: 0 auto 1.25rem; }
.eyebrow {
  margin: 0 0 .5rem;
  font-size: .9rem;
  color: var(--muted);
}
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); }
.doodle {
  padding-bottom: .12em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 35 3, 70 12, 105 7 S 170 3, 197 8' fill='none' stroke='%23C67139' stroke-width='4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left bottom / 100% .28em no-repeat;
}
.subtitle { margin: .5rem 0 0; font-size: clamp(1rem, 2.4vw, 1.15rem); color: var(--muted); }

main { max-width: 640px; margin: 0 auto; padding: 0 1rem; }

/* Links */
.links { display: grid; gap: .6rem; margin: .5rem 0 3.5rem; }
.link-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

.link {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .7rem 1rem .7rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 4px 0 0 var(--accent, var(--sand));
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.link:hover { border-color: var(--accent, var(--brown)); background: var(--tint, #fff); }
.link:hover img { animation: wiggle .5s ease-in-out; }

.link-brown { --accent: #BD9573; --tint: #F3E6D8; }
.link-sky   { --accent: #A9CFDA; --tint: #E6F2F5; }
.link-sand  { --accent: #CDB894; --tint: #F1E8D8; }
.link-peach { --accent: #F2B596; --tint: #FFEEE4; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-9deg); }
  50% { transform: rotate(7deg); }
  75% { transform: rotate(-3deg); }
}
.link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.link img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.link-text strong { font-weight: 600; font-size: 1.02rem; line-height: 1.3; color: var(--brown-dark); }
.link-text small { font-size: .88rem; color: var(--muted); }
.arrow { color: var(--muted); transition: transform .15s ease, color .15s ease; }
.link:hover .arrow { color: var(--brown-dark); transform: translateX(2px); }

/* Primary link */
.link-rust { background: var(--brown-dark); border-color: var(--brown-dark); box-shadow: none; }
.link-rust:hover { background: var(--brown); border-color: var(--brown); }
.link-rust .link-text strong { color: var(--cream); }
.link-rust .link-text small, .link-rust .arrow, .link-rust:hover .arrow { color: rgba(245, 234, 216, .75); }

/* About */
.about {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
}
.about-inner { display: flex; align-items: center; gap: 2rem; }
.about h2 {
  position: relative;
  display: inline-block;
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  margin-bottom: 1rem;
  padding: .45rem 1rem .5rem;
  background: var(--paper);
  border: 2px solid var(--brown-dark);
  border-radius: 18px;
}
/* speech bubble tail, pointing at the waving capybara */
.about h2::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 50%;
  width: 14px;
  height: 14px;
  background: var(--paper);
  border-top: 2px solid var(--brown-dark);
  border-right: 2px solid var(--brown-dark);
  transform: translateY(-50%) rotate(45deg);
}
.about p { margin: 0 0 .8rem; }
.about p:last-child { margin-bottom: 0; }
.about em { font-style: normal; font-weight: 600; text-decoration: underline; text-decoration-color: var(--rust); text-underline-offset: 3px; }
.about-capy { width: 130px; flex-shrink: 0; }

/* Office + events cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 3.5rem; }
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.1rem 1.2rem;
}
.card img { width: 52px; height: 52px; object-fit: contain; position: absolute; top: .9rem; right: .9rem; }
.card .tag {
  margin: 0 0 .25rem;
  font-size: .85rem;
  color: var(--muted);
}
.card h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: .4rem; }
.card p:last-child { margin: 0; font-size: .95rem; padding-right: .5rem; }

/* Past events */
.past { border-top: 1px solid var(--line); padding-top: 2.5rem; }
.past h2 { font-size: clamp(1.7rem, 4.5vw, 2.1rem); margin-bottom: 1.1rem; }
.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem .75rem;
}
.photos figure { position: relative; margin: 0; }
.photos .sticker {
  position: absolute;
  top: -16px;
  right: -10px;
  width: 54px;
  height: 54px;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0;
  transform: rotate(12deg);
  filter: drop-shadow(0 1px 1px rgba(62, 36, 16, .3));
}
.photos .sticker-left { right: auto; left: -10px; transform: rotate(-10deg); }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.photos figcaption { font-size: .85rem; color: var(--muted); padding-top: .4rem; }

/* Footer */
.footer {
  max-width: 608px;
  margin: 3.5rem auto 0;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .85rem;
}
.footer img { width: 40px; }
.footer p { margin: 0; }

@media (max-width: 560px) {
  .nav-links a:not(.nav-join) { display: none; }
  .link-row, .cards { grid-template-columns: 1fr; }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .about-inner { flex-direction: column-reverse; align-items: flex-start; gap: 1rem; }
  .about-capy { width: 100px; }
  .about h2::after { right: auto; left: 1.5rem; top: -9px; transform: rotate(-45deg); }
  .footer { flex-direction: column; text-align: center; margin-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link, .arrow { transition: none; }
  .link:hover img { animation: none; }
}
