/*
 * We4Horses – Pferdephysiotherapie
 *
 * Handgeschriebenes Stylesheet ohne Framework. Warme, entsättigte Greige-Palette passend zur Fotografie und zum Serifen-Logo.
 */

/*
 * Die Schrift des Logos. `swap` zeigt die Überschriften sofort in der Ersatzschrift, statt sie bis zum Laden unsichtbar zu lassen.
 */

@font-face {
  font-family: "DM Serif Text";
  src: url("/assets/DMSerifText-Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #d7d0c6;
  --card: #f2eee8;
  --ink: #2e2a24;
  --ink-soft: #4f483d;
  --line: #b7ad9e;
  --band: #e6e0d7;
  --band-deep: #c9c1b6;
  --overlay-text: #f7f3ec;
  --overlay-muted: #ded5c6;
  --accent: #5c462e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  /*
   * Überschriften und Wortmarke laufen in der Schrift des Logos, der Fließtext bleibt in der Lesetype.
   */
  --display: "DM Serif Text", var(--serif);

  /*
   * Sättigung aller Fotos: 0 schwarzweiß, 1 Originalfarben.
   *
   * Alle Aufnahmen liegen farbig in der Datei, auch das Hintergrundfoto des Heros. Die Entsättigung ist allein eine Entscheidung dieses Stylesheets und lässt sich hier für die ganze Website zurücknehmen.
   */
  --photo-saturation: 0.5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: saturate(var(--photo-saturation));
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: normal;
  line-height: 1.15;
  text-wrap: balance;
}

.container {
  margin-inline: auto;
  max-width: 66rem;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -100vw;
  top: 0;
  background: var(--ink);
  color: var(--card);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Header */

.site-header {
  background: var(--band-deep);
  color: var(--ink);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.1rem;
}

.wordmark {
  flex-basis: 100%;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark strong {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.wordmark span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  flex-basis: 100%;
  justify-content: center;
  gap: 0.35rem 1.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/*
 * Wortmarke und Navigation stehen zunächst zentriert übereinander und rücken erst nebeneinander, wenn beide zusammen in eine Zeile passen.
 *
 * Der Umbruch ist hier entschieden und nicht dem Zufall der Wortbreiten überlassen: die Navigation bricht von sich aus erst bei rund 48 rem um, ein umbenannter Menüpunkt verschöbe diesen Punkt aber und die Zentrierung würde in einem schmalen Bereich danebenliegen.
 */

@media (min-width: 49rem) {
  .wordmark {
    flex-basis: auto;
    text-align: left;
  }

  .site-nav {
    flex-basis: auto;
  }
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.2rem;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}

/* Hero (Startseite) */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: max(34rem, 82vh);
  padding-block: clamp(4rem, 10vw, 7rem);
  color: var(--overlay-text);
  text-align: center;
}

/*
 * Foto und Verlauf liegen in getrennten Ebenen, weil ein Filter auf dem Element auch den Verlauf darüber entsättigen und den warmen Ton wegnehmen würde.
 */

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero::before {
  z-index: -2;
  background: url("/assets/weide.webp") center / cover no-repeat;
  filter: saturate(var(--photo-saturation));
}

.hero::after {
  z-index: -1;
  background: linear-gradient(rgba(46, 38, 28, 0.5), rgba(46, 38, 28, 0.68));
}

.hero .container {
  max-width: 46rem;
}

.hero img {
  width: clamp(9rem, 22vw, 13rem);
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

.hero p {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--overlay-muted);
}

.hero .actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--card);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

.button.outline {
  background: transparent;
  color: inherit;
  border-color: currentcolor;
}

.button.outline:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

/* Abschnitte */

.section {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}

.section + .section,
.page-intro + .section {
  padding-top: 0;
}

.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin-bottom: 1.25rem;
}

.prose {
  max-width: 44rem;
}

.prose p + p,
.prose ul + p,
.prose p + ul {
  margin-top: 1rem;
}

.prose ul {
  padding-left: 1.4rem;
}

.prose a {
  color: var(--accent);
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.lede {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 44rem;
}

/* Seitenkopf der Unterseiten */

.page-intro {
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.page-intro h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 1.25rem;
}

/* Kartenraster */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.container > .cards:first-child {
  margin-top: 0;
}

.cards article {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1.75rem;
}

.cards h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.cards p {
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Kundenstimmen */

.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.testimonials figure {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1.75rem;
}

.testimonials .stars {
  color: var(--accent);
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  line-height: 1;
  margin-bottom: 1.1rem;
}

.testimonials blockquote {
  font-size: 1rem;
  color: var(--ink-soft);
}

.testimonials blockquote p::before {
  content: "„";
}

.testimonials blockquote p::after {
  content: "“";
}

.testimonials figcaption {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Bild-Text-Abschnitte */

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 46rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split.reverse > figure {
    order: 1;
  }
}

.split figure img {
  width: 100%;
}

/* Fotogruppe */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 1.5vw, 0.9rem);
}

.photo-grid img {
  aspect-ratio: 1;
  object-fit: cover;
}

/* Bilderstreifen */

/*
 * Der Streifen ist mit `tabindex` fokussierbar, weil er sonst allein mit der Tastatur nicht zu scrollen wäre: die Bilder darin sind keine Links und nichts anderes in ihm nimmt Fokus an.
 */

.gallery {
  display: flex;
  gap: clamp(0.5rem, 1.5vw, 0.9rem);
  margin-top: 2.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 1rem;
}

.gallery img {
  flex: none;
  width: clamp(11rem, 26vw, 16rem);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  scroll-snap-align: start;
}

/* Preisliste */

.price-list {
  max-width: 44rem;
  margin-top: 2rem;
}

.price-list div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.price-list dt small {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.price-list dd {
  font-size: 1.3rem;
  white-space: nowrap;
}

.price-list + .prose {
  margin-top: 2rem;
  color: var(--ink-soft);
}

/* Kontakt- und Hinweisflächen */

.band {
  background: var(--band);
  color: var(--ink);
  text-align: center;
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}

.band h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
}

.band p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin-inline: auto;
}

