/* ==========================================================================
   Where the City Ends — design tokens
   ========================================================================== */
:root{
  --void:       #0b0d0a;
  --void-soft:  #14170f;
  --ember:      #e8874f;
  --ember-deep: #c85f2e;
  --moss:       #6b7a52;
  --moss-deep:  #3f4a30;
  --paper:      #ede6d6;
  --ash:        #9a9484;
  --cream:      #f4efe4;
  --cream-2:    #ece4d3;
  --ink:        #1e2119;
  --ink-soft:   #4a4c42;

  --display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --body:    'Newsreader', Georgia, serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;
  --space-5: 7rem;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a{ color: inherit; }

:focus-visible{
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ==========================================================================
   Signature effect: grain overlay that dissolves as the reader scrolls
   ========================================================================== */
.grain{
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: var(--grain-opacity, 0.5);
  mix-blend-mode: overlay;
  transition: opacity 0.2s linear;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

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

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */
.progress{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 60;
  background: rgba(237,230,214,0.06);
}
.progress__bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--moss), var(--ember));
  transition: width 0.1s linear;
}

/* ==========================================================================
   Ambient embers
   ========================================================================== */
.embers{
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
.ember{
  position: absolute;
  bottom: -10px;
  width: 3px; height: 3px;
  border-radius: 999px;
  background: var(--ember);
  opacity: 0;
  box-shadow: 0 0 6px 1px rgba(232,135,79,0.7);
  animation: emberRise linear forwards;
}
@keyframes emberRise{
  0%{ transform: translateY(0) translateX(0); opacity: 0; }
  8%{ opacity: 0.85; }
  90%{ opacity: 0.5; }
  100%{ transform: translateY(-100vh) translateX(var(--drift, 30px)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .embers{ display: none; }
}

/* ==========================================================================
   Scroll-reveal
   ========================================================================== */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* stagger children inside .cards */
.cards .reveal:nth-child(1){ transition-delay: 0s; }
.cards .reveal:nth-child(2){ transition-delay: 0.08s; }
.cards .reveal:nth-child(3){ transition-delay: 0.16s; }
.cards .reveal:nth-child(4){ transition-delay: 0.24s; }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(to bottom, rgba(11,13,10,0.85), rgba(11,13,10,0.4) 80%, transparent);
  transition: background 0.25s ease;
}

.nav__mark{
  font-family: var(--display);
  letter-spacing: 0.12em;
  font-size: 1.1rem;
  color: var(--paper);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__links{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
.nav__links a{
  text-decoration: none;
  color: var(--paper);
  font-size: 0.9rem;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.nav__links a:hover{ opacity: 1; }

.nav__pill{
  border: 1px solid rgba(237,230,214,0.35);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

.nav__social{
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
.nav__social a{
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(237,230,214,0.1);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.nav__social a:hover{ background: var(--ember); color: var(--void); }

.nav__toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span{
  width: 22px; height: 2px;
  background: var(--paper);
  border-radius: 2px;
}

@media (max-width: 880px){
  .nav__toggle{ display: flex; }
  .nav__links{
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(11,13,10,0.97);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav__links.is-open{ max-height: 400px; }
  .nav__links li{ width: 100%; }
  .nav__links a{
    display: block;
    padding: 0.9rem var(--space-3);
    width: 100%;
    border-bottom: 1px solid rgba(237,230,214,0.08);
  }
  .nav__pill{ border-radius: 0; border: none; }
  .nav__social{ display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.25rem 3rem;
  text-align: center;
  background: var(--void);
  overflow: hidden;
}

/* ---- layered scene ---- */
.scene{
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.layer{
  position: absolute;
  inset: -8% -4%;
  will-change: transform;
}
.layer > *{ width: 100%; height: 100%; }

.scene__sky{
  width: 100%; height: 100%;
  background:
    radial-gradient(60% 45% at 50% 62%, rgba(232,135,79,0.35) 0%, rgba(232,135,79,0) 70%),
    linear-gradient(180deg, #1c1a1f 0%, #3b2620 38%, #7a3e2e 62%, #0b0d0a 100%);
}
.scene__sun{
  position: absolute;
  left: 50%; top: 58%;
  width: 190px; height: 190px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffdcb0 0%, var(--ember) 45%, rgba(232,135,79,0) 75%);
  filter: blur(1px);
  animation: sunPulse 8s ease-in-out infinite;
}
@keyframes sunPulse{
  0%,100%{ opacity: 0.85; }
  50%{ opacity: 1; }
}
.scene__clouds, .scene__skyline, .scene__river{ width: 100%; height: 100%; display: block; }
.scene__figure-layer{ inset: auto -4% 0 -4%; height: 42%; display: flex; justify-content: center; }
.scene__figure{ width: 130px; height: auto; align-self: flex-end; animation: figureBob 6s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5)); }
@keyframes figureBob{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}
.scene__trees{ inset: auto -6% -2% -6%; height: 60%; }
.scene__trees-left, .scene__trees-right{
  position: absolute; bottom: 0; width: 42%; height: 100%;
}
.scene__trees-left{ left: -2%; }
.scene__trees-right{ right: -2%; }

@media (prefers-reduced-motion: reduce){
  .scene__sun, .scene__figure{ animation: none; }
}

/* ---- grunge title, sits above the scene ---- */
.hero__title{
  position: relative;
  z-index: 3;
  font-family: var(--display);
  line-height: 0.92;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3);
  filter: url(#roughen);
}
.hero__title-line{
  display: block;
  font-size: clamp(2.8rem, 10vw, 6.5rem);
  color: var(--paper);
  text-shadow: 0 0 40px rgba(0,0,0,0.6), 3px 3px 0 rgba(0,0,0,0.35);
}
.hero__title-line--accent{ color: var(--ember); }

.hero__meta{
  position: relative;
  z-index: 3;
  max-width: 34rem;
}

.hero__actions{
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn--ghost{
  border: 1px solid var(--paper);
  color: var(--paper);
}
.btn--ghost:hover{ background: var(--paper); color: var(--void); transform: translateY(-2px); }
.btn--text{
  color: var(--paper);
  opacity: 0.85;
  padding: 0.85rem 0.4rem;
}
.btn--text:hover{ opacity: 1; }
.btn--outline-dark{
  border: 1px solid var(--ink);
  color: var(--ink);
  margin-top: var(--space-2);
}
.btn--outline-dark:hover{ background: var(--ink); color: var(--cream); }

.eyebrow{
  font-family: var(--display);
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--ember);
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
}
.eyebrow--dark{ color: var(--moss); }

.hero__line{
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-style: italic;
  font-weight: 400;
  color: var(--paper);
  margin: 0 0 var(--space-3);
}

.scroll-cue{
  display: inline-flex;
  width: 22px; height: 36px;
  border: 1px solid var(--ash);
  border-radius: 999px;
  align-items: flex-start;
  justify-content: center;
  padding-top: 6px;
}
.scroll-cue span{
  width: 3px; height: 8px;
  border-radius: 999px;
  background: var(--ember);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue{
  0%{ transform: translateY(0); opacity: 1; }
  60%{ transform: translateY(10px); opacity: 0; }
  61%{ transform: translateY(0); opacity: 0; }
  100%{ opacity: 1; }
}

/* ==========================================================================
   Generic section rhythm
   ========================================================================== */
.section{ padding: var(--space-5) 1.25rem; }
.section__inner{ max-width: 46rem; margin: 0 auto; }

.section--bruch{ background: var(--void-soft); }

.lede{
  font-family: var(--body);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--paper);
  margin: 0 0 var(--space-3);
}

.body-text{
  font-size: 1.05rem;
  color: var(--ash);
  max-width: 42rem;
}
.body-text em{ color: var(--ember); font-style: italic; }
.body-text--intro{ margin: 0 auto var(--space-4); text-align: center; }

.section__title{
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--paper);
  text-align: center;
  margin: 0 0 var(--space-2);
}
.section__title--left{ text-align: left; }

/* ==========================================================================
   Banner
   ========================================================================== */
.banner{
  position: relative;
  overflow: hidden;
  height: 68vh;
}
.banner__sky{
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #241a15 0%, #5c3423 45%, #0b0d0a 100%);
}
.banner__skyline, .banner__river{ width: 100%; height: 100%; display: block; }
.banner__overlay{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,10,0.1) 0%, rgba(11,13,10,0.75) 100%);
}
.banner__quote{
  position: absolute;
  z-index: 2;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: min(38rem, 88vw);
  text-align: center;
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  color: var(--paper);
}
.banner__quote.reveal{ transform: translateX(-50%) translateY(28px); }
.banner__quote.reveal.is-visible{ transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Feature cards
   ========================================================================== */
.section--ruheorte{ background: var(--void); }

.cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5px;
  background: rgba(237,230,214,0.08);
  border: 1px solid rgba(237,230,214,0.08);
  margin-top: var(--space-4);
}

.card{
  background: var(--void-soft);
  padding: var(--space-3);
  transform: perspective(600px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.tilt:hover{
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
  z-index: 1;
}

.card__icon{
  width: 42px; height: 42px;
  color: var(--ember);
  margin-bottom: var(--space-2);
}
.card__icon svg{ width: 100%; height: 100%; }

.card h3{
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  margin: 0 0 0.5rem;
  font-weight: 400;
}

.card p{
  font-size: 0.95rem;
  color: var(--ash);
  margin: 0;
}

/* ==========================================================================
   Character
   ========================================================================== */
.section--character{
  background: var(--void-soft);
  position: relative;
}

/* breathing glow — the calm the character is searching for, made visible */
.section--character::before{
  content: '';
  position: absolute;
  top: 50%; left: 18%;
  width: 46vw; height: 46vw;
  max-width: 620px; max-height: 620px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(107,122,82,0.35) 0%, rgba(107,122,82,0) 70%);
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe{
  0%, 100%{ opacity: 0.5; transform: translate(-50%,-50%) scale(1); }
  50%{ opacity: 0.9; transform: translate(-50%,-50%) scale(1.12); }
}
@media (prefers-reduced-motion: reduce){
  .section--character::before{ animation: none; }
}

.character{
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-4);
  align-items: center;
  position: relative;
}

.character__portrait{
  max-width: 320px;
  justify-self: center;
  transform: perspective(800px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.3s ease;
}
.character__svg{ width: 100%; height: auto; display: block; }

.character__text .body-text{ margin-bottom: var(--space-2); }

@media (max-width: 780px){
  .character{ grid-template-columns: 1fr; text-align: center; }
  .section__title--left{ text-align: center; }
  .character__text .body-text{ margin-left: auto; margin-right: auto; }
}

/* ==========================================================================
   Closing / signal form
   ========================================================================== */
.closing{
  background: linear-gradient(180deg, var(--void) 0%, var(--moss-deep) 140%);
  padding: var(--space-5) 1.25rem;
  text-align: center;
}
.closing__inner{ max-width: 34rem; margin: 0 auto; }

.closing__title{
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  color: var(--paper);
  margin: 0 0 var(--space-3);
}

.signal-form{
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-3);
}

.signal-form input{
  flex: 1 1 240px;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(237,230,214,0.25);
  background: rgba(237,230,214,0.06);
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.95rem;
}
.signal-form input::placeholder{ color: var(--ash); }

.signal-form button{
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: var(--ember);
  color: var(--void);
  font-family: var(--display);
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.signal-form button:hover{ background: var(--ember-deep); }

.signal-note{
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--ash);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer{
  display: flex;
  justify-content: space-between;
  padding: var(--space-3);
  font-size: 0.8rem;
  color: var(--ash);
  border-top: 1px solid rgba(237,230,214,0.08);
  background: var(--void);
}

@media (max-width: 480px){
  .footer{ flex-direction: column; gap: 0.4rem; text-align: center; }
}

/* ==========================================================================
   Light sections — Über mich / Spielerlebnis / Die Welt
   ========================================================================== */
.eyebrow--onlight{ color: var(--ember-deep); }

.light-body{
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 34rem;
  line-height: 1.7;
}
.light-body--center{ margin: 0 auto var(--space-4); text-align: center; }
.light-body em{ font-style: italic; color: var(--ink); }

/* --- Über mich --- */
.light-section{
  background: var(--cream);
  padding: var(--space-5) 1.25rem;
}
.light-section__grid{
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-4);
  align-items: center;
}
.light-section__title{
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--ink);
  margin: 0.2rem 0 var(--space-2);
}
.light-section__cards{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 780px){
  .light-section__grid{ grid-template-columns: 1fr; }
  .light-section__cards{ margin-top: var(--space-3); }
}

/* --- illustration cards, shared by Über mich + Die Welt --- */
.illust-card{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  transform: perspective(700px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 20px 40px -24px rgba(0,0,0,0.35);
}
.illust-card svg{ width: 100%; height: 100%; display: block; }
.illust-card:hover{ box-shadow: 0 26px 50px -20px rgba(0,0,0,0.45); }
.illust-card__label{
  position: absolute;
  left: 0.9rem; bottom: 0.8rem;
  color: var(--paper);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.illust-card--wide{ aspect-ratio: 5 / 4.2; }

/* --- Spielerlebnis --- */
.cream-section{
  background: var(--cream-2);
  padding: var(--space-5) 1.25rem;
}
.cream-section__inner{ max-width: 60rem; margin: 0 auto; text-align: center; }
.cream-section__title{
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--ink);
  margin: 0.2rem 0 var(--space-2);
}

.feature-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: var(--space-4);
  text-align: left;
}
.feature-block{
  background: var(--cream);
  border-radius: 18px;
  padding: var(--space-3);
  transform: perspective(700px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-block:hover{ box-shadow: 0 20px 40px -24px rgba(0,0,0,0.25); }
.feature-block h3{
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.feature-block p{
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 var(--space-2);
}

.energy-bars{
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.energy-bar{
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
}
.energy-bar span{ display: block; height: 100%; border-radius: 999px; }
.energy-bar--low span{ width: 35%; background: linear-gradient(90deg, #c85f2e, #e8874f); }
.energy-bar--high span{ width: 80%; background: linear-gradient(90deg, var(--moss-deep), var(--moss)); }
.energy-arrow{ width: 32px; height: 16px; color: var(--ash); flex-shrink: 0; }

.crowd-illust{ width: 100%; height: auto; margin-top: 0.5rem; }

/* --- Die Welt --- */
.world-section{
  background: var(--cream);
  padding: var(--space-5) 1.25rem;
}
.world-section__inner{ max-width: 68rem; margin: 0 auto; text-align: center; }
.world-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: var(--space-4);
  text-align: left;
}
@media (max-width: 780px){
  .world-grid{ grid-template-columns: 1fr; }
}
