/*
 * Traum Cafe: Über uns mit Kassenbon.
 * Abschnitt, Tisch und Milchglas: siehe sections.css. Tokens: hero.css.
 */

.about {
  --paper: #fffefa;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Letzter Abschnitt: mindestens bildschirmhoch, sonst bliebe oben ein Streifen der Galerie stehen */
  display: grid;
  align-content: center;
  min-height: 100svh;
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
  width: min(100%, 68rem);
  margin-inline: auto;
}

/* ---------- Text ---------- */

.about__card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 1.5rem;
}

.about__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.about__lead {
  margin: 1rem 0 1.25rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 650;
  line-height: 1.3;
  text-wrap: balance;
}

.about__card > p:not(.about__lead) {
  max-width: 36rem;
  margin: 0 0 0.9rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* ---------- Kassenbon ---------- */

.about__receipt {
  display: grid;
  justify-items: center;
  /* Schatten des Bons auf dem Tisch (die Zackenränder entstehen per Maske) */
  filter: drop-shadow(0 14px 18px rgb(48 22 8 / 0.22)) drop-shadow(0 2px 3px rgb(48 22 8 / 0.12));
}

.receipt {
  --tooth: 0.55rem;

  width: min(100%, 22rem);
  padding: calc(var(--tooth) + 1.25rem) 1.5rem calc(var(--tooth) + 1.5rem);
  background: var(--paper);
  color: #2b2a26;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  rotate: 1.5deg;
  /* gezackte Abrisskanten oben und unten */
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--tooth) * 2 + 1px) no-repeat;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) center / 100% calc(100% - var(--tooth) * 2 + 1px) no-repeat;
}

.receipt p {
  margin: 0;
}

.receipt__shop {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.receipt__line {
  text-align: center;
  color: #5a5852;
}

.receipt .receipt__shop + .receipt__line {
  margin-top: 0.35rem;
}

.receipt__rows {
  margin: 1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1.5px dashed #b8b5ad;
  list-style: none;
}

.receipt__rows li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0;
}

.receipt__rows li > span:last-child {
  flex: none;
  text-align: right;
}

.receipt__rows--sum {
  font-weight: 700;
}

.receipt__discount {
  color: var(--tomato-text);
}

.receipt .receipt__code {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 3px double #b8b5ad;
  text-align: center;
  letter-spacing: 0.04em;
}

.receipt .receipt__thanks {
  margin-top: 0.35rem;
  color: #5a5852;
  text-align: center;
}

/* Vor dem Drucken (about.js) noch nicht zu sehen; für Screenreader trotzdem lesbar */
.receipt.is-waiting {
  clip-path: inset(0 0 100% 0);
}

/* Drucken oder als PDF speichern: Bon immer ganz zeigen */
@media print {
  .receipt.is-waiting {
    clip-path: none;
  }
}

/* ---------- Tablet und Handy ---------- */

@media (max-width: 960px), (max-width: 1199px) and (orientation: portrait) {
  .about__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 2.5rem;
  }

  .about__card {
    width: min(100%, 38rem);
  }
}

@media (max-width: 420px) {
  .about__card {
    padding: 1.25rem;
  }

  .receipt {
    padding-inline: 1.15rem;
    font-size: 0.8125rem;
  }
}

/* Handy: beide Knöpfe volle Breite untereinander, wie bei den Öffnungszeiten */
@media (max-width: 440px) {
  .about__actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
}
