/* ============================================================
   andreas.fraunberger.at
   In Anlehnung an den chim.ai Web-Styleguide, bewusst anders:

   chim.ai                         hier
   -----------------------------   -----------------------------
   blau-schwarzer Grund            warmer Anthrazit-Pflaume-Grund
   Blau als Primärakzent           Pink als Primärakzent
   zentriert, Deck-artig           links, editorial
   Glas-Panels als Grundform       Haarlinien als Grundform
   Karten überall                  Typo + Weißraum tragen

   Geteilt bleiben: Livvic, die Farbfamilie, die ruhige Bewegung,
   die Zurückhaltung.
   ============================================================ */

:root {
  --bg-top:     #171320;
  --bg-mid:     #11121b;
  --bg-bottom:  #0b0d14;

  --ink:        #f4f1f8;
  --ink-soft:   rgba(240, 234, 247, 0.68);
  --ink-faint:  rgba(240, 234, 247, 0.40);

  --pink:       #ff93e4;
  --blue:       #68a3df;

  --line:       rgba(255, 255, 255, 0.11);
  --line-soft:  rgba(255, 255, 255, 0.055);

  --grad:       linear-gradient(100deg, #ff93e4 8%, #68a3df 82%);

  --measure:    62ch;
  --wrap:       1120px;
  --gutter:     clamp(20px, 5vw, 64px);

  --step--1: clamp(0.80rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.12rem);
  --step-1:  clamp(1.20rem, 1.10rem + 0.50vw, 1.50rem);
  --step-2:  clamp(1.55rem, 1.30rem + 1.20vw, 2.30rem);
  --step-3:  clamp(2.10rem, 1.55rem + 2.60vw, 3.90rem);
  --step-4:  clamp(2.60rem, 1.60rem + 4.60vw, 6.00rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: 'Livvic', system-ui, -apple-system, sans-serif;
  font-weight: 200;
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg-bottom);
  background-image: linear-gradient(178deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

section { padding-block: clamp(64px, 11vh, 132px); }
section + section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 28px;
}

h1, h2, h3 { font-weight: 200; line-height: 1.08; margin: 0; letter-spacing: -0.015em; }
h1 { font-size: var(--step-4); }
/* Eigene Home-Hero-Größe: "Dr. Andreas Fraunberger" muss auf einer Zeile bleiben.
   --step-4 ist für kurze Wörter ("On stage") gedacht, nicht für den vollen Namen. */
h1.name { font-size: clamp(1.9rem, 1.1rem + 2.4vw, 3.2rem); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 500; letter-spacing: 0; line-height: 1.3; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Bei line-height:1.08 (siehe h1,h2,h3) reicht die gemalte Fläche hinter dem
     Text nicht bis unter die Grundlinie — Unterlängen wie das "g" in "stage"
     wurden dadurch sichtbar abgeschnitten. Mehr Raum + etwas padding-bottom
     behebt das, ohne die enge Optik der Überschriften spürbar zu verändern. */
  line-height: 1.22;
  padding-bottom: 0.06em;
}

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); }
.soft { color: var(--ink-soft); }

