/* ==========================================================================
   andreasbasner.de – Stylesheet
   Aufbau: 1. Schrift  2. Variablen  3. Basis  4. Layout  5. Header
           6. Typo & Buttons  7. Kacheln  8. Startseite  9. Projektseiten
           10. Über mich  11. Kontakt  12. Rechtstexte  13. Footer
           14. Scroll-Effekte  15. Bewegung reduzieren
   ========================================================================== */

/* 1. Schrift – Manrope, lokal eingebunden (keine Verbindung zu Google) */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* 2. Variablen */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #8a8a8a;        /* graue Headline-Wörter (ab 24 px, Kontrast > 3:1) */
  --faint: #d6d6d6;        /* Startfarbe der Wort-Einfärbung beim Scrollen */
  --label: #6b6b6b;        /* kleine Beschriftungen (Kontrast > 4.5:1) */
  --body: #3d3d3d;
  --line: #e4e4e4;
  --soft: #f1f1f1;
  --pill: #efefef;
  --footer: #0b0b0b;

  --max: 1800px;
  --gutter: 80px;

  /* Schriftgrößen wie bei Framer: Handy (390 px) → Desktop (ab 1200 px) */
  --fs-display: clamp(32px, calc(16.6px + 3.95vw), 64px);   /* 32 → 64 */
  --fs-statement: clamp(26px, calc(19.3px + 1.73vw), 40px); /* 26 → 40 */
  --fs-title: clamp(22px, calc(17.2px + 1.235vw), 32px);    /* 22 → 32 */
  --fs-sub: clamp(20px, calc(18.1px + .494vw), 24px);       /* 20 → 24 */
  --radius: 18px;
  --radius-s: 14px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 88px;
}

/* 3. Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body {
  margin: 0;
  font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--footer);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* 4. Layout */
.page { position: relative; z-index: 1; background: var(--bg); padding-bottom: 120px; overflow-x: clip; }
.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { margin-top: clamp(72px, 10vw, 120px); }
.section--tight { margin-top: clamp(56px, 7vw, 88px); }
.eyebrow { font-size: 16px; font-weight: 400; color: var(--ink); }

