/* Home page: hero, manifesto, story cards, join forms. Builds on style.css. */

/* Long sections (cards, forms) must scroll freely, so the home page drops scroll snapping. */
html:has(body.home) { scroll-snap-type: none; }

.home-hero {
  background:
    repeating-conic-gradient(from 0deg at 72% 50%, #F6C65B 0deg 7.5deg, transparent 7.5deg 15deg),
    var(--mustard);
}
.home-hero .hero__title { max-width: 9ch; }
.home-hero .hero__art { width: min(100%, 470px); }
.home-hero .bubble--hero { margin: 1.2em 0 0 -0.4rem; }
.art--cartoon { filter: drop-shadow(var(--shadow)); }

.home-why, .home-stories, .home-join { grid-template-columns: minmax(0, 1fr); justify-items: center; }

/* manifesto */
.manifesto { max-width: 40rem; font-size: 1.22rem; }
.manifesto h2 { color: var(--tomato); }
.manifesto__lead { font: 800 1.5rem/1.3 var(--font-display); }
.manifesto__aha {
  font: 800 1.3rem/1.35 var(--font-display);
  border-left: 6px solid var(--mustard);
  padding-left: 0.8em;
}
.manifesto__together {
  font: 900 clamp(2rem, 4.4vw, 3.2rem)/1.05 var(--font-display);
  color: var(--teal);
  margin: 0.7em 0 0.1em;
  transform: rotate(-2deg);
}
.manifesto__sign { font: 800 1.1rem/1 var(--font-display); text-align: right; }

/* section heads */
.home-head { text-align: center; max-width: 38rem; }
.home-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.home-head p { font-size: 1.15rem; }

/* story cards */
.stories {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}
.story {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 18px;
  font-size: 1rem;
  line-height: 1.45;
  z-index: 0;
  transition: transform 0.15s ease;
}
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  filter: url(#rough) drop-shadow(var(--shadow));
}
.story:nth-child(odd) { transform: rotate(-0.8deg); }
.story:nth-child(even) { transform: rotate(0.7deg); }
.story:not(.story--soon):hover { transform: rotate(0deg) translateY(-4px); }
.story__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: var(--mustard);
  margin-bottom: 0.8em;
}
.story__art--ear { object-fit: contain; background: var(--mustard); }
.story__num {
  font: 800 0.85rem/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tomato);
  margin-bottom: 0.4em;
}
.story h3 { font-size: 1.35rem; margin-bottom: 0.3em; }
.story__link { color: inherit; text-decoration: none; }
/* the whole card is the click target, the title stays the accessible link */
.story__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.story__link:focus-visible { outline: none; }
.story:has(.story__link:focus-visible) { outline: 3px solid var(--tomato); outline-offset: 4px; }
.story__go { margin-top: auto; padding-top: 0.6em; font: 800 1rem/1 var(--font-display); color: var(--teal); }
.story__go a { position: relative; z-index: 2; color: inherit; }
.story--soon .story__art { filter: saturate(0.75); }
.story--soon h3 { color: rgba(30, 34, 64, 0.8); }
.story__soon {
  display: inline-block;
  background: var(--mustard);
  color: var(--ink);
  padding: 0.2em 0.5em;
  transform: rotate(-2deg);
}

/* join forms */
.joins {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(18px, 2.4vw, 30px);
  align-items: start;
}
.join { position: relative; padding: 20px 22px 22px; z-index: 0; font-size: 1rem; }
.join::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  filter: url(#rough) drop-shadow(var(--shadow));
}
.join:nth-child(2) { transform: rotate(0.6deg); }
.join:nth-child(3) { transform: rotate(-0.6deg); }
.join fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.join h3 { font-size: 1.4rem; color: var(--teal); }
.join__label { display: block; font: 800 0.95rem/1.2 var(--font-display); margin: 0.6em 0 0.35em; }
.join__field {
  display: block;
  width: 100%;
  font: 400 1.05rem/1.4 var(--font-body);
  color: var(--ink);
  background: #FFFDF8;
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 0.55em 0.7em;
}
textarea.join__field { resize: vertical; min-height: 6.5em; }
.join__field:focus-visible, .join__check input:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; }
.join__topics { margin: 0.4em 0 0; }
.join__check { display: flex; gap: 0.6em; align-items: flex-start; padding: 0.35em 0; cursor: pointer; }
.join__check input { flex: none; width: 1.4em; height: 1.4em; margin-top: 0.18em; accent-color: var(--teal); }
.join__fine { font-size: 0.88rem; opacity: 0.8; margin: 0.6em 0 0; }
.join__send {
  margin-top: 0.9em;
  padding: 0.6em 1.2em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--tomato);
  color: var(--paper);
  font: 800 1rem/1 var(--font-display);
  cursor: pointer;
  box-shadow: 3px 4px 0 var(--ink);
}
.join__send:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.join__send:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.join fieldset:disabled .join__send, .join fieldset:disabled .join__field { opacity: 0.55; cursor: not-allowed; }
.join__soon {
  display: inline-block;
  margin-top: 0.4em;
  padding: 0.6em 0.9em;
  font: 700 0.95rem/1.35 var(--font-display);
  background: var(--mustard);
  box-shadow: var(--shadow);
  transform: rotate(-0.8deg);
}
.join__status {
  margin: 1em 0 0;
  padding: 0.6em 0.8em;
  font: 700 0.92rem/1.35 var(--font-display);
  background: var(--mustard);
  box-shadow: var(--shadow);
  transform: rotate(-0.6deg);
}
.join__status:focus { outline: none; }
.join__status.is-flash { animation: nudge 0.5s ease; }
@keyframes nudge {
  0%, 100% { translate: 0 0; }
  25% { translate: -6px 0; }
  75% { translate: 6px 0; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-foot {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 40px 20px 56px;
  font: 700 0.95rem/1.4 var(--font-display);
}
.site-foot .back { margin-top: 0.6em; }

@media (max-width: 820px) {
  .home-hero .hero__art { width: 72%; justify-self: center; }
  .home-hero .hero__art .art { max-height: 36svh; width: auto; margin: 0 auto; }
  .home-hero .bubble--hero { margin-left: 0; }
  .home-why, .home-stories, .home-join { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 64px; padding-bottom: 56px; }
  .manifesto { font-size: 1.05rem; }
  .manifesto__lead { font-size: 1.25rem; }
  .manifesto__aha { font-size: 1.12rem; }
}
