:root {
  --ink: #171717;
  --ink-soft: #3d3d3d;
  --paper: #fff7eb;
  --paper-2: #ffe9c2;
  --white: #fffdf8;
  --slime: #7cde3a;
  --slime-deep: #3fa00a;
  --slime-dark: #2c7408;
  --sky: #4da3ff;
  --cap: #1d6fe0;
  --coral: #ff6b6b;
  --pink: #ff8dc7;
  --tape: #f4d35e;
  --line: #c9e4ff;
  --shadow: 0 14px 0 rgba(23, 23, 23, 0.12);
  --radius: 28px;
  --wrap: 1120px;
  --header: 72px;
  --font: "Nunito", system-ui, sans-serif;
  --display: "Fredoka", "Nunito", sans-serif;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 10% -10%, #d9ff9a 0%, transparent 55%),
    radial-gradient(700px 420px at 110% 8%, #b7dcff 0%, transparent 50%),
    var(--paper);
  line-height: 1.55;
  font-size: 1.05rem;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cap); }
a:hover { color: var(--slime-dark); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 247, 235, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid #171717;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  animation: wobble 4s ease-in-out infinite;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.env-banner {
  background: #171717;
  color: #ffe08a;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.8rem;
  border-bottom: 3px solid #171717;
}

html.is-staging { --header: 108px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
}

.nav a:hover { color: var(--slime-dark); }

.nav-cta {
  background: var(--slime);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  margin: 0 auto;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.slime-drip {
  height: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0, var(--slime) 11px, transparent 12px),
    radial-gradient(circle at 28% 0, var(--slime) 7px, transparent 8px),
    radial-gradient(circle at 47% 0, var(--slime) 13px, transparent 14px),
    radial-gradient(circle at 69% 0, var(--slime) 8px, transparent 9px),
    radial-gradient(circle at 88% 0, var(--slime) 12px, transparent 13px);
  pointer-events: none;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2.5rem 0 3.5rem;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.stamp {
  display: inline-block;
  border: 3px solid var(--coral);
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  transform: rotate(-6deg);
  font-family: var(--display);
}

h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 0.6em; }

h1 {
  font-size: clamp(2.1rem, 7vw, 4.2rem);
  letter-spacing: -0.03em;
  margin-top: 0.4rem;
}

h1 em {
  font-style: normal;
  color: var(--slime-dark);
  background: linear-gradient(transparent 62%, #d8ff8a 62%);
}

h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }

.lede {
  font-size: 1.15rem;
  max-width: 38ch;
}

.byline { font-size: 0.98rem; color: var(--ink-soft); }

.hero-actions, .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4rem 0 1rem;
}
.cta-actions { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary { background: var(--slime); color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); }

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.hero-pills li {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 800;
  font-size: 0.85rem;
}

.hero-exhibit {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 420px;
  max-width: 460px;
  margin-inline: auto;
  perspective: 900px;
}

.hero-exhibit-glow {
  position: absolute;
  inset: 8% 10% 18%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 236, 170, 0.55) 42%, transparent 70%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.hero-exhibit-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
}

.hero-exhibit-book {
  margin-inline: auto;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 18px rgba(23, 23, 23, 0.18));
  transform-origin: 50% 80%;
  animation: book-float 4.8s ease-in-out infinite;
  transition: transform 0.35s ease;
}

.hero-exhibit:hover .hero-exhibit-book {
  animation-play-state: paused;
  transform: translateY(-12px) rotate3d(0.15, 1, 0.05, 8deg);
}

.hero-exhibit-pedestal {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4%;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(23, 23, 23, 0.22), transparent 70%);
  filter: blur(4px);
  z-index: 0;
  pointer-events: none;
}

@keyframes book-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-14px) rotate(1.4deg); }
}

