@import url("https://use.typekit.net/tkt1mjo.css");

/* Farben aus dem CD-Manual */
:root {
  --green-logo: #0c5135;
  --green-main: #3d5d46;
  --olive: #6f7653;
  --olive-light: #e8ebe3;
  --red: #e30613;
  --black: #000000;
  --white: #ffffff;
  --gray-bg: #f5f7f4;
  --gray-border: #d0d5cc;
}

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

body {
  font-family: "polymath", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--black);
  background: var(--gray-bg);
  min-height: 100vh;
}

/* Hintergrund */
body::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 550px;
  background-image: url("../media/logo.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

/* Header */
header {
  background: linear-gradient(135deg, rgba(12,81,53,0.9) 0%, rgba(61,93,70,0.92) 100%),
              url('../media/Matterhorn.png') center/cover no-repeat;
  color: var(--white);
  padding: 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

header img {
  width: 80px;
  filter: brightness(0) invert(1);
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

header p {
  font-size: 0.9rem;
  opacity: 0.8;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

main h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--green-logo);
  margin-bottom: 0.4rem;
}

main > p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #555;
}

/* Fieldsets */
fieldset {
  border: none;
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border-top: 3px solid var(--green-main);
}

legend {
  font-weight: 600;
  color: var(--green-logo);
  font-size: 1rem;
  letter-spacing: 0.03em;
  padding: 0;
  margin-bottom: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group > label,
.form-group .field-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #333;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Eingabefelder */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: "polymath", sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  width: 100%;
  background: var(--white);
  color: var(--black);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green-main);
  box-shadow: 0 0 0 3px rgba(61, 93, 70, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #aaa;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio/Checkbox */
.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.radio-option input,
.checkbox-option input {
  width: auto;
  accent-color: var(--green-main);
}

/* Fehler */
.error {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Button */
button[type="submit"] {
  display: block;
  width: fit-content;
  margin: 0.5rem auto 0;
  /* background-color: var(--green-logo); alte version */
  background: linear-gradient(135deg, var(--green-logo) 0%, var(--green-main) 100%);
  color: var(--white);
  font-family: "polymath", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(12, 81, 53, 0.25);
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(12, 81, 53, 0.35);
}

/* Bestätigung */
.confirmation {
  background: var(--white);
  border-radius: 8px;
  border-left: 4px solid var(--green-logo);
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.confirmation h2 {
  margin-bottom: 1rem;
  color: var(--green-logo);
}

.confirmation p {
  margin-bottom: 0.75rem;
}

.confirmation table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
}

.confirmation table td {
  padding: 0.4rem 1rem 0.4rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--olive-light);
}

.confirmation table td:first-child {
  font-weight: 500;
  color: #555;
  width: 140px;
  white-space: nowrap;
}

.confirmation a {
  color: var(--green-logo);
  font-weight: 600;
  text-decoration: none;
}

.confirmation a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: var(--green-logo);
  color: var(--white);
  padding: 1.2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.8;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

footer a:hover {
  border-bottom-color: var(--white);
}

/* Desktop ab 700px */
@media (min-width: 700px) {
  header {
    flex-direction: row;
    text-align: left;
    padding: 2.5rem 2.5rem;
    gap: 1.5rem;
  }

  header img {
    width: 100px;
    flex-shrink: 0;
  }

  .form-group {
    flex-direction: row;
    align-items: flex-start;
  }

  .form-group > label,
  .form-group .field-label {
    width: 260px;
    min-width: 260px;
    padding-top: 0.6rem;
    padding-right: 1rem;
    text-align: right;
  }

  .field {
    flex: 1;
  }

  input[type="text"],
  input[type="date"],
  input[type="number"],
  input[type="email"],
  input[type="tel"] {
    max-width: 340px;
  }

  fieldset {
    padding: 1.75rem;
  }
}