/* ---------- Schrift: Outfit, lokal eingebunden (keine Verbindung zu Google) ----------
   Variable Schrift – eine Datei deckt 400 und 600 ab */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --text: #111;
  --paper: #f3f3f3;
  --paper-0: rgba(243, 243, 243, 0);
  --white: #fff;
  --accent: #0e191f;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Outfit", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.7vw, 1.75rem);
  line-height: 1.33;
  -webkit-font-smoothing: antialiased;
}

strong {
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- Mauszeiger: Banane ----------
   Hotspot 9/1 = Stielspitze. Schwarz auf hellem Grund, weiss auf dunklem.
   Auch Links behalten die Banane (Fallback: normale Hand). */
html {
  cursor: url("mouse_black.png") 9 1, auto;
}

a {
  cursor: url("mouse_black.png") 9 1, pointer;
}

/* dunkle Flächen → weisse Banane */
.footer,
.button,
.facts a,
.footer a.footer__brand {
  cursor: url("mouse_white.png") 9 1, pointer;
}

/* helle Flächen im Footer → schwarze Banane
   (Textlinks füllen sich beim Hover hell, der CTA-Button ist weiss) */
.footer a,
.footer a.button--white {
  cursor: url("mouse_black.png") 9 1, pointer;
}

/* ---------- Fixiertes Hintergrundbild ----------
   Als fixiertes Element statt background-attachment: fixed,
   damit es auch auf iOS zuverlässig stehen bleibt. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper);
}

/* Desktop: Bild mittig fixiert. Es skaliert nicht stufenlos mit, sondern
   springt zwischen zwei festen Grössen (1500 px / 2000 px).
   Passt es in die Höhe, sitzt es unten; ist es höher als das Fenster,
   sitzt es oben – so bleibt der Kopf sichtbar und die Beine werden angeschnitten.
   (Bildhöhe = Breite / 1.387: 1500 → 1082 px, 2000 → 1442 px)
   Die Bildränder sind bereits #f3f3f3 und gehen nahtlos in den Hintergrund über. */
.bg img {
  position: absolute;
  left: 50%;
  top: max(0px, calc(100vh - 1082px));
  transform: translateX(-50%);
  width: 1500px;
  max-width: none;
  height: auto;
  display: block;
}

@media (min-width: 1800px) {
  .bg img {
    top: max(0px, calc(100vh - 1442px));
    width: 2000px;
  }
}

/* ---------- Text ---------- */
.content {
  position: relative;
  padding-left: 14vw;
  padding-right: 1.5rem;
}

.intro {
  padding-top: 16vh;
  padding-bottom: 1.6em;
}

/* Intro deutlich grösser als der Fliesstext */
/* Text wächst mit, das Bild nicht – Spalte deshalb auch auf 40vw begrenzt,
   damit sie nicht in Vincent hineinläuft */
.intro h1 {
  max-width: min(15.5em, 40vw);
  margin: 0;
  font-weight: 400;
  font-size: 1.6em;
  line-height: 1.28;
}

/* ---------- Sprachumschalter DE / EN (oben rechts, ausserhalb des Seitenflusses) ---------- */
.lang-switch {
  position: absolute;
  top: max(1.1rem, env(safe-area-inset-top));
  right: max(1.5rem, env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.45em 0.95em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.lang-switch a {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  opacity: 1;
  text-decoration: none;
}

.lang-switch a[aria-current] {
  opacity: 1;
  font-weight: 600;
}

.lang-switch span {
  opacity: 0.35;
}

/* ---------- Like-Button unter dem Intro ---------- */
.like {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 1.2em;
  padding: 0.55em 1.2em 0.55em 1em;
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.like:hover,
.like:focus-visible {
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.like:active {
  transform: scale(0.94);
}

.like__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transform-origin: 50% 70%;
  transition: fill 0.2s ease, stroke 0.2s ease, transform 0.2s ease;
}

.like:hover .like__icon,
.like:focus-visible .like__icon {
  transform: scale(1.12);
}

/* nach dem Klick: Daumen gefüllt, kurzer „Pop“ */
.like.is-liked .like__icon {
  fill: currentColor;
  animation: like-pop 0.4s ease;
}

@keyframes like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1.12); }
}

/* ---------- Anfrage-Button ---------- */
/* Die Dock-Leiste hat keine Höhe und klebt unten im Viewport (sticky).
   Am Seitenende erreicht sie ihre eigentliche Position – die Oberkante
   des Footers – und die Buttons sitzen dann mittig auf dieser Kante. */
.dock {
  position: sticky;
  bottom: calc(max(2rem, env(safe-area-inset-bottom)) + 1.4rem);
  z-index: 10;
  height: 0;
}

.actions {
  position: absolute;
  right: max(2rem, env(safe-area-inset-right));
  bottom: 0;
  transform: translateY(50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
}

/* Nur mobil sichtbar */
.scroll-hint {
  display: none;
}

.button {
  display: inline-block;
  padding: 0.75em 1.4em;
  border-radius: 999px;
  background: var(--text);
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, color 0.2s;
}

.button:hover,
.button:focus-visible {
  background: #444;
  text-decoration: none;
}

.facts {
  max-width: min(25em, 40vw);
  padding-bottom: 20vh;
}

/* Linie über „Random Facts“ */
.facts h2 {
  font-size: 1em;
  font-weight: 400;
  border-top: 2px solid var(--text);
  padding-top: 1.2em;
  margin: 0 0 1.4em;
}

.facts p {
  margin: 0 0 1.33em;
}

/* Links in den Facts: Akzentfarbe + ↗, ohne Unterstreichung. Beim Hover
   füllt sich der Link von unten in der Akzentfarbe und die Schrift wird hell */
.facts a {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--accent);
  padding: 0 0.12em;
  margin: 0 -0.12em;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 100% 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.25s ease, color 0.25s ease;
}

.facts a::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.15em;
  font-size: 0.8em;
  transition: transform 0.25s ease;
}

