/* Home page and the hub pages (oykuler, masallar, katmanya): 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), html:has(body.hub) { 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 :is(h2, 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 :is(h2, 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);
}

@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; }
}

/* two doors in the hero: beginner -> short stories, developer -> tales */
.doors { list-style: none; margin: 1.4em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.door {
  display: grid;
  gap: 0.3em;
  max-width: 17rem;
  padding: 0.8em 1em 0.9em;
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 4px 5px 0 var(--ink);
  transition: transform 0.15s ease;
}
.door--start { background: var(--teal); transform: rotate(-1.2deg); }
.door--advanced { background: var(--plum); transform: rotate(1deg); }
.door:hover { transform: rotate(0deg) translateY(-3px); }
.door__name { font: 800 1.35rem/1.1 var(--font-display); }
.door__sub { font: 600 0.92rem/1.35 var(--font-display); opacity: 0.92; }
.world-link { margin: 1em 0 0; font: 800 1rem/1.3 var(--font-display); }
.world-link a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* hub pages: a title block over the card grid */
.hub-head { text-align: center; max-width: 42rem; }
.hub-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 0.3em; }
.hub-head p { font-size: 1.15rem; }
.hub-next { margin: 0; font: 800 1.05rem/1.3 var(--font-display); text-align: center; }
.hub-next a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.story__concept { margin: -0.1em 0 0.5em; }
.hub--tales { color: var(--paper); }
.hub--tales .story { color: var(--ink); }

@media (max-width: 820px) {
  .doors { gap: 10px; }
  .door { max-width: none; flex: 1 1 100%; }
  .door__name { font-size: 1.15rem; }
}

/* "Çorbada bizim de tuzumuz var" */
.home-tuz { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.tuz__art { margin: 0; width: min(100%, 720px); text-align: center; }
.tuz__art img { width: 100%; height: auto; }
.tuz__art figcaption { font: 800 clamp(1.3rem, 2.6vw, 1.8rem)/1.2 var(--font-display); margin-top: 0.3em; }
.tuz { width: min(100%, 640px); }