.tape {
  position: absolute;
  background: rgba(244, 211, 94, 0.85);
  height: 28px;
  width: 92px;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
  z-index: 2;
}
.tape-l { top: 10px; left: -18px; transform: rotate(-28deg); }
.tape-r { top: 18px; right: -16px; transform: rotate(22deg); }
.tape-c { top: -8px; left: 50%; width: 110px; transform: translateX(-50%) rotate(-4deg); }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  z-index: 0;
  pointer-events: none;
}
.blob-a {
  width: 220px; height: 220px;
  background: #9aec4d;
  top: 40px; right: -60px;
  opacity: 0.55;
}
.blob-b {
  width: 160px; height: 160px;
  background: #ffb4de;
  bottom: 20px; left: -40px;
  opacity: 0.45;
}

.section { padding: 4rem 0; position: relative; scroll-margin-top: calc(var(--header) + 10px); }
.section-tint { background: rgba(255, 255, 255, 0.45); }
.kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--cap);
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.section-lead, .note { color: var(--ink-soft); }
.note { font-weight: 700; }

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.sticky-card, .author-doodle {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.sticky-card figcaption {
  font-family: var(--hand);
  font-size: 1.15rem;
  margin-top: 0.7rem;
  text-align: center;
}

.cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 1.2rem 1.2rem 1.3rem;
  box-shadow: 5px 5px 0 var(--ink);
}
.card:nth-child(1) { transform: rotate(-1deg); }
.card:nth-child(2) { transform: rotate(1.2deg); }
.card:nth-child(3) { transform: rotate(-0.6deg); }
.card:nth-child(4) { transform: rotate(0.8deg); }
.card-emoji { font-size: 1.8rem; margin: 0; }
.card h3 { margin-bottom: 0.1rem; }
.card-role {
  font-family: var(--hand);
  color: var(--cap);
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}
.card p { margin: 0.35rem 0 0; }

.excerpt-layout {
  display: grid;
  gap: 1.5rem;
}

.diary {
  --row: 34px;
  background:
    linear-gradient(90deg, transparent 0 46px, #ff8b8b 46px 48px, transparent 48px),
    repeating-linear-gradient(var(--white) 0 calc(var(--row) - 1px), var(--line) calc(var(--row) - 1px) var(--row));
  border: 3px solid var(--ink);
  border-radius: 4px 28px 28px 4px;
  padding: var(--row) 1.3rem var(--row) 4rem;
  box-shadow: var(--shadow);
  font-family: var(--hand);
  font-size: 1.25rem;
  line-height: var(--row);
  transform: rotate(-0.4deg);
  max-width: 720px;
}
.diary h3 {
  font-family: var(--hand);
  font-size: 1.45rem;
  margin: var(--row) 0 0;
  line-height: var(--row);
}
.diary p { margin: 0; line-height: var(--row); }
.diary-month {
  font-family: var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--coral);
  line-height: var(--row);
  margin: 0;
}
.diary-shout { font-weight: 700; }
.diary-end {
  margin-top: 1.2rem !important;
  font-size: 1rem;
  color: var(--ink-soft);
}

.gallery {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.gallery-item {
  width: 100%;
  appearance: none;
  border: 3px solid var(--ink);
  background: var(--white);
  border-radius: 22px;
  padding: 0.8rem 0.8rem 0.5rem;
  cursor: zoom-in;
  box-shadow: 4px 4px 0 var(--ink);
  font: inherit;
  color: inherit;
  text-align: center;
}
.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
}
.gallery-item span {
  display: block;
  font-family: var(--hand);
  font-size: 1.2rem;
  padding: 0.45rem 0 0.2rem;
}
.gallery-item:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

