/* linktree.analog.fail
   Farben, Schriften, Abstände und Schatten nach 020-branding/analog-fail-design-system.md
   (Dark Zone: #1d1d1b, Akzente #ffed00 / #87c0ea / #bce4fa, DM Serif Display + DM Sans).
   Inhalte NICHT hier ändern, sondern in links.json, dann build.py. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/DMSans-Regular-latinext.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: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/DMSans-Regular-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;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSerifDisplay-Regular-latinext.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: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSerifDisplay-Regular-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;
}

:root {
  --black: #1d1d1b;
  --yellow: #ffed00;
  --blue-dark: #00476f;
  --blue-mid: #87c0ea;
  --blue-light: #bce4fa;
  --text: #ffffff;
  --text-body: #b0b0a8;
  --text-muted: #a3a39b;

  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.075);
  --line: rgba(188, 228, 250, 0.14);

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2rem;
  --sp-6: 3rem;

  --r-md: 8px;
  --r-lg: 12px;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.25), 0 16px 32px -14px rgba(0, 0, 0, 0.7);

  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ruhiger Markengrund als fixierte Ebene (statt background-attachment: fixed,
   das iOS ignoriert): gelbes Licht oben links, Blau unten rechts, darüber eine
   sehr feine Bandstruktur als Anklang an Analog. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--black);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    radial-gradient(70vmax 55vmax at -8% -10%, rgba(255, 237, 0, 0.16), transparent 62%),
    radial-gradient(70vmax 60vmax at 110% 108%, rgba(0, 71, 111, 0.6), transparent 64%),
    radial-gradient(45vmax 35vmax at 100% 0%, rgba(135, 192, 234, 0.09), transparent 60%);
}

a { color: inherit; }

.page {
  width: 100%;
  max-width: 34rem; /* 544px */
  margin: 0 auto;
  padding:
    max(var(--sp-6), env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(var(--sp-5), env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Kopf ───────────────────────────────────────────────────────── */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 7.5rem;
  height: 7.5rem;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--blue-mid) 55%, var(--blue-light) 100%);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.8);
}

.avatar picture,
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.avatar img {
  object-fit: cover;
  border: 3px solid var(--black);
  background: var(--black);
}

.wordmark {
  display: block;
  width: min(100%, 17.5rem);
  margin-top: var(--sp-4);
  line-height: 0;
  border-radius: var(--r-md);
  text-decoration: none;
}

.wordmark svg {
  display: block;
  width: 100%;
  height: auto;
}

.strip {
  display: block;
  width: 3rem;
  height: 3px;
  margin: var(--sp-4) auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffed00 0%, #87c0ea 50%, #bce4fa 100%);
}

.headline {
  margin: var(--sp-3) 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.15rem);
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0.005em;
}

.intro {
  max-width: 26rem;
  margin: var(--sp-2) 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  text-wrap: pretty;
}

/* ── Linkkarten ─────────────────────────────────────────────────── */

.links { margin-top: var(--sp-5); }

.links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 4.75rem;
  padding: 0.875rem 1rem 0.875rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    transform 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.card__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  background: rgba(135, 192, 234, 0.12);
  border: 1px solid rgba(135, 192, 234, 0.2);
  color: var(--blue-light);
}

.card__icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: currentColor;
}

.card__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.card__desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-body);
}

.card__arrow {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  transition: transform 200ms ease, color 200ms ease;
}

/* Hervorgehobene Karte (YouTube): Markenverlauf als Rahmen, gelbe Kachel */
.card--featured {
  border: 1.5px solid transparent;
  background:
    linear-gradient(rgba(38, 38, 35, 0.94), rgba(33, 35, 36, 0.94)) padding-box,
    linear-gradient(110deg, #ffed00 0%, #87c0ea 60%, #bce4fa 100%) border-box;
  min-height: 5.25rem;
}

.card--featured .card__icon {
  width: 3.25rem;
  height: 3.25rem;
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.card--featured .card__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.card--featured .card__title { font-size: 1.125rem; }
.card--featured .card__arrow { color: var(--yellow); }

/* Zustände */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    background-color: var(--surface-hover);
    border-color: var(--blue-mid);
    box-shadow: var(--shadow-hover);
  }
  .card--featured:hover {
    border-color: transparent;
    background:
      linear-gradient(rgba(44, 44, 41, 0.96), rgba(38, 41, 43, 0.96)) padding-box,
      linear-gradient(110deg, #ffed00 0%, #87c0ea 60%, #bce4fa 100%) border-box;
  }
  .card:hover .card__arrow {
    transform: translateX(3px);
    color: var(--blue-light);
  }
  .card--featured:hover .card__arrow { color: var(--yellow); }
}

.card:active { transform: translateY(0) scale(0.985); }

.card:focus-visible,
.wordmark:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* ── Footer ─────────────────────────────────────────────────────── */

.footer {
  margin-top: auto;
  padding-top: var(--sp-6);
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer p { margin: 0; }

.footer__brand span {
  color: var(--text);
  font-weight: 600;
}

.footer__legal { margin-top: var(--sp-2) !important; }

.footer__legal a {
  display: inline-block;
  padding: 0.5rem 0.25rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(163, 163, 155, 0.4);
  text-underline-offset: 3px;
  border-radius: 4px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.footer__legal a:hover {
  color: var(--blue-light);
  text-decoration-color: currentColor;
}

.footer__sep {
  margin: 0 0.5rem;
  color: rgba(163, 163, 155, 0.5);
}

/* ── Größere Bildschirme ────────────────────────────────────────── */

@media (max-width: 599px) {
  .page { padding-top: max(2.25rem, env(safe-area-inset-top)); }
  .avatar { width: 6.75rem; height: 6.75rem; }
  .wordmark { width: min(100%, 15.5rem); margin-top: 1.25rem; }
  .strip { margin-top: 1.25rem; }
  .links { margin-top: var(--sp-4); }
  .card { gap: 0.875rem; min-height: 4.5rem; padding: 0.75rem 0.875rem 0.75rem 0.75rem; }
  .card__icon { width: 2.75rem; height: 2.75rem; }
  .card--featured { min-height: 5rem; }
  .card--featured .card__icon { width: 3rem; height: 3rem; }
  .card__desc { font-size: 0.875rem; }
}

@media (min-width: 600px) {
  .page { padding-top: 4.5rem; }
  .avatar { width: 8.5rem; height: 8.5rem; }
  .wordmark { width: 20rem; }
  .card { padding: 1rem 1.25rem 1rem 1rem; }
}

/* ── Bewegung ───────────────────────────────────────────────────── */

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .profile > *,
  .links li,
  .footer {
    animation: reveal-up 0.5s ease both;
  }
  .profile > :nth-child(2) { animation-delay: 60ms; }
  .profile > :nth-child(3) { animation-delay: 120ms; }
  .profile > :nth-child(4) { animation-delay: 160ms; }
  .profile > :nth-child(5) { animation-delay: 200ms; }
  .links li:nth-child(1) { animation-delay: 260ms; }
  .links li:nth-child(2) { animation-delay: 320ms; }
  .links li:nth-child(3) { animation-delay: 380ms; }
  .links li:nth-child(4) { animation-delay: 440ms; }
  .links li:nth-child(5) { animation-delay: 500ms; }
  .links li:nth-child(n+6) { animation-delay: 560ms; }
  .footer { animation-delay: 600ms; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .card:hover,
  .card:active { transform: none; }
}

@media (forced-colors: active) {
  .card { border: 1px solid CanvasText; }
  .strip { background: CanvasText; }
}
