/* Landing page (templates/web/startseite.html). Design: brandstyft-rund-vollbreit.html.
   After site.css (font, colours, header, footer); no main.css. */

html { scroll-behavior: smooth; }
a { color: var(--ink); text-underline-offset: 3px; }
a:not(.button):hover { color: var(--aubergine); }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 500; margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible { outline-color: #fff; }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.kicker { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--aubergine); }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 15px; }

main { display: flex; flex-direction: column; }

/* Buttons */
.btn { cursor: pointer; background: var(--orange); color: #fff; border: 0; border-radius: var(--radius-cta); font-weight: 700; transition: background .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.pick { cursor: pointer; background: var(--sand); color: var(--ink); border: 0; transition: background .15s ease; }
.pick:hover { background: var(--ochre); }
.ghost { cursor: pointer; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.pill { border-radius: var(--radius-cta); padding: 0 18px; height: 44px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; }

/* Surprise */
.surprise { width: 100%; max-width: 1360px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; background: var(--sand); border: 1.5px dashed var(--orange); border-radius: var(--round); padding: 14px 28px; }
.surprise img { border-radius: 4px; }
.surprise > div { flex: 1 1 260px; }
.surprise__title { margin: 4px 0 0; font-size: 19px; }
.surprise__title span { color: var(--muted); }

/* Dein Moment */
.moment { background: var(--aubergine); color: #fff; border-radius: var(--round); padding: clamp(24px, 3.5vw, 48px) var(--pad-x); }
.moment a { color: #fff; }
.moment__in { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.moment__row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 40px; }
.moment__search { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sbar { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: var(--radius-cta); padding: 6px 6px 6px 20px; }
.sbar:focus-within { outline: 3px solid var(--paper); outline-offset: 3px; }
.sbar input { flex: 1 1 auto; min-width: 0; height: 54px; border: 0; background: transparent; color: var(--ink); font-size: 17px; }
.sbar input:focus-visible { outline: none; }
.sbar .btn { height: 54px; padding: 0 26px; font-size: 19px; }
.moment__ask { flex: 1 1 520px; min-width: 0; display: flex; align-items: center; gap: 20px; }
.sparks { flex: 0 0 auto; background: none; border: 0; padding: 0; color: var(--paper); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sparks > svg { width: 99px; height: 100px; fill: var(--paper); transition: transform .35s ease; }
.sparks__label { display: flex; align-items: center; gap: 5px; height: 18px; font-size: 13px; opacity: 0; }
.sparks.is-on { cursor: pointer; }
.sparks.is-on .sparks__label { opacity: 1; }
.sparks.is-on:hover > svg { transform: rotate(-14deg) scale(1.06); }
.sparks.is-on:hover .sparks__label { text-decoration: underline; }
.ask { flex: 1 1 auto; min-width: 0; }
.ask__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ask__options .pick { border-radius: var(--radius-cta); padding: 12px 14px; min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.ask__options span { font-size: 17px; line-height: 1.15; }
.ask__options small { font-size: 13px; line-height: 1.25; color: var(--ink-soft); }

/* Das eine Buch */
.one { background: var(--paper); color: var(--ink); border-radius: 4px; padding: 14px; display: flex; gap: 16px; }
.one a { color: var(--ink); }
.one__cover { flex: 0 0 104px; align-self: flex-start; }
.one__cover img { display: block; border-radius: 4px; width: 104px; height: auto; }
.one__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.one h3 { font-size: 24px; line-height: 1.1; }

/* Results */
.results { background: var(--paper); color: var(--ink); border-radius: 4px; padding: clamp(16px, 2.5vw, 28px); display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; }
.results a { color: var(--ink); }
.results[aria-busy="true"] { opacity: .6; }
/* Search spinner: the y of the logo floating mid-screen over the page; its i-dot
   hops from the left arm (≈ 58|39) to the right one (≈ 86|36) and back.
   Translate units are the icon's viewBox. */
.moment-spinner { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 100; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; background: var(--paper); box-shadow: 0 8px 32px rgba(0, 0, 0, .18); color: var(--orange); pointer-events: none; }
.moment-spinner[hidden] { display: none; }
.moment-spinner svg { width: 40px; height: 70px; overflow: visible; }
.moment-spinner__dot { animation: moment-hop 1.1s ease-in-out infinite; }
@keyframes moment-hop {
  0%, 8% { transform: translate(-10px, 5px); }
  29% { transform: translate(4px, -10px); }
  50%, 58% { transform: translate(18px, 3px); }
  79% { transform: translate(4px, -10px); }
  100% { transform: translate(-10px, 5px); }
}
@keyframes moment-blink { 50% { opacity: .3; } }
.results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.results__head h2 { font-size: 28px; letter-spacing: -0.01em; }
.results__grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.hit { border: 1px solid var(--line); border-radius: 4px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.hit h3 { font-size: 17px; line-height: 1.15; }
.hit h3 a { text-decoration: none; }
.hit__cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; font-size: 14px; color: var(--muted); }
.buy form { margin: 0; }
/* The bag as on the genre pages: a black line icon, no circle. */
.buy button { cursor: pointer; background: none; color: var(--ink); border: 0; border-radius: 999px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.buy button:hover { background: rgb(38 28 20 / 6%); color: var(--orange-dark); }
.buy button:disabled { opacity: .35; cursor: default; }
.buy .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow { cursor: pointer; width: 48px; height: 48px; background: none; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; stroke: var(--orange); }
.arrow svg { stroke: inherit; transition: stroke .15s ease; }
.arrow:hover svg { stroke: var(--orange-dark); }
.arrow:disabled { opacity: .3; cursor: default; }
.unfold { animation: unfold .35s ease-out; }
@keyframes unfold { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* Shelves */
.shelf { background: var(--bg); border-radius: var(--round); padding: clamp(20px, 3vw, 36px) var(--pad-x); }
.shelf__in { margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.shelf__head { flex: 0 1 240px; }
.shelf__head h2 { font-size: 32px; line-height: 1.1; }
.shelf__head p { margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); }
.shelf__more { display: inline-block; margin-top: 12px; font-weight: 600; }
/* Carousel: no scrollbar, the arrows float over the row (startseite.js); touch still swipes. */
.carousel { position: relative; flex: 1 1 480px; min-width: 0; }
.shelf__row { display: flex; gap: clamp(28px, 3.2vw, 64px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 0; margin: 0; list-style: none; }
.shelf__row::-webkit-scrollbar { display: none; }
.carousel__btn { position: absolute; top: 105px; transform: translateY(-50%); z-index: 1; width: 56px; height: 72px; border-radius: var(--radius-cta); background: color-mix(in srgb, var(--bg) 85%, transparent); }
.carousel__btn--prev { left: -12px; }
.carousel__btn--next { right: -12px; }
.carousel__btn[hidden] { display: none; }
.shelf--orange .arrow { stroke: var(--sky); }
.shelf--orange .arrow:hover svg { stroke: #fff; }
.shelf__row > li { scroll-snap-align: start; flex: 0 0 140px; display: flex; flex-direction: column; gap: 4px; }
.cover { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.cover img { display: block; width: 140px; height: 210px; object-fit: cover; border-radius: 4px; }
.cover .cover__blank { width: 140px; }
.cover__title { font-size: 16px; line-height: 1.2; }
.cover__author { margin: 0; font-size: 14px; line-height: 1.2; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf .buy { color: var(--ink); font-weight: 600; padding-top: 4px; }
.buy .button { background: var(--orange); color: #fff; border-radius: var(--radius-cta); padding: 8px 12px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.bonus__hint { width: 140px; aspect-ratio: 2 / 3; border: 1.5px dashed var(--aubergine); border-radius: 4px; background: transparent; padding: 12px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; font-size: 13px; line-height: 1.25; }
.bonus__hint span { font-size: 30px; color: var(--aubergine); }
.bonus__book .cover__title { color: var(--aubergine); }


@media (max-width: 600px) {
  .moment__ask { flex-direction: column; align-items: stretch; }
  .sparks { flex-direction: row; justify-content: center; }
  .sparks > svg { width: 56px; height: 56px; }
  .one { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html, .shelf__row { scroll-behavior: auto; }
  .unfold, .sparks > svg { animation: none; transition: none; }
  .moment-spinner__dot { animation: moment-blink 1.6s ease-in-out infinite; }
}