.facts a:hover,
.facts a:focus-visible {
  background-size: 100% 100%;
  color: var(--paper);
  text-decoration: none;
}

.facts a:hover::after,
.facts a:focus-visible::after {
  transform: translate(0.12em, -0.12em);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--accent);
  color: #fff;
  font-size: 0.72em;
  line-height: 1.5;
  padding: 6rem max(2rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) 14vw;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 3rem 4rem;
  max-width: 72rem;
}

.footer h2 {
  font-size: 0.8em;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1.2em;
}

.footer h2:not(:first-child) {
  margin-top: 2.5em;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer p {
  margin: 0 0 1em;
}

/* Footer-Links: Hover analog zu den Facts, aber invertiert –
   helle Fläche wächst von unten, Schrift wird dunkel */
.footer a {
  display: inline-block;
  padding: 0 0.15em;
  margin: 0 -0.15em;
  background: linear-gradient(var(--paper), var(--paper)) no-repeat 0 100% / 100% 0;
  transition: background-size 0.25s ease, color 0.25s ease;
}

.footer a:hover,
.footer a:focus-visible {
  background-size: 100% 100%;
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover .footer__type,
.footer a:focus-visible .footer__type {
  color: rgba(14, 25, 31, 0.6);
}

/* Laufende Projekte: Logo-Links oben im Footer, Linie über die volle Breite */
.footer__brands {
  margin-bottom: 4rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer .footer__brands h2 {
  margin-bottom: 2em;
}

.footer__brand-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2.5rem 7rem;
}

.footer a.footer__brand {
  display: block;
  padding: 0;
  margin: 0;
}

/* Logos statt Schriftzug. Das Workout-Cards-Logo ist fast quadratisch
   und bekommt mehr Höhe, damit beide optisch gleich gross wirken */
.footer__brand-logo {
  display: block;
  height: 7rem;
  width: auto;
  transform-origin: left bottom;
  transition: transform 0.25s ease;
}

.footer__brand-logo--woc {
  height: 6rem;
}

/* Beim Hover: bunte Version über der weissen einblenden.
   Die Hülle hat genau die Grösse des weissen Logos. */
.footer__brand-logos {
  position: relative;
  display: block;
  width: max-content;
  transform-origin: left bottom;
  transition: transform 0.25s ease;
}

.footer__brand-logo {
  transition: opacity 0.25s ease;
}

.footer__brand-logo-hover {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Bannerbauer: die weisse Datei hat Rand, die bunte nicht –
   bunte Version auf den sichtbaren Bereich des weissen Logos gelegt
   (weiss: Inhalt bei x 38 / y 24, 537 × 180 px in 600 × 232 px) */
.footer__brand-logos--bb .footer__brand-logo-hover {
  top: 9.6%;
  left: 6.3%;
  height: 78.3%;
}

.footer__brand:hover .footer__brand-logo,
.footer__brand:focus-visible .footer__brand-logo {
  opacity: 0;
}

.footer__brand:hover .footer__brand-logo-hover,
.footer__brand:focus-visible .footer__brand-logo-hover {
  opacity: 1;
}

.footer__brand-type {
  display: block;
  margin-top: 0.9em;
  font-size: 1.05em;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s ease;
}

/* Hover ohne helle Fläche – die Logos haben weisse Teile, die sonst verschwinden */
.footer a.footer__brand:hover,
.footer a.footer__brand:focus-visible {
  background-size: 100% 0;
  color: inherit;
}

.footer__brand:hover .footer__brand-logos,
.footer__brand:focus-visible .footer__brand-logos {
  transform: scale(1.04);
}

.footer__brand:hover .footer__brand-type,
.footer__brand:focus-visible .footer__brand-type {
  color: var(--white);
}

/* Projektliste: Name, darunter gedimmt die Projektart */
#projekte li {
  margin-bottom: 0.7em;
}

.footer__type {
  display: block;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.5);
}

.footer__legal {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85em;
}

/* Anfrage-CTA über dem Impressum */
.footer__cta {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer__cta-text {
  max-width: 14em;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}

.footer p.footer__cta-text {
  margin: 0 0 1.4rem;
}

/* Grosser weisser Button – überschreibt die allgemeinen Footer-Link-Stile */
.footer a.button--white {
  padding: 0.9em 2.4em;
  margin: 0;
  background: var(--white);
  color: var(--accent);
  font-size: 1.1rem;
  box-shadow: none;
  transition: background 0.2s, transform 0.2s;
}

.footer a.button--white:hover,
.footer a.button--white:focus-visible {
  background: var(--paper);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85em;
}

/* ---------- Datenschutz-Seite ---------- */
.legal-page {
  max-width: calc(40rem + 14vw);
  padding: 12vh 1.5rem 20vh 14vw;
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  line-height: 1.55;
}

.legal-page h1 {
  font-size: 2em;
  font-weight: 600;
  line-height: 1.15;
  margin: 1.2em 0 1em;
}

.legal-page h2 {
  font-size: 1.1em;
  font-weight: 600;
  margin: 2.2em 0 0.5em;
}

.legal-page p {
  margin: 0 0 1em;
}

.legal-page a {
  font-weight: 600;
}

.legal-page__back {
  font-size: 0.9em;
}

.legal-page__meta {
  margin-top: 3em;
  color: rgba(17, 17, 17, 0.55);
  font-size: 0.9em;
}

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  body {
    font-size: 0.9375rem;
    line-height: 1.35;
  }

  /* Ausschnitt auf Vincent, mittig, im unteren Bereich fixiert */
  .bg img {
    top: max(23svh, 13.5rem);
    bottom: auto;
    width: 260vw;
    transform: translateX(-74.5%);
  }

  .content {
    padding-left: 0;
    padding-right: 0;
  }

  /* Erster Screen: Intro oben, Foto darunter, Scroll-Hinweis unten */
  .intro {
    position: relative;
    min-height: 100svh;
    padding: 8svh 1.5rem 0;
  }

  .intro h1 {
    max-width: none;
    font-size: 1.35em;
  }

  .intro br {
    display: none;
  }

  /* sitzt knapp über dem fixierten Anfrage-Button */
  .scroll-hint {
    position: absolute;
    left: 50%;
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.75rem);
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: -1.375rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.08);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: nudge 2s ease-in-out infinite;
  }

  /* Mobil nur „Anfrage einreichen“, zentriert am unteren Bildschirmrand,
     mit Verlauf dahinter. Am Seitenende liegt die Leiste auf dem Footer auf. */
  .dock {
    bottom: 0;
  }

  .actions {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    justify-content: center;
    padding: 2.5rem 1rem max(1rem, env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, var(--paper-0), var(--paper) 55%);
    pointer-events: none;
    font-size: 0.875rem;
  }

  .actions .button {
    pointer-events: auto;
  }

  /* Verlauf transparent → Hintergrundfarbe, schiebt sich über das Foto */
  .facts {
    max-width: none;
    padding: 12vh 1.5rem 20vh;
    background: linear-gradient(
      to bottom,
      var(--paper-0) 0,
      rgba(243, 243, 243, 0.85) 18vh,
      var(--paper) 30vh
    );
  }

  .facts p {
    max-width: 24em;
  }

  .footer {
    font-size: 0.875rem;
    padding: 4rem 1.5rem max(2rem, env(safe-area-inset-bottom));
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer__bottom {
    margin-top: 3rem;
  }

  .legal-page {
    padding: 8vh 1.5rem 15vh;
  }
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

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

  .scroll-hint {
    animation: none;
  }
}
