/* =========================================================================
   Café SOY: Startseite
   Leitidee: Schwarz und Weiß wie die beiden Tüten. Das Logo ist die Bühne,
   das Foto sitzt im "O" von SOY.
   ========================================================================= */

:root {
  interpolate-size: allow-keywords;
}

.section {
  padding-block: clamp(6rem, 12vw, 11rem);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5.6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.lede {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 32rem;
  transition: color 900ms var(--ease-soft);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
}
.hero__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  padding-top: calc(var(--island-top) + var(--island-h) + 2vh);
  overflow: hidden;
}
.hero__mark {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(90vw, 1320px, calc((100dvh - 250px) * 1.9));
  aspect-ratio: 213 / 112;
}
.hero__title {
  position: absolute;
  inset: 0;
}
.hero__logo {
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--fg);
}
.hero__logo .logo-s,
.hero__logo .logo-o,
.hero__logo .logo-y,
.hero__logo .logo-cafe,
.hero__logo .logo-line {
  will-change: transform, opacity;
}

/* Das Foto sitzt exakt im Innenraum des "O" (gemessen am Logo). */
.hero__photo {
  position: absolute;
  left: 35.64%;
  top: 26.72%;
  width: 28.07%;
  height: 64.97%;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--stone);
  box-shadow: 0 40px 80px -40px rgba(28, 28, 27, 0.45), inset 0 0 0 1px rgba(55, 55, 53, 0.06);
  z-index: 1;
}
.hero__photo picture,
.hero__photo img {
  width: 100%;
  height: 100%;
}
.hero__photo img {
  object-fit: cover;
  object-position: 50% 58%;
}

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: clamp(1.5rem, 4vh, 3rem);
}
.hero__copy {
  display: grid;
  gap: 1rem;
  max-width: 25rem;
}
.hero__sub {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--fg-muted);
}

@media (max-width: 760px) {
  .hero__stage {
    min-height: 92svh;
    padding-top: calc(var(--island-top) + var(--island-h) + 1rem);
  }
  /* Auf dem Handy wird das Logo so groß, dass S und Y über den Rand laufen
     und das "O" mit dem Foto die Bühne bekommt. */
  .hero__mark {
    width: 168vw;
    justify-self: start;
    margin-left: calc(50% - 84vw);
  }
  .hero__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  .hero__foot .btn {
    width: 100%;
  }
}

/* ---------- Statement ---------- */

.statement {
  padding-block: clamp(7rem, 16vw, 14rem) clamp(5rem, 10vw, 9rem);
}
.statement__text {
  max-width: 21ch;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.8vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.statement__text em {
  font-style: italic;
}

/* ---------- Produkt-Bühnen ---------- */

.feature {
  padding-block: clamp(5rem, 10vw, 9rem);
}
.feature__title {
  position: relative;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 15vw, 14rem);
  line-height: 0.84;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.feature--creme .feature__title {
  text-align: right;
}
.feature__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}
/* Freigestellte Tüte, schwebend vor dem großen Titel */
.pack {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-items: end;
  width: 100%;
  max-width: 560px;
  padding-bottom: 1.25rem;
}
.pack::before {
  content: "";
  position: absolute;
  inset: 4% -14% 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.75), transparent 72%);
  transition: opacity 900ms var(--ease-soft);
}
.pack--night::before {
  background: radial-gradient(closest-side, rgba(245, 244, 240, 0.13), transparent 72%);
}
.pack__float {
  width: min(100%, 410px);
  transform-origin: 50% 100%;
  transition: scale 900ms var(--ease-soft);
}
.pack__img {
  width: 100%;
  height: auto;
}
.pack__shadow {
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  z-index: -1;
  width: min(78%, 340px);
  height: 2.2rem;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(28, 28, 27, 0.32), transparent);
  transition: scale 900ms var(--ease-soft);
}
.pack--night .pack__shadow {
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent);
}
.pack.is-small .pack__float {
  scale: 0.8;
}
.pack.is-small .pack__shadow {
  scale: 0.78;
}
@media (max-width: 899px) {
  .pack {
    max-width: none;
  }
  .pack__float {
    width: min(78%, 340px);
  }
}
[data-parallax] {
  position: absolute;
  inset: -8% 0;
}
[data-parallax] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

