/* ======================================================= */
/* 1. GLOBALE STILE & RESET */
/* ======================================================= */

/* Schriftart */
@font-face {
  font-family: "Montserrat";
  src: url(../fonts/Montserrat-VariableFont_wght.ttf);
  font-display: swap;
}

/* Variablen (Custom Properties) */
:root {
  --bg-color: #1a1a1a; /* Primärer dunkler Hintergrund (Footer, Sektionen) */
  --text: #000000; /* Standard-Textfarbe */
  --design-color: #d8ae8f; /* Akzentfarbe / Buttons / Links */
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}

/* Reset & Box-Sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  background-color: white; /* Optional: kann auf var(--bg-color) angepasst werden */
  color: var(--text);
  line-height: 1.6;
}

/* Links & Listen */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease-in-out;
}
ul {
  list-style: none;
}

/* ======================================================= */
/* 2. TYPOGRAPHIE & BUTTONS */
/* ======================================================= */

/* Titel */
.title {
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  display: block;
  width: fit-content;
}
.title-h2 {
  color: var(--design-color);
  font-weight: 400;
  font-size: 3rem;
  margin: 2rem auto;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  padding: 1rem;
  border: 1px solid var(--design-color);
  color: var(--text);
  background-color: var(--design-color);
  cursor: pointer;
  transition: 0.3s ease-in-out;
  width: fit-content;
}
.btn:hover {
  background-color: var(--design-color);
  color: white;
}

/* Spezifische Buttons */
.btn-contact {
  background-color: var(--design-color);
  color: var(--text);
}
.btn-contact:hover {
  background-color: transparent;
  color: var(--design-color);
}

/* ======================================================= */
/* 3. HEADER & NAVIGATION */
/* ======================================================= */

header {
  position: sticky;
  top: 0;
  z-index: 99;
  background-color: white;
  padding-bottom: 1rem;
}

#heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 0 1rem;
  padding-top: 3rem;
}

.header-title-text {
  font-size: 2rem;
  text-align: center;
  margin: 0 1rem;
}

.nav {
  display: flex;
  align-items: flex-end;
}

.nav-list {
  display: flex;
  gap: 0.8rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}
.nav-list a:hover {
  color: var(--design-color);
}

/* ======================================================= */
/* 4. HERO SECTION */
/* ======================================================= */

.hero-split {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  min-height: 600px;
  position: relative;
}

.hero-frame {
  position: relative;
  width: 90vw;
  max-width: 1200px;
  height: 60vh;
  max-height: 800px;
  overflow: hidden;
  margin-bottom: 10vh;
}

.hero {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 50px;
}

.hero-title-main {
  font-weight: 400;
  font-size: 3rem;
  white-space: nowrap;
}
.hero-title-sub {
  font-size: 3rem;
  white-space: nowrap;
}
.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
}

.hero-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  color: white;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease-in-out, justify-content 0.7s ease-in-out;
  z-index: 2;
}
.area-coder {
  background-image: url("../img/bg-rechts.png");
  justify-content: flex-start;
  opacity: 1;
}
.area-designer {
  background-image: url("../img/bg-links.png");
  justify-content: flex-end;
  opacity: 0;
  z-index: 3;
}
.hero-frame:hover .area-designer {
  opacity: 1;
}

.hero-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.hero-content {
  z-index: 3;
  max-width: 380px;
  padding: 20px;
}

/* HERO ANIMATION */
@keyframes hero-split-cycle {
  0%,
  45% {
    opacity: 0;
  }
  50%,
  95% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* WORK ANIMATION (Für Portfolio-Bilder auf Mobile/Tablet) */
@keyframes work-cycle {
  0%,
  45% {
    opacity: 0;
  }
  50%,
  95% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ======================================================= */
/* 5. WORK & PORTFOLIO */
/* ======================================================= */

.work {
  text-align: center;
  margin: 5rem 10rem;
}
.work-container {
  display: flex;
  justify-content: center;
  gap: 5rem;
}
.work-img {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.work-img a {
  position: relative;
  display: block;
}
.work-img img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--design-color);
  margin-bottom: 1rem;
  transition: opacity 0.5s ease-in-out;
}
.work-img-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  /* Die Animation wird nur in der Media Query für Mobile/Tablet hinzugefügt! */
}
.work-img a:hover > img:first-child {
  opacity: 0.2;
}
.work-img a:hover > .work-img-hover {
  opacity: 1;
}
.work-img a > img:first-child {
  opacity: 1;
}
.work-img h3 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.work-img p {
  font-size: 0.9rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

/* ======================================================= */
/* 6. ABOUT SECTION */
/* ======================================================= */

.about {
  display: flex;
  justify-content: center;
  padding: 5rem 0;
}
.about-container {
  display: flex;
  align-items: center;
  width: 70%;
  max-width: 1200px;
  gap: 5rem;
}
.about-left {
  font-size: 1.2rem;
}
.about-p {
  text-align: justify;
}
.about-img {
  max-width: 300px;
  border: 1px solid var(--design-color);
}

/* ======================================================= */
/* 7. CONTACT & FORMULAR */
/* ======================================================= */

.contact {
  margin: 5rem;
  text-align: center;
}
.contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto 0;
  text-align: left;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--text);
  background-color: transparent;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.5);
  opacity: 1;
}
.contact-form input[type="text"]:focus,
.contact-form textarea:focus {
  border-color: var(--design-color);
}
.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}
.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.3rem;
}
.form-group label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}
.pot-field {
  /* HONEYPOT FIX: Macht das Feld unsichtbar und nimmt keinen Platz ein */
  display: none !important;
}
.form-group--checkbox {
  flex-direction: row;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.3;
}
.form-group--checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border: 1px solid var(--text);
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  cursor: pointer;
}
.form-group--checkbox input[type="checkbox"]:checked {
  background-color: var(--design-color);
  border-color: var(--design-color);
}
.form-group--checkbox a {
  color: var(--design-color);
  text-decoration: underline;
}
.contact-form button {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  padding: 1rem;
  border: 1px solid var(--design-color);
  color: var(--text);
  background-color: transparent;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}
