/* ==========================================================================
   Lyvo One – Interim Landingpage
   Tokens 1:1 aus den Figma-Variablen (Collection 1) und Textstilen.
   Mobile first, Desktop-Layout ab 768px.
   ========================================================================== */

/* Design Tokens
   ========================================================================== */
:root {
  /* color */
  --color-dark: #1f141e;
  --color-dark-subtle: rgb(31 20 30 / 0.6);
  --color-dark-muted: rgb(31 20 30 / 0.3);
  --color-dark-20: rgb(31 20 30 / 0.2);
  --color-dark-10: rgb(31 20 30 / 0.1);
  --color-dark-5: rgb(31 20 30 / 0.05);
  --color-dark-0: rgb(31 20 30 / 0);
  --color-light: #ffffff;
  --color-light-subtle: rgb(255 255 255 / 0.6);
  --color-light-muted: rgb(255 255 255 / 0.4);
  --color-light-20: rgb(255 255 255 / 0.2);
  --color-light-10: rgb(255 255 255 / 0.15);
  --color-light-5: rgb(255 255 255 / 0.05);
  --color-light-0: rgb(255 255 255 / 0);

  /* spacing */
  --spacing-xx-small: 2px;
  --spacing-x-small: 4px;
  --spacing-small: 8px;
  --spacing-medium: 16px;
  --spacing-large: 24px;
  --spacing-x-large: 32px;
  --spacing-xx-large: 48px;
  --spacing-xxx-large: 96px;
  --spacing-big: 192px;

  /* radius */
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 16px;
  --radius-x-large: 24px;
  --radius-xx-large: 48px;
  --radius-full: 9999px;

  /* typography */
  --font-family: "Zalando Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-size-text: 20px;
  --font-size-meta: 14px;
  --line-height: 1.4;        /* Textstil "text" */
  --line-height-tight: 1.3;  /* Textstil "h3", Meta-Links, Bildunterschrift */
  --paragraph-spacing: 10px; /* nach Zwischenüberschriften */

  --transition: 150ms ease-out;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Seitenhintergrund: color/dark-10 über color/light */
  background-color: var(--color-light);
  background-image: linear-gradient(var(--color-dark-10), var(--color-dark-10));
}

body,
h1,
h2,
p,
figure {
  margin: 0;
}

h1,
h2 {
  font-size: inherit;
  font-weight: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-dark);
  outline-offset: 2px;
}

/* Textstile (Figma: text, h3)
   ========================================================================== */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-text);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text {
  font-size: var(--font-size-text);
  font-weight: 400;
  line-height: var(--line-height);
}

.h3 {
  font-size: var(--font-size-text);
  font-weight: 500;
  line-height: var(--line-height-tight);
}

/* Komponenten
   ========================================================================== */

/* logo */
.logo {
  display: block;
  width: 170px;
  height: 40px;
}

.logo img {
  width: 100%;
  height: 100%;
}

/* button – type=meta-link */
.meta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-small);
  font-size: var(--font-size-meta);
  line-height: var(--line-height-tight);
  color: var(--color-dark);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  white-space: nowrap;
  transition: color var(--transition);
}

.meta-link:hover {
  color: var(--color-dark-subtle);
}

/* Inline-Links im Fließtext (Impressum) */
.text-link {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  transition: color var(--transition);
}

.text-link--plain {
  text-decoration: none;
}

.text-link:hover {
  color: var(--color-dark-subtle);
}

/* Seitenlayout – Mobile
   ========================================================================== */
.page {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-large);
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--spacing-large);
}

.site-main {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-large);
}

.site-footer {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: var(--spacing-medium);
  margin-top: auto;
}

/* Home */
.page--home .site-main {
  flex: 1 0 auto;
}

.hero {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-small);
  object-fit: cover;
}

.intro {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: var(--spacing-large);
}

/* Team */
.team {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-large);
}

.team__text {
  /* Figma: maximale Textbreite */
  max-width: 672px;
}

.team__text p + p {
  margin-top: var(--spacing-medium);
}

.team__member {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-small);
  width: 50%;
  margin-left: auto;
}

.team__member img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-small);
  object-fit: cover;
}

.team__member figcaption {
  font-size: var(--font-size-meta);
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Impressum */
.imprint {
  /* Figma: maximale Textbreite wie auf "Wer wir sind" */
  max-width: 672px;
}

.imprint section > * + * {
  margin-top: var(--spacing-medium);
}

.imprint h2 + * {
  margin-top: var(--paragraph-spacing);
}

.imprint section + section {
  /* Leerzeile (1 × Zeilenhöhe) + 2 × Absatzabstand */
  margin-top: calc(var(--font-size-text) * var(--line-height) + 2 * var(--spacing-medium));
}

/* Seitenlayout – Desktop (ab 768px)
   ========================================================================== */
@media (min-width: 768px) {
  .page {
    display: grid;
    /* Logo-Spalte: 360px wie im Figma-Update, auf schmalen Desktops anteilig */
    grid-template-columns: min(360px, 30%) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: var(--spacing-large);
    padding: var(--spacing-large);
  }

  /* Logo bleibt beim Scrollen oben links stehen */
  .site-header {
    position: sticky;
    top: var(--spacing-large);
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  .site-main {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-start;
  }

  .site-footer {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
  }

  /* Breite einer Spalte innerhalb des zweispaltigen Inhaltsbereichs */
  .col {
    width: calc((100% - var(--spacing-large)) / 2);
  }

  /* Home: passt ohne Scrollen in den Viewport. Die Spalten sind dieselben wie
     auf den anderen Seiten – reicht die Höhe nicht, wird das Bild beschnitten. */
  .page--home {
    height: 100svh;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .page--home .site-main {
    min-height: 0;
    height: 100%;
  }

  .hero {
    /* Reicht die Höhe trotzdem nicht, schrumpft das Bild weiter statt zu scrollen */
    flex: 0 1 auto;
    height: auto;
    min-height: 0;
    max-height: 100%;
    aspect-ratio: 3 / 2;
  }

  .intro {
    flex: none;
  }

  /* Team */
  .team {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(320px, 32%);
    /* Figma: spacing/big (192px) bei 1440px, darunter proportional kleiner */
    column-gap: clamp(var(--spacing-large), 13.33vw, var(--spacing-big));
    width: 100%;
  }

  .team__member {
    width: 100%;
  }

  /* Team und Impressum: Footer bleibt unten rechts im Viewport */
  .page--team,
  .page--imprint {
    grid-template-rows: 1fr;
  }

  .page--team .site-footer,
  .page--imprint .site-footer {
    position: sticky;
    bottom: var(--spacing-large);
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
  }
}