.author-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.section-cta { padding-bottom: 5rem; }
.cta-card {
  position: relative;
  background: linear-gradient(160deg, #d8ff8a, #fff7eb 55%, #cfe8ff);
  border: 3px solid var(--ink);
  border-radius: 36px;
  padding: 2rem 1.4rem;
  text-align: center;
  box-shadow: 8px 8px 0 var(--ink);
}
.badge {
  display: inline-block;
  background: var(--ink);
  color: var(--slime);
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
}
.cta-hint { font-size: 0.92rem; color: var(--ink-soft); }

button.btn {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  appearance: none;
}
button.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.contact-form {
  display: grid;
  gap: 0.75rem;
  text-align: left;
  max-width: 440px;
  margin: 1.4rem auto 0.4rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 0.7rem 0.85rem;
  background: var(--white);
}
.contact-form textarea {
  min-height: 7.5rem;
  resize: vertical;
}
.contact-form .cta-actions { margin: 0.4rem 0 0; }
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field-error {
  margin: -0.35rem 0 0;
  color: #b42318;
  font-weight: 800;
  font-size: 0.88rem;
}
.form-status {
  min-height: 1.4em;
  margin: 0;
  text-align: center;
  font-weight: 800;
}
.form-status.is-ok { color: var(--slime-dark); }
.form-status.is-err { color: #b42318; }

.site-footer {
  background: var(--ink);
  color: #f4f4f4;
  padding: 2rem 0 2.4rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--slime); }
.footer-inner { display: grid; gap: 0.35rem; }
.footer-tiny { opacity: 0.75; font-size: 0.85rem; }

.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.78);
}
.lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(900px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 1rem;
  border: 3px solid #111;
}
.lightbox-figure img {
  max-height: 72vh;
  margin-inline: auto;
}
.lightbox-figure figcaption {
  font-family: var(--hand);
  text-align: center;
  margin-top: 0.6rem;
  font-size: 1.2rem;
}
.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #111;
  background: var(--coral);
  color: #111;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

@keyframes wobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
  .hero { padding: 3.5rem 0 4.5rem; }
  .hero-exhibit { max-width: 480px; margin-inline: 0 0 auto; min-height: 520px; }
  .split { grid-template-columns: 1.1fr 0.9fr; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .author-grid { grid-template-columns: 0.7fr 1.3fr; }
  .cta-card { padding: 3rem; }
  .gallery-item img { height: 240px; }
}

@media (max-width: 820px) {
  .blob-a { width: 150px; height: 150px; top: auto; bottom: 12%; right: -70px; opacity: 0.35; }
  .blob-b { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    top: calc(var(--header) + 8px);
    left: 1rem;
    right: 1rem;
    background: var(--white);
    border: 3px solid var(--ink);
    border-radius: 18px;
    padding: 0.8rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 6px 6px 0 var(--ink);
  }
  .nav a { padding: 0.55rem 0.4rem; }
  .nav.open { display: flex; z-index: 50; }
}

.shop-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.shop-card {
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 28px;
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: 6px 6px 0 var(--ink);
}
.shop-card:nth-child(1) { transform: rotate(-0.6deg); }
.shop-card:nth-child(2) { transform: rotate(0.8deg); }
.shop-kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--cap);
  margin: 0 0 0.35rem;
  font-weight: 700;
}
.shop-card h3 { margin-bottom: 0.2rem; }
.price {
  font-family: var(--display);
  font-size: 2.2rem;
  margin: 0.2rem 0 0.8rem;
  letter-spacing: -0.03em;
}
.price span { color: var(--slime-dark); }
.shop-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: grid;
  gap: 0.45rem;
}
.shop-actions { margin: 1.2rem 0 0; }
.shop-note, .shop-status {
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
}
.shop-note { margin-top: 1.4rem; }
.shop-status { min-height: 1.4em; margin: 0.6rem 0 0; }
.shop-status.is-err { color: #b42318; }

.obrigado-card { text-align: center; max-width: 640px; margin-inline: auto; }
.obrigado-card .lede { margin-inline: auto; }
.download-panel, .pending-panel, .failed-panel { margin-top: 1.2rem; }

@media (min-width: 800px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-mark, .btn, .gallery-item, .card, .hero-exhibit-book { animation: none; transition: none; }
  .hero-exhibit:hover .hero-exhibit-book { transform: none; }
}