/* 5. Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  transition: transform .45s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .container { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-size: var(--fs-title); font-weight: 500; white-space: nowrap; }
.nav { display: flex; gap: 32px; font-size: 18px; }
.nav a { position: relative; padding: 12px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* 6. Typo & Buttons */
.display {
  font-size: var(--fs-display); line-height: 1.2;
  color: var(--muted); max-width: 1200px;
}
.statement {
  font-size: var(--fs-statement); line-height: 1.4; font-weight: 300;
  color: var(--muted); max-width: 1100px; text-wrap: pretty;
}
.display--narrow { max-width: 800px; }
.hl { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 26px;
  border-radius: 999px; font-size: 18px; font-weight: 400; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn svg { width: 12px; height: 12px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #333; }
.btn--light { background: var(--pill); color: var(--ink); }
.btn--light:hover { background: #e2e2e2; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #e8e8e8; }
.split { display: flex; gap: 48px; align-items: flex-start; justify-content: space-between; }
.split .btn { flex-shrink: 0; }

/* 7. Kacheln */
.tiles { display: grid; gap: 56px 24px; }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 16px; }
.tile--wide { grid-column: 1 / -1; }
.media {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--soft);
  isolation: isolate; transform: translateZ(0);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--parallax img { position: absolute; left: 0; top: -8%; height: 116%; will-change: transform; }
.tile .media { aspect-ratio: 16 / 10; }
.tile--wide .media { aspect-ratio: 2 / 1; }
.tile--portrait .media { aspect-ratio: 5 / 2; }
.tile .media img { transition: scale .8s var(--ease); }
.tile:hover .media img { scale: 1.03; }
.tile__badge {
  position: absolute; left: 18px; bottom: 18px; z-index: 2; width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); display: grid; place-items: center; color: var(--ink);
  transition: transform .35s var(--ease);
}
.tile__badge svg { width: 12px; height: 12px; }
.tile:hover .tile__badge { transform: rotate(45deg); }
.tile__meta { display: flex; flex-direction: column; gap: 4px; }
.tile__label { font-size: 16px; color: #666666; }
.tile__title { font-size: var(--fs-title); font-weight: 500; line-height: 1.4; }

/* 8. Startseite */
.hero { padding-top: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 32px; }
.focus { margin-top: clamp(72px, 9vw, 104px); }
.focus__item { border-bottom: 1px solid var(--line); }
.focus__item:first-of-type { border-top: 1px solid var(--line); }
.focus__item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; font-size: var(--fs-statement); font-weight: 300; line-height: 1.4;
}
.focus__item summary::-webkit-details-marker { display: none; }
.focus__item summary svg { flex-shrink: 0; width: 20px; height: 20px; transition: transform .35s var(--ease); }
.focus__item[open] summary svg { transform: rotate(180deg); }
.focus__item summary:hover { color: #555; }
.focus__list {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 0 28px; font-size: var(--fs-sub); font-weight: 300; line-height: 1.4; color: var(--ink);
}

/* 9. Projektseiten */
.intro { padding-top: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 24px; }
.intro p { font-size: var(--fs-sub); font-weight: 300; line-height: 1.4; max-width: 1100px; }
.project-hero { padding-top: 24px; }
.project-hero .media { aspect-ratio: 16 / 10; background: #ececea; }
.project-head { display: flex; flex-direction: column; gap: 40px; max-width: 1200px; }
.project-head__title { display: flex; flex-direction: column; gap: 12px; }
.project-head__title h1 { font-size: var(--fs-display); line-height: 1.2; text-wrap: balance; }
.project-head__body { display: flex; flex-direction: column; gap: 32px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.facts div { display: flex; flex-direction: column; gap: 6px; }
.facts dt { font-size: 16px; color: #666666; }
.facts dd { margin: 0; font-size: 18px; }
.project-head__body h2 { font-size: var(--fs-statement); font-weight: 300; line-height: 1.4; text-wrap: balance; }
.project-head__body p { font-size: var(--fs-sub); font-weight: 300; line-height: 1.4; text-wrap: pretty; }
.gallery { display: flex; flex-direction: column; gap: 24px; }
.gallery__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery__pair .media { aspect-ratio: 4 / 5; }
.gallery__full .media { aspect-ratio: var(--ratio, 16 / 9); }
.gallery__portrait { display: flex; justify-content: center; }
.gallery__portrait .media { width: min(100%, 680px); aspect-ratio: var(--ratio, 2 / 3); }
.media--contain img { object-fit: contain; }
.media--svg { background: #f3f3f3; }
.media--svg img { object-fit: contain; padding: 6%; }

.marquee { margin-top: clamp(72px, 9vw, 96px); overflow: hidden; }
.marquee__track { display: flex; gap: 20px; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { height: clamp(180px, 20vw, 280px); width: auto; border-radius: var(--radius-s); background: var(--soft); }
@keyframes marquee { to { transform: translateX(calc(-50% - 10px)); } }

.next {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.next__title { font-size: var(--fs-display); line-height: 1.2; margin-top: 10px; }
.next__arrow {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 999px; background: var(--ink); color: #fff;
  display: grid; place-items: center; transition: transform .35s var(--ease);
}
.next__arrow svg { width: 18px; height: 18px; }
.next:hover .next__arrow { transform: translateX(6px); }

/* 10. Über mich */
.skills { max-width: 620px; margin-top: 8px; }
.skills svg { width: 100%; height: auto; overflow: visible; }
.skills circle { mix-blend-mode: multiply; }
.skills text { font-family: inherit; fill: #2b2b2b; text-anchor: middle; }
.skills .skill__name { font-size: 25px; font-weight: 600; }
.skills .skill__value { font-size: 23px; font-weight: 400; fill: #555; }
.skills__note { font-size: 14px; color: var(--label); margin-top: 12px; }
.rows { display: flex; flex-direction: column; gap: 56px; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 12px; }
.row__label { grid-column: span 3; padding-top: 6px; }
.row__content { grid-column: span 9; display: flex; flex-direction: column; gap: 28px; }
.row__content .statement { color: var(--ink); max-width: none; }
.traits h3 { font-size: var(--fs-sub); font-weight: 300; line-height: 1.4; margin-bottom: 10px; }
.traits ul { display: flex; flex-wrap: wrap; gap: 8px; }
.traits li { font-size: 16px; line-height: 1.3; padding: 8px 14px; border-radius: 999px; background: var(--soft); color: #333; }
.wide-image .media { aspect-ratio: 2 / 1; }

/* 11. Kontakt */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; padding-top: clamp(40px, 6vw, 72px); }
.contact__intro { grid-column: span 6; display: flex; flex-direction: column; gap: 14px; }
.contact__intro h1 { font-size: var(--fs-display); line-height: 1.2; }
.contact__intro p { font-size: var(--fs-sub); font-weight: 300; line-height: 1.4; max-width: 520px; margin-top: 10px; }
.form { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: var(--radius); background: #fafafa; border: 1px solid #eeeeee; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 500; color: #444; }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #d9d9d9; border-radius: 10px;
  padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__hint { font-size: 14px; line-height: 1.5; color: var(--label); }
.form__hint a { text-decoration: underline; text-underline-offset: 3px; }
.form .btn { justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.form__status { font-size: 14px; line-height: 1.5; padding: 12px 14px; border-radius: 10px; }
.form__status[hidden] { display: none; }
.form__status--ok { background: #eaf4ec; color: #1f5130; }
.form__status--error { background: #fbeceb; color: #8a1f17; }
.socials { display: flex; gap: 16px; }
.socials a {
  width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 999px; display: grid; place-items: center;
  opacity: .75; transition: opacity .25s, transform .25s var(--ease);
}
.socials a:hover { opacity: 1; transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }
.contact__socials { grid-column: 1 / -1; justify-content: center; color: #555; }

/* 12. Rechtstexte */
.legal { max-width: 760px; padding-top: clamp(40px, 6vw, 72px); }
.legal h1 { font-size: var(--fs-display); hyphens: auto; overflow-wrap: break-word; line-height: 1.2; margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -.01em; }
.legal p, .legal li { color: var(--body); }
.legal p + p { margin-top: 12px; }
.legal__list { list-style: disc; padding-left: 1.3em; margin: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.legal__list + p, .legal__list { margin-top: 12px; }
.legal__date { margin-top: 40px !important; font-size: 14px; color: var(--label) !important; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--label); }
.placeholder { background: #fff4d6; color: #6b4e00; padding: 2px 6px; border-radius: 4px; font-size: .95em; }
.notice { margin-bottom: 32px; padding: 16px 18px; border-radius: 12px; background: #fff4d6; color: #5c4300; font-size: 15px; line-height: 1.5; }

/* 13. Footer (wird beim Scrollen aufgedeckt) */
.site-footer { position: relative; z-index: 0; background: var(--footer); color: #fff; }
@media (min-height: 640px) {
  .site-footer { position: sticky; bottom: 0; }
}
.site-footer__inner { padding: clamp(72px, 9vw, 120px) var(--gutter) 40px; display: flex; flex-direction: column; gap: 64px; }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.site-footer__cta { display: flex; flex-direction: column; gap: 14px; }
.site-footer__cta .eyebrow { color: #a8a8a8; }
.site-footer__title { font-size: var(--fs-display); line-height: 1.2; }
.site-footer__cta .btn { align-self: flex-start; margin-top: 16px; }
.site-footer__nav { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: 18px; }
.site-footer__nav a:hover, .site-footer__legal a:hover { color: #bdbdbd; }
.site-footer .socials { justify-content: center; }
.site-footer .socials a { border-color: #5c5c5c; opacity: 1; }
.site-footer .socials a:hover { border-color: #fff; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: #a8a8a8; border-top: 1px solid #262626; padding-top: 20px; }
.site-footer__legal { display: flex; gap: 20px; }

/* 14. Scroll-Effekte (werden per JS aktiviert: html.js) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: .08s; }
.js [data-reveal-delay="2"] { transition-delay: .16s; }
/* Wie bei Framer: Headline baut sich Wort für Wort auf (von rechts, weich eingeblendet) */
.js .word-in { position: relative; left: 50px; opacity: 0; transition: opacity .7s var(--ease), left .9s var(--ease); transition-delay: calc(var(--i, 0) * 45ms + 80ms); }
.js .is-in .word-in { left: 0; opacity: 1; }
/* Textblöcke gleiten beim Scrollen von rechts herein */
.js [data-reveal="x"] { transform: translateX(30px); }
.js .skills circle { transform-box: fill-box; transform-origin: center; transform: scale(.2); opacity: 0; transition: transform 1s var(--ease), opacity .8s var(--ease); }
.js .skills.is-visible circle { transform: none; opacity: 1; }
.js .skills text { opacity: 0; transition: opacity .6s var(--ease) .5s; }
.js .skills.is-visible text { opacity: 1; }

/* Responsiv */
@media (max-width: 1199px) { :root { --gutter: 40px; } }
@media (max-width: 809px) { :root { --gutter: 16px; } }
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .project-head__title, .project-head__body, .row__label, .row__content { grid-column: 1 / -1; }
  .contact__intro, .form { grid-column: 1 / -1; }
  .split { flex-direction: column; gap: 20px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .logo { font-size: 20px; }
  .nav { gap: 12px; font-size: 14px; }
  .nav a { white-space: nowrap; }
  .tiles--2, .gallery__pair, .focus__list { grid-template-columns: 1fr; }
  .tiles { gap: 40px; }
  .tile .media, .tile--wide .media { aspect-ratio: 4 / 3; }
  .tile--portrait .media { aspect-ratio: 3 / 2; }
  .facts { grid-template-columns: 1fr; gap: 14px; }
  .gallery { gap: 16px; }
  .gallery__pair { gap: 16px; }
  .project-hero .media { aspect-ratio: 4 / 3; }
  .media { border-radius: var(--radius-s); }
  .wide-image .media { aspect-ratio: 4 / 3; }
  .site-footer__inner { padding: 72px 16px 32px; gap: 40px; }
  .site-footer__top { flex-direction: column; }
  .site-footer__nav { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
  .site-footer .socials { justify-content: flex-start; }
  .site-footer__bottom { flex-direction: column; gap: 10px; }
  .next__arrow { width: 48px; height: 48px; }
}
@media (max-width: 360px) {
  .nav { gap: 10px; font-size: 13px; }
  .logo { font-size: 18px; }
}

/* 15. Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .word-in { opacity: 1; left: 0; }
  .js .skills circle, .js .skills text { opacity: 1; transform: none; }
  .media--parallax img { top: 0; height: 100%; transform: none !important; }
  .marquee { overflow-x: auto; }
}