@media (min-width: 900px) {
  .feature__grid {
    grid-template-columns: 5fr 1fr 6fr;
    align-items: end;
    margin-top: calc(-1 * clamp(2rem, 5.5vw, 5.5rem));
  }
  .feature--espresso .feature__media {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .feature--espresso .feature__buy {
    grid-column: 1;
    grid-row: 1;
  }
  /* Der Kaufbereich beginnt immer unterhalb der großen Überschrift,
     nur das Foto darf sie überlappen. */
  .feature__buy {
    align-self: start;
    padding-top: calc(clamp(2rem, 5.5vw, 5.5rem) + clamp(2rem, 3.5vw, 3.5rem));
  }
  .feature--creme .feature__grid {
    grid-template-columns: 6fr 1fr 5fr;
  }
  .feature--creme .feature__media {
    grid-column: 1;
    grid-row: 1;
  }
  .feature--creme .feature__buy {
    grid-column: 3;
    grid-row: 1;
  }
}

/* Ohne Animationen bleibt der Espresso-Abschnitt dauerhaft dunkel. */
html:not(.motion) .feature--espresso,
html:not(.motion-ready) .feature--espresso {
  --fg: #f5f4f0;
  --fg-muted: #a9a69f;
  --line: rgba(245, 244, 240, 0.14);
  --line-strong: rgba(245, 244, 240, 0.38);
  --shell: rgba(245, 244, 240, 0.05);
  --shell-ring: rgba(245, 244, 240, 0.1);
  --dot-on: #c9c5bc;
  --dot-off: #3d3c39;
  --bg: var(--night);
  background: var(--night);
  color: var(--fg);
}

/* Kaufbereich (wird aus dem Katalog befüllt) */
.buy {
  display: grid;
  gap: 1.75rem;
  max-width: 30rem;
}
.buy__desc {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.1vw, 1.9rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}
.buy__label {
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.suit {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 1rem 0;
  border-block: 1px solid var(--line);
  max-width: 22rem;
}
.suit__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  font-size: 0.97rem;
}
.suit__row dt {
  color: var(--fg-muted);
}
.suit__row dd {
  display: flex;
  gap: 0.45rem;
  margin: 0;
}
.dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--dot-off);
  transition: background-color 900ms var(--ease-soft);
}
.dot--on {
  background: var(--dot-on);
}

