/* ==============================
   Variablen & Base
============================== */
:root {
  --bg: #f6efe6;
  --ink: #18231c;
  --muted: #5f6b62;
  --brand: #2d4a3a;
  --accent: #f5a021;
  --accent-2: #0e0e0e;
  --card: #24382e;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==============================
   Typografie & Links
============================== */
h1,
h2,
h3 {
  font-family: Gloock, Georgia, serif;
  line-height: 1.15;
  margin: 0 0 .6rem;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: .02em;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: .02em;
}

p {
  margin: .4rem 0 1rem;
}

.muted {
  color: var(--muted);
}

.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;
}

/* Links */
a {
  color: #f5a021;
  text-decoration: none;
}

a:hover {
  color: #9f6815;
  opacity: .85;
}

/* ==============================
   Layout: Sektionen & Grids
============================== */
section {
  scroll-margin-top: 86px;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ==============================
   Navigation & Buttons
============================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(6px);
  background: color-mix(in oklab, var(--bg) 85%, white 15%);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav .wrap {
  max-width: 1200px;
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  margin-left: auto;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle span + span {
  margin-top: 5px;
}

/* X-Animation wenn offen */
.nav.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand .dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.nav .links {
  margin-left: auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 12px;
  line-height: 1;
  margin: 0;
}

.nav .links a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent);
}

.btn {
  background: var(--accent);
  color: #141414;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 2px solid #0000;
  box-shadow: var(--shadow);
  justify-content: center;
  height: 44px;
}

.btn:hover {
  transform: translateY(-1px);
}

/* ==============================
   Hero
============================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand) 64%, var(--bg) 64%);
  color: #f5f5f5;
}

.hero .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 18px 120px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
}

.hero .title {
  grid-column: 1 / span 1;
}

.hero p {
  color: #e7e7e7;
  max-width: 56ch;
}

.hero .card {
  background: #e57f00;
  color: #111;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  min-height: 360px;
  box-shadow: var(--shadow);
}

.hero .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .90;
}

.hero .floating {
  position: absolute;
  inset: auto -60px -40px auto;
  font-family: Gloock, serif;
  font-size: clamp(3rem, 9vw, 7rem);
  color: #00000018;
  rotate: -6deg;
  pointer-events: none;
  user-select: none;
}

.scroll-pill {
  position: absolute;
  left: 50%;
  translate: -50% 40px;
  background: var(--accent);
  color: #111;
  border-radius: 999px;
  padding: .6rem 1rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

/* ==============================
   Cards, Chips, Timeline
============================== */
.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card.dark {
  background: var(--card);
  color: #f2f7f4;
}

figure.card img {
  width: 100%;
  border-radius: 12px;
}

.chip {
  display: inline-block;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  font-weight: 700;
  font-size: .8rem;
  margin: .2rem .25rem 0 0;
}

.chip.alt {
  background: rgba(245,160,33,.25);
}

.timeline {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.timeline .item {
  margin: 0 0 18px;
}

.timeline .meta {
  font-weight: 700;
}

.timeline .sub {
  color: var(--muted);
  font-size: .95rem;
}

/* Kontakt-Karte: Social */
#about .card.dark .social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#about .card.dark .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #f4f4f4;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: transform .15s ease, filter .15s ease;
}

#about .card.dark .social a:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* ==============================
   Works-Grid (Startseite)
============================== */
.works-grid h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 26px;
}

.work-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,.15);
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.work-card:hover img {
  transform: scale(1.05);
}

.work-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.6rem;
  transition: background .3s ease;
}

.work-card:hover .overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,0.85) 100%);
}

.work-card h3 {
  font-family: Gloock, serif;
  font-size: 1.3rem;
  margin: 0 0 .4rem;
  color: var(--accent);
}

.work-card p {
  font-size: .95rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

/* ==============================
   Formulare (Kontakt)
============================== */
.card.dark form label {
  font-weight: 600;
}

.card.dark input,
.card.dark textarea {
  width: 100%;
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 1px solid #ffffff26;
  background: #1c2b23;
  color: #fff;
  font: inherit;
}

.card.dark textarea {
  resize: vertical;
}

.card.dark input:focus,
.card.dark textarea:focus {
  outline: 2px solid #ffffff55;
}

/* ==============================
   Projekt-Grid (Projekte-Seite)
============================== */
.projects-hero {
  background: var(--brand);
  color: #f5f5f5;
  padding: 56px 18px;
}

.projects-hero .wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.projects-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 18px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-auto-rows: 220px;
  grid-auto-flow: row dense;
}