.band .phone {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.2rem;
}

.band .phone:hover {
  color: var(--accent);
}

.contact-list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  font-size: 1.15rem;
}

.contact-list strong {
  display: block;
  font-weight: normal;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.contact-list a:hover {
  border-color: var(--accent);
}

/* Impressum */

.legal dl {
  margin-top: 2rem;
  max-width: 44rem;
}

.legal dt {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1.5rem;
}

.legal dd {
  font-size: 1.15rem;
}

/* Footer */

.site-footer {
  background: var(--band-deep);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  padding-block: 2.5rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .brand strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: normal;
}

.site-footer ul {
  list-style: none;
}

/* Sprung zum Seitenanfang */

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
}

.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--card);
}

.to-top svg {
  width: 1.1rem;
  height: 1.1rem;
}

/*
 * Der Knopf blendet sich ein, sobald ein Stück weit gescrollt ist, und ist bis dahin auch für Tastatur und Screenreader nicht da.
 *
 * Wo die Scroll-Zeitachse fehlt, bleibt er dauerhaft sichtbar: ein Knopf, der ohne sie niemals erschiene, wäre schlechter als einer, der immer da ist.
 */

/*
 * Die Dauer steht ausgeschrieben da, weil nur `auto` die Animation über die Zeitachse laufen lässt; die Kurzschrift `animation` setzt sie auf ihren Anfangswert zurück, und ob der `auto` oder `0s` ist, entscheidet der Browser.
 */

@supports (animation-timeline: scroll()) {
  .to-top {
    animation-name: to-top-einblenden;
    animation-duration: auto;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root block);
    animation-range: 40vh 90vh;
  }
}

@keyframes to-top-einblenden {
  from {
    opacity: 0;
    visibility: hidden;
  }

  to {
    opacity: 1;
    visibility: visible;
  }
}