/* Segment-Auswahl (Größe, Kaffee-Finder) */
.seg {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.seg legend {
  padding: 0;
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.seg__options {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-size: 0.97rem;
  white-space: nowrap;
  transition: background-color 500ms var(--ease-soft), color 500ms var(--ease-soft);
}
.seg label:hover input:not(:checked) + span {
  background: var(--shell);
}
.seg input:checked + span {
  background: var(--fg);
  color: var(--bg);
}
.seg input:focus-visible + span {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.price {
  display: grid;
  gap: 0.35rem;
}
.price__main {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.price__compare {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--fg-muted);
}
.price__note {
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.price.is-changing .price__main {
  animation: price-in 600ms var(--ease) both;
}
@keyframes price-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.buy .btn {
  justify-self: start;
  min-width: min(100%, 19rem);
}

@media (max-width: 899px) {
  .feature__title {
    font-size: clamp(3.6rem, 19vw, 8rem);
    white-space: normal;
  }
  .feature--creme .feature__title {
    text-align: left;
  }
  .feature__media {
    max-width: none;
  }
  .buy .btn {
    width: 100%;
  }
}

/* ---------- Kaffee-Finder ---------- */

.finder__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.finder__intro {
  display: grid;
  gap: 1.5rem;
}
.finder__core {
  display: grid;
  gap: 2.25rem;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  background: var(--paper);
  color: var(--ink);
}
.finder__card {
  --fg: var(--ink);
  --bg: var(--paper);
  --fg-muted: #5f5e5a;
  --line: rgba(55, 55, 53, 0.12);
  --line-strong: rgba(55, 55, 53, 0.38);
  --shell: rgba(55, 55, 53, 0.045);
  --dot-on: #8d8880;
  --dot-off: #d9d6ce;
}
.finder__card .seg__options {
  display: grid;
  width: 100%;
}
.finder__result {
  display: grid;
  gap: 1.25rem;
}
.finder__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.finder__head .finder__img {
  /* Spezifischer als ".frame__core img", das Bilder sonst auf volle Breite zieht */
  width: clamp(64px, 8vw, 92px);
  height: auto;
  object-fit: contain;
  margin-bottom: -0.25rem;
  filter: drop-shadow(0 14px 14px rgba(28, 28, 27, 0.18));
}
.finder__pick {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4.6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.finder__why {
  color: var(--fg-muted);
  max-width: 34rem;
}
.finder__compare {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem 0;
  border-block: 1px solid var(--line);
}
.finder__compare div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}
.finder__compare dt {
  color: var(--fg-muted);
}
.finder__compare dt strong {
  color: var(--ink);
  font-weight: 500;
}
.finder__compare dd {
  display: flex;
  gap: 0.45rem;
  margin: 0;
}
.finder__result.is-changing > * {
  animation: price-in 650ms var(--ease) both;
}
.finder__result.is-changing > *:nth-child(2) {
  animation-delay: 60ms;
}
.finder__result.is-changing > *:nth-child(3) {
  animation-delay: 120ms;
}
.finder__result.is-changing > *:nth-child(4) {
  animation-delay: 180ms;
}
.finder__result.is-changing .finder__img {
  animation: pack-in 800ms var(--ease) both;
}
@keyframes pack-in {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(-4deg);
  }
}
@media (min-width: 900px) {
  .finder__grid {
    grid-template-columns: 5fr 7fr;
    gap: clamp(3rem, 6vw, 6rem);
  }
}
@media (max-width: 520px) {
  .finder__card .seg__options {
    grid-auto-flow: row;
    border-radius: 24px;
  }
}

/* ---------- Laufband ---------- */

.marquee {
  overflow: hidden;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-block: 1px solid var(--line);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.motion-ready .marquee__track {
  animation: none;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-right: clamp(1.5rem, 3vw, 3rem);
}
.marquee span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee i {
  flex: none;
  width: clamp(1.5rem, 3vw, 3rem);
  height: 1px;
  background: var(--line-strong);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Geschichte ---------- */

.story__grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}
.story__text {
  display: grid;
  gap: 1.5rem;
}
.story__media {
  position: relative;
}
.story__big .frame__core,
.story__small .frame__core {
  aspect-ratio: 4 / 5;
}
.story__small {
  margin-top: -18%;
  width: 52%;
  rotate: -3deg;
  position: relative;
  z-index: 1;
}
@media (min-width: 900px) {
  .story__grid {
    grid-template-columns: 5fr 7fr;
    gap: clamp(3rem, 7vw, 7rem);
  }
  .story__big {
    width: 78%;
    margin-left: auto;
  }
  .story__small {
    position: absolute;
    left: 0;
    bottom: -8%;
    width: 42%;
    margin: 0;
  }
  .story__media {
    padding-bottom: 6%;
  }
}
@media (max-width: 899px) {
  .story__small {
    rotate: 0deg;
    margin-left: auto;
    margin-right: 6%;
  }
}

/* ---------- Service-Bento ---------- */

.service__title {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.bento {
  display: grid;
  gap: 1rem;
}
.bento__cell .bento__core {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
  min-height: 15rem;
  padding: clamp(1.75rem, 3vw, 2.75rem);
}
.bento__core .icon {
  width: 2rem;
  height: 2rem;
  opacity: 0.8;
}
.bento__core p:last-child {
  max-width: 24rem;
  opacity: 0.8;
}
.bento__core--night {
  background: var(--night);
  color: #f5f4f0;
}
.bento__core--paper {
  background: var(--paper);
  color: var(--ink);
}
.bento__core--stone {
  background: var(--stone);
  color: var(--ink);
}
.bento__big {
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 12rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
}
.bento__cell--b .bento__big {
  font-size: clamp(4rem, 8vw, 7rem);
}
.bento__mid {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
@media (min-width: 900px) {
  .bento {
    grid-template-columns: 7fr 5fr;
    grid-template-rows: auto auto;
  }
  .bento__cell--a {
    grid-row: span 2;
  }
  .bento__cell--a .bento__core {
    min-height: 34rem;
  }
}

/* ---------- Fragen ---------- */

.faq__grid {
  display: grid;
  gap: 3rem;
}
.faq__intro {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}
.faq__list details {
  border-top: 1px solid var(--line);
}
.faq__list details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq__list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  cursor: pointer;
  list-style: none;
}
.faq__list summary::-webkit-details-marker {
  display: none;
}
.faq__toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform 600ms var(--ease-soft), background-color 400ms var(--ease);
}
.faq__list summary:hover .faq__toggle {
  background: var(--shell);
}
.faq__list details[open] .faq__toggle {
  transform: rotate(45deg);
}
.faq__list details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 600ms var(--ease-soft), content-visibility 600ms allow-discrete;
}
.faq__list details[open]::details-content {
  block-size: auto;
}
.faq__answer {
  padding-bottom: 1.6rem;
  max-width: 40rem;
  color: var(--fg-muted);
}
@media (min-width: 900px) {
  .faq__grid {
    grid-template-columns: 5fr 7fr;
    gap: clamp(3rem, 7vw, 7rem);
  }
  .faq__intro {
    position: sticky;
    top: calc(var(--island-top) + var(--island-h) + 3rem);
    align-self: start;
  }
}

/* ---------- Animations-Startzustände (nur mit aktiver Bewegung) ---------- */

.motion .hero__logo .logo-s,
.motion .hero__logo .logo-o,
.motion .hero__logo .logo-y,
.motion .hero__logo .logo-cafe,
.motion .hero__logo .logo-line,
.motion .hero__photo,
.motion .hero__foot > * {
  opacity: 0;
}

/* Insel blendet sich beim Herunterscrollen aus und beim Hochscrollen ein. */
.island {
  transition: transform 700ms var(--ease-soft);
}
.island.is-hidden {
  transform: translate(-50%, calc(-100% - var(--island-top) - 10px));
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}