/* Projekt-Karten */
.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;
  text-decoration: none;
  color: #fff;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease, filter .4s ease;
}

.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform .6s ease, filter .4s ease;
}

.project-card:hover img,
.project-card:hover video {
  transform: scale(1.05);
  filter: brightness(.9);
}

.project-card .overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.8) 100%);
  display: flex;
  flex-direction: column;
  gap: .15rem;
  z-index: 2;
}

.project-card .overlay h2 {
  font-family: Gloock, serif;
  font-size: 1.05rem;
  margin: 0;
}

.project-card .overlay p {
  margin: 0;
  font-size: .85rem;
  opacity: .85;
}

/* unterschiedliche Größen */
.project-card.tall {
  grid-row: span 2;
}

.project-card.wide {
  grid-column: span 2;
}

/* ==============================
   Hover-Bilder / Slideshows
============================== */
.image-hover {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.image-hover img {
  width: 100%;
  display: block;
  transition: opacity .5s ease;
  object-fit: cover;
}

.image-hover .hover-img {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.image-hover:hover .hover-img {
  opacity: 1;
}

.video-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  height: auto;
  display: block;
}

.slideshowquer,
.slideshowhoch {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.slideshowquer {
  aspect-ratio: 4 / 3;
}

.slideshowhoch {
  aspect-ratio: 3 / 4;
}

.slideshowquer img,
.slideshowhoch img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slideshowquer img.active,
.slideshowhoch img.active {
  opacity: 1;
}

/* ==============================
   Footer
============================== */
footer:not(.footer-forest) {
  padding: 64px 18px;
  background: var(--brand);
  color: #f5f5f5;
}

/* generelle Link-Optik */
.footer-wrap a {
  color: #f5f5f5;
  text-decoration: none;
  opacity: .9;
}

.footer-wrap a:hover {
  opacity: 1;
}

/* Footer: Link-Chips */
footer .links {
  display: flex;
  gap: 8px;
}

footer .links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .2s ease,
              border-color .2s ease, opacity .2s ease;
}

footer .links a:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.18);
  border-color: #fff;
}

footer .links a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Footer: Layout */
.footer-wrap {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 10px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: center;
}

.footer-wrap .col {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.footer-wrap h4 {
  margin: 0 0 .2rem;
  font-size: 1rem;
}

.footer-wrap strong {
  display: block;
  margin: 0 0 .2rem;
  font-size: 1.05rem;
}

.footer-wrap .addr div,
.footer-wrap .addr a {
  font-style: normal;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.social-icons .icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 999px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.social-icons .icon:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.12);
  border-color: #fff;
}

/* Legal/Footer-Bereich */
.footer-legal {
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.4;
}

.footer-legal strong {
  color: #fff;
}

.footer-legal-links {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-weight: 500;
}

.footer-legal-links a:hover {
  opacity: 0.7;
}

.footer-legal-links span {
  color: rgba(255,255,255,0.4);
}

/* Footer: Bild-Hintergrund (Forest) */
footer.footer-forest {
  position: relative;
  color: #f5f5f5;
  background: var(--brand);
  padding: 20px 18px;
}

.forest-strip {
  height: 410px;
  background: url("img/BG_Footer_neu.png") center bottom / cover no-repeat;
  position: relative;
}

/* ==============================
   Projekt-Info-Modal
============================== */
.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.project-modal.open {
  display: flex;
}

.project-modal .modal-inner {
  background: var(--card);
  color: #f5f5f5;
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.project-modal .modal-inner img {
  width: 90%;
  max-width: 700px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 18px;
  box-shadow: var(--shadow);
}

.project-modal .modal-body p {
  color: rgba(255,255,255,.9);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.project-modal img.game-cover{
  display: block;
  margin: 0 auto 18px;
  max-width: 420px;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.project-modal img.poster-img {
  display: block;
  margin: 0 auto 18px;
  max-width: 420px;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* Modal-Grids */
.modal-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0;
}

.modal-grid-two img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.modal-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 12px 0 20px;
}

.modal-grid-three img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Modal-Carousel */
.modal-carousel {
  position: relative;
  margin: 12px 0 24px;
  overflow: hidden;
}

.modal-carousel .carousel-track {
  display: flex;
  transition: transform .4s ease;
}

.modal-carousel .carousel-item {
  flex: 0 0 calc(100% / 3);
  padding: 0 6px;
  box-sizing: border-box;
}

.modal-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,.45);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 2;
}