/* ---------- Header ---------- */

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  background: rgba(11, 13, 20, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .mark {
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.site-head nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.site-head nav a {
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.site-head nav a:hover { color: var(--pink); }

.head-offset { height: 60px; }

/* ---------- Buttons ---------- */

.btns { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: 999px;
  font-size: var(--step-0); font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; }

/* Der LinkedIn-Button ist das lauteste Element der Seite. Absicht. */
.btn-li {
  background: var(--grad); color: #140f1c;
  box-shadow: 0 8px 34px rgba(255, 147, 228, 0.24);
}
.btn-li:hover { transform: translateY(-2px); box-shadow: 0 14px 46px rgba(255, 147, 228, 0.36); }

.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }

.link-quiet {
  color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.link-quiet:hover { color: var(--pink); border-color: var(--pink); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(56px, 12vh, 118px) clamp(56px, 10vh, 104px); }
.hero-grid {
  display: grid; gap: clamp(36px, 6vw, 76px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.45fr 0.85fr; } }

.hero h1 { margin-bottom: 22px; }
.hero .roles {
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 34px;
}
.hero .place { font-size: var(--step--1); color: var(--ink-faint); margin-top: 34px; letter-spacing: 0.03em; }

.portrait { position: relative; }
.portrait img {
  width: 100%; border-radius: 3px;
  filter: saturate(0.92) contrast(1.03);
}
.portrait::after {
  content: ''; position: absolute; inset: 0; border-radius: 3px;
  background: linear-gradient(150deg, rgba(255,147,228,0.14), rgba(104,163,223,0.10) 60%, transparent);
  pointer-events: none;
}
.portrait .note {
  position: absolute; left: 0; bottom: -26px;
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- Marquee (Marken) ---------- */

.marquee {
  overflow: hidden; position: relative;
  border-block: 1px solid var(--line-soft);
  padding-block: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: slide 64s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  padding-inline: 26px; white-space: nowrap;
  font-size: var(--step-0); color: var(--ink-faint); letter-spacing: 0.04em;
}
.marquee span::after { content: '·'; margin-left: 26px; color: rgba(255,255,255,0.16); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
}

/* ---------- Karten / Links ---------- */

.card-main {
  display: block; text-decoration: none;
  border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(28px, 4vw, 46px);
  background: linear-gradient(140deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), background-color 0.35s var(--ease);
}
.card-main:hover { border-color: rgba(255,147,228,0.42); transform: translateY(-3px); }
.card-logo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.card-logo { height: 50px; width: auto; }
.card-logo-row .arrow { font-size: var(--step-1); }
.card-main h3 { font-size: var(--step-2); font-weight: 200; letter-spacing: -0.01em; margin-bottom: 14px; }
.card-main .arrow { color: var(--pink); }
.card-main .sub {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: var(--step--1); color: var(--ink-soft);
}
.card-main .sub b { font-weight: 500; color: var(--pink); }

.card-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  text-decoration: none;
  padding: 26px 0; border-bottom: 1px solid var(--line-soft);
  transition: padding-inline-start 0.35s var(--ease);
}
.card-row:hover { padding-inline-start: 12px; }
.card-row:hover h3 { color: var(--pink); }
.card-row h3 { transition: color 0.3s var(--ease); }
.card-row p { font-size: var(--step--1); color: var(--ink-soft); margin: 6px 0 0; }
.card-row .arrow { color: var(--ink-faint); flex: none; transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.card-row:hover .arrow { color: var(--pink); transform: translateX(4px); }

.side-grid { display: grid; gap: 0; margin-top: 8px; }
@media (min-width: 760px) { .side-grid { grid-template-columns: repeat(3, 1fr); gap: 0 clamp(24px, 4vw, 52px); } }
.side-grid .card-row { border-bottom: 1px solid var(--line-soft); }

/* ---------- Zahlen ---------- */

.stats { display: grid; gap: 34px clamp(24px, 5vw, 64px); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.stat .n {
  font-size: var(--step-3); font-weight: 200; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .l { margin-top: 12px; font-size: var(--step--1); color: var(--ink-soft); letter-spacing: 0.03em; }

/* ---------- Bildbänder ---------- */

.band { position: relative; overflow: hidden; border-radius: 4px; margin-top: clamp(40px, 6vw, 72px); }
.band img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; filter: saturate(0.86) brightness(0.74); }
.band::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,20,0.10), rgba(11,13,20,0.62));
}
.band-full img { aspect-ratio: 16 / 7; }

/* ---------- Slideshow (Splide, self-hosted) ----------
   One image at a time, full-width, crossfade transition (type: 'fade') —
   no neighbouring slide is ever in the DOM's visible flow, so nothing peeks
   in from the side, at rest or mid-transition. Mixed landscape/portrait
   sources are cropped to this one frame via object-fit: cover; the resize
   step (build-site.py, prepare_slideshow_pool) still keeps full aspect ratio
   in the stored files — the crop happens only here, at display time.
   vendor/splide/splide.min.css supplies the .is-active opacity mechanics
   for type:'fade' plus arrow/pagination positioning; colours are this site's. */

.slideshow { margin-top: clamp(40px, 6vw, 72px); }
.slideshow .splide__track { border-radius: 4px; }
.slideshow .splide__slide {
  border-radius: 4px; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.03);
}
.slideshow .splide__slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.88) brightness(0.88);
}
.slideshow .splide__arrow {
  background: rgba(11, 13, 20, 0.55); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  width: 40px; height: 40px; opacity: 1;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.slideshow .splide__arrow:hover { background: var(--pink); transform: translateY(-50%) scale(1.06); }
.slideshow .splide__arrow svg { fill: var(--ink); width: 15px; height: 15px; }
.slideshow .splide__arrow:hover svg { fill: #140f1c; }
.slideshow .splide__arrow--prev { left: 0.85rem; }
.slideshow .splide__arrow--next { right: 0.85rem; }
.slideshow .splide__pagination { bottom: 0.75rem; }
.slideshow .splide__pagination__page {
  background: rgba(255, 255, 255, 0.4); width: 6px; height: 6px; opacity: 1;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.slideshow .splide__pagination__page.is-active {
  background: var(--pink); transform: scale(1.4);
}

/* ---------- Gig-Liste ---------- */

.gigs { margin-top: 8px; }
.gig {
  display: grid; gap: 4px 26px; align-items: baseline;
  grid-template-columns: 1fr;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: padding-inline-start 0.35s var(--ease), border-color 0.35s var(--ease);
}
@media (min-width: 720px) { .gig { grid-template-columns: 140px 1fr auto; } }
.gig:hover { padding-inline-start: 12px; border-color: rgba(255,147,228,0.32); }
.gig .when { font-size: var(--step--1); color: var(--ink-faint); letter-spacing: 0.05em; white-space: nowrap; }
.gig .what { font-weight: 400; }
.gig .what em { font-style: normal; color: var(--ink-soft); }
.gig .who { display: block; font-size: var(--step--1); color: var(--ink-soft); margin-top: 3px; }
.gig .ext { font-size: var(--step--1); color: var(--ink-faint); opacity: 0; transition: opacity 0.3s var(--ease); }
.gig:hover .ext { opacity: 1; color: var(--pink); }
.gig-year {
  margin: 44px 0 6px; font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.18em; color: var(--ink-faint);
}

.gig-thumb { display: none; }

.archive { border: 0; padding: 0; margin: 0; }
.archive > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 34px; padding: 12px 24px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--step--1); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.archive > summary::-webkit-details-marker { display: none; }
.archive > summary:hover { border-color: var(--pink); color: var(--pink); }
.archive > summary .chev { transition: transform 0.3s var(--ease); }
.archive[open] > summary .chev { transform: rotate(180deg); }

/* ---------- Testimonials ---------- */

.quotes { display: grid; gap: clamp(28px, 4vw, 44px); }
@media (min-width: 860px) { .quotes { grid-template-columns: repeat(3, 1fr); } }
.quote {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.quote blockquote { margin: 0; font-size: var(--step-0); color: var(--ink); }
.quote blockquote::before {
  content: '«'; display: block; font-size: var(--step-2);
  line-height: 1; color: var(--pink); margin-bottom: 12px; opacity: 0.75;
}
.quote figcaption { margin-top: 18px; font-size: var(--step--1); color: var(--ink-faint); line-height: 1.5; }
.quote figcaption b { display: block; font-weight: 500; color: var(--ink-soft); }

/* ---------- Themen / Formate ---------- */

.rows { border-top: 1px solid var(--line-soft); }
.row {
  display: grid; gap: 6px 40px; grid-template-columns: 1fr;
  padding: 26px 0; border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 780px) { .row { grid-template-columns: 0.85fr 1.15fr; } }
.row h3 { color: var(--ink); }
.row p { color: var(--ink-soft); margin: 0; }

/* ---------- Closing / Rimbaud ---------- */

.closing { text-align: center; }
.closing .fr {
  font-size: var(--step-2); font-weight: 200; line-height: 1.35;
  max-width: 20ch; margin-inline: auto;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.closing .attr { margin-top: 20px; font-size: var(--step--1); color: var(--ink-faint); letter-spacing: 0.09em; }
.closing .own { margin-top: 44px; max-width: 46ch; margin-inline: auto; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-foot { padding-block: clamp(56px, 9vh, 104px) 44px; border-top: 1px solid var(--line-soft); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 28px 44px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px 30px; font-size: var(--step--1); }
.site-foot .fine { margin-top: 44px; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.05em; }

/* ---------- Hover-Reveal Image Cursor ---------- */

#reveal {
  position: fixed; top: 0; left: 0; z-index: 800;
  width: clamp(210px, 21vw, 330px); aspect-ratio: 3 / 2;
  border-radius: 4px; overflow: hidden;
  pointer-events: none;
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(0.9);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.55);
  will-change: transform, opacity;
}
#reveal.on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
#reveal img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }

/* Grobe Zeiger (Touch): kein Cursor-Effekt, stattdessen Thumbnail in der Zeile. */
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  #reveal { display: none !important; }
  .gig { grid-template-columns: 64px 1fr; gap: 4px 16px; align-items: center; }
  .gig .when { grid-column: 2; }
  .gig .what { grid-column: 2; }
  .gig .ext  { grid-column: 2; opacity: 1; }
  .gig-thumb {
    display: block; grid-row: span 3; width: 64px; aspect-ratio: 1;
    border-radius: 3px; overflow: hidden;
  }
  .gig-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.85); }
}

/* ---------- Scroll-Reveal ---------- */

/* Nur wenn JS läuft, darf überhaupt etwas versteckt werden — sonst wäre die
   Seite ohne JavaScript komplett leer. Die .js-Klasse setzt ein Inline-Script
   im <head>, also bevor irgendetwas gerendert wird (kein Aufblitzen). */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.js .rise.seen { opacity: 1; transform: none; }
.js .rise.instant { transition: none; }
@media (prefers-reduced-motion: reduce) { .js .rise { opacity: 1; transform: none; transition: none; } }

/* ---------- A11y ---------- */

:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 3px; }
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #0b0d14; padding: 10px 18px; border-radius: 4px; z-index: 999;
}
.skip:focus { left: var(--gutter); top: 10px; }