.contact-form button:hover {
  background-color: var(--design-color);
  color: white;
}
.contact-form .btn-contact {
  background-color: var(--design-color);
  color: var(--text);
}
.contact-form .btn-contact:hover {
  background-color: transparent;
  color: var(--design-color);
}
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* ======================================================= */
/* 8. TOAST BENACHRICHTIGUNGEN */
/* ======================================================= */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-success {
  background: #0f6131;
}
.toast-error {
  background: #e74c3c;
}
.toast-info {
  background: #3498db;
}

/* ======================================================= */
/* 9. FOOTER */
/* ======================================================= */

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-color);
  margin-top: 5rem;
  padding: 1rem 0;
}
.footer {
  color: white;
  font-size: 1.2rem;
}

/* ======================================================= */
/* 10. DATENSCHUTZ */
/* ======================================================= */

.datenschutz-text {
  max-width: 100%;
  padding: 2rem 0;
}
.datenschutz-text h2 {
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem 0;
  color: var(--design-color);
}
.datenschutz-text h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem 0;
}
.datenschutz-text p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ======================================================= */
/* 11. MEDIA QUERIES */
/* ======================================================= */

/* Desktop >768px */
@media (min-width: 769px) {
  .hero-frame .area-designer {
    opacity: 0;
    animation: none;
  }
  .hero-frame:hover .area-designer {
    opacity: 1;
  }
}

/* Tablet <1024px */
@media (max-width: 1024px) {
  #heading {
    padding-top: 1rem;
  }
  .work {
    margin: 5rem 5rem;
  }
  .hero-title-main {
    font-size: 1.6rem;
  }
}

/* Mobile <768px */
@media (max-width: 768px) {
  /* HEADER */
  header {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
  }
  #heading {
    flex-direction: column;
    align-items: center;
    padding: 0 5vw;
    padding-top: 0;
  }
  .header-title-text {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
    font-size: 1.8rem;
  }
  .nav {
    width: 100%;
    align-items: center;
  }
  .nav-list {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    margin: 0;
    font-size: 0.85rem;
  }
  .nav-right .btn-contact {
    padding: 0.3rem 0.5rem;
  }

  /* HERO */
  .hero-area {
    align-items: flex-start;
  }
  .hero-description {
    display: none !important;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
  }
  .hero-frame .area-designer {
    animation: hero-split-cycle 8s infinite ease-in-out;
    opacity: 0;
  }
  .hero-title-sub {
    font-size: 2rem;
  }

  /* WORK - Automatische Animation nur auf Mobile */
  .work-container {
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .work-img-hover {
    animation: work-cycle 8s infinite ease-in-out;
  }

  /* Deaktiviert den Hover-Effekt (Mouseover) auf Mobile/Tablet, 
     damit die Animation ungestört läuft. */
  .work-img a:hover > img:first-child {
    opacity: 1;
  }
  .work-img a:hover > .work-img-hover {
    opacity: 0;
  }

  /* ABOUT */
  .about-container {
    flex-direction: column;
    width: 90%;
    gap: 2rem;
  }
  .about-img {
    max-width: 100%;
  }
  .about-left {
    font-size: 1.1rem;
  }

  /* CONTACT */
  .contact-form {
    max-width: 90%;
  }
  .form-group--checkbox {
    font-size: 0.8rem;
  }

  /* FOOTER */
  .footer-container {
    padding: 2rem 5vw;
  }
}

/* Extra Mobile <600px */
@media (max-width: 600px) {
  .header-title-text {
    font-size: 1.5rem;
  }
  .nav-list {
    font-size: 0.75rem;
  }
  .nav-right .btn-contact {
    font-size: 0.75rem;
  }
  .hero-frame {
    width: 95vw;
    height: 50vh;
    margin-bottom: 10vh;
  }
  .hero-title-sub {
    font-size: 1.6rem;
  }
  .hero {
    padding-bottom: 30px;
  }
  .title-h2 {
    font-size: 2.5rem;
  }
  .work {
    margin: 2rem;
  }
  .work-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .contact {
    margin: 2rem;
  }
  .about-p {
    font-size: 1rem;
    margin: 0 2rem;
  }
}