.carousel-btn.prev {
  left: 4px;
}

.carousel-btn.next {
  right: 4px;
}

.carousel-btn:hover {
  background: rgba(0,0,0,.7);
}

/* ==============================
   Animations
============================== */
@keyframes scroll-dot {
  0%   { transform: translateY(-8px); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

/* ==============================
   Responsive
============================== */

/* etwas kompakter ab Desktop-Tablet Grenze */
@media (max-width: 1100px) {
  .section {
    padding: 56px 20px;
  }

  .hero .wrap {
    padding: 48px 18px 100px;
  }
}

/* Drei Karten nebeneinander auf Tablet beibehalten */
@media (max-width: 1100px) and (min-width: 725px) {
  .work-cards {
    max-width: 900px;
    margin: 0 auto;
    gap: 20px;
  }

  .work-card img {
    object-position: center;
  }
}

/* Tablet-Querformat / kleine Laptops */
@media (max-width: 900px) {
  body {
    font-size: 15px;
  }

  .section {
    padding: 48px 16px;
    gap: 24px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .hero .card {
    max-width: 420px;
    justify-self: center;
  }

  .works-grid h2 {
    margin-bottom: 1.4rem;
  }

  .work-cards {
    gap: 18px;
  }

  .projects-grid {
    padding: 40px 16px;
    grid-auto-rows: 200px;
  }

  .forest-strip {
    height: 260px;
    background-position: center bottom;
  }
}

/* Tablet-Hochformat / große Smartphones */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .nav .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .nav-toggle {
    display: block;
  }

  /* Links als Dropdown */
  .nav .links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    padding: 10px 18px 14px;
    background: color-mix(in oklab, var(--bg) 96%, black 4%);
    border-bottom: 1px solid rgba(0,0,0,.08);
    display: none;
    flex-direction: column;
    gap: 6px;
  }

  .nav .links a {
    justify-content: flex-start;
    height: auto;
    padding: 8px 0;
  }

  .nav .links .btn {
    align-self: flex-start;
    margin-top: 6px;
  }

  .nav.is-open .links {
    display: flex;
  }

  .grid {
    gap: 18px;
  }

  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
    row-gap: 16px;
    align-items: flex-start;
  }

  .footer-wrap .col {
    justify-content: flex-start;
  }

  footer .links {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .projects-hero {
    padding: 40px 16px;
  }

  .project-modal .modal-inner {
    max-width: 100%;
    width: 94%;
    padding: 18px 16px 18px;
  }

  .project-modal .modal-inner img {
    width: 100%;
    max-width: none;
  }
}

/* Legal-Bereich Feintuning */
@media (max-width: 600px) {
  .footer-legal {
    font-size: 0.85rem;
  }

  .footer-legal-links {
    gap: 8px 14px;
  }
}

/* Kleine Smartphones */
@media (max-width: 560px) {
  .section {
    padding: 40px 14px;
  }

  .hero .wrap {
    padding: 40px 14px 80px;
  }

  .hero .card {
    min-height: 260px;
  }

  .work-cards {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .footer-forest {
    padding: 40px 16px 20px;
  }

  .footer-wrap {
    margin-bottom: 0;
  }

  footer .links {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  footer .links a {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .forest-strip {
    height: 200px;
  }
}

/* Extra Feinschliff für sehr kleine Geräte */
@media (max-width: 420px) {
  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .btn {
    height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .nav .wrap {
    padding: 10px 12px;
  }

  .nav .links {
    gap: 8px;
  }
}

.footer-wrap .social-icons {
  grid-column: 1 / -1;
  justify-content: center !important;
}


/* ==============================
   Projects-Grid: Handy-Fix
============================== */

@media (max-width: 600px) {
  .projects-grid {
    /* Einspaltig, volle Breite */
    grid-template-columns: 1fr;
    grid-auto-rows: auto;      /* keine festen Zeilenhöhen mehr */
  }

  /* Alle Karten normal, keine Spans */
  .project-card,
  .project-card.tall,
  .project-card.wide {
    grid-column: auto;
    grid-row: auto;
    min-height: 230px;         /* damit die Thumbnails nicht zu flach werden */
  }
}
