/* unsolicited.services — german brutalism mit farbe */

:root {
  --bg: #ebebeb;
  --fg: #111111;
  --accent: #6e1b8f;
  --accent2: #067d20;
  --border: #38117c;
  --border-width: 3px;
  --muted: #555555;
  --highlight: #ffe600;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

/* ── GRAIN TEXTURE ───────────────────────────────────────── */

html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 2000px 2000px;
  opacity: 0.18;
}

body {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HEADER ─────────────────────────────────────────────── */

header {
  border-bottom: var(--border-width) solid var(--border);
  padding: 2rem 0 1.25rem;
  margin-bottom: 0;
}

.site-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.site-title a {
  color: var(--fg);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--accent);
}

.site-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── NAVIGATION ──────────────────────────────────────────── */

nav {
  border-bottom: var(--border-width) solid var(--border);
  padding: 0;
  position: relative;
}

/* hide the checkbox */
.nav-toggle {
  display: none;
}

/* burger icon — hidden on wide screens */
.nav-burger {
  display: none;
  padding: 0.65rem 1rem;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  color: var(--fg);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
}

nav ul li a {
  display: block;
  padding: 0.65rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  border-right: 1px solid var(--border);
  transition: background 0.1s, color 0.1s;
}

nav ul li:first-child a {
  border-left: none;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--fg);
  color: var(--bg);
}

/* nav icon via CSS mask — colour follows link text automatically */
nav ul li a::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  vertical-align: middle;
  margin-right: 0.35em;
  margin-bottom: 0.12em;
  flex-shrink: 0;
}

nav ul li:nth-child(1) a::before { -webkit-mask-image: url('../images/icons/icon-home.svg');      mask-image: url('../images/icons/icon-home.svg'); }
nav ul li:nth-child(2) a::before { -webkit-mask-image: url('../images/icons/icon-info.svg');      mask-image: url('../images/icons/icon-info.svg'); }
nav ul li:nth-child(3) a::before { -webkit-mask-image: url('../images/icons/icon-steps.svg');     mask-image: url('../images/icons/icon-steps.svg'); }
nav ul li:nth-child(4) a::before { -webkit-mask-image: url('../images/icons/icon-checklist.svg'); mask-image: url('../images/icons/icon-checklist.svg'); }
nav ul li:nth-child(5) a::before { -webkit-mask-image: url('../images/icons/icon-upload.svg');    mask-image: url('../images/icons/icon-upload.svg'); }
nav ul li:nth-child(6) a::before { -webkit-mask-image: url('../images/icons/icon-mail.svg');      mask-image: url('../images/icons/icon-mail.svg'); }
nav ul li:nth-child(7) a::before { -webkit-mask-image: url('../images/icons/icon-document.svg');  mask-image: url('../images/icons/icon-document.svg'); }

/* ── BURGER MENU (narrow screens) ────────────────────────── */

@media (max-width: 700px) {
  .nav-burger {
    display: block;
  }

  /* swap icon when open */
  .nav-toggle:checked + .nav-burger {
    color: var(--accent);
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: var(--border-width) solid var(--border);
    border-left: var(--border-width) solid var(--border);
    border-right: var(--border-width) solid var(--border);
  }

  .nav-toggle:checked ~ ul {
    display: flex;
  }

  nav ul li a {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
  }

  nav ul li:last-child a {
    border-bottom: none;
  }
}

/* ── MAIN ────────────────────────────────────────────────── */

main {
  padding: 2.5rem 0 4rem;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */

h1 {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--border);
  color: var(--accent);
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

p {
  margin-bottom: 1rem;
  max-width: 68ch;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent);
}

strong {
  font-weight: 800;
}

/* ── HERO / INTRO BLOCK ──────────────────────────────────── */

.hero {
  border: var(--border-width) solid var(--border);
  padding: 2rem;
  margin-bottom: 2.5rem;
  background: var(--fg);
  color: var(--bg);
}

.hero h1 {
  color: var(--highlight);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--bg);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* ── INFO GRID ───────────────────────────────────────────── */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border: var(--border-width) solid var(--border);
  margin-bottom: 2.5rem;
}

.info-card {
  padding: 1.5rem;
  border-right: 2px solid var(--border);
}

.info-card:last-child {
  border-right: none;
}

.info-card h3 {
  margin-top: 0;
  color: var(--accent);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── CTA BLOCK ───────────────────────────────────────────── */

.cta-block {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: var(--border-width) solid var(--border);
  cursor: pointer;
  background: var(--bg);
  color: var(--fg);
  transition: background 0.1s, color 0.1s;
  font-family: var(--font);
}

.btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #3a0750;
  border-color: #3a0750;
  color: #fff;
}

/* ── NOTICE / CALLOUT ────────────────────────────────────── */

.notice {
  border-left: 6px solid var(--accent);
  padding: 1rem 1.25rem 1rem 3rem;
  background: #f5f0f8;
  margin: 1.5rem 0;
  position: relative;
}

.notice::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 1.05rem;
  width: 18px;
  height: 18px;
  background-color: var(--accent);
  -webkit-mask-image: url('../images/icons/icon-warning.svg');
  mask-image: url('../images/icons/icon-warning.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.notice.info {
  border-color: var(--accent2);
  background: #eef8f0;
}

.notice.info::before {
  background-color: var(--accent2);
  -webkit-mask-image: url('../images/icons/icon-info.svg');
  mask-image: url('../images/icons/icon-info.svg');
}

.notice p {
  margin: 0;
  font-size: 0.9rem;
}

/* ── CARD ICONS ──────────────────────────────────────────── */

.card-icon {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 0.6rem;
  color: var(--accent);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* ── RADIO TOGGLE (duration + rechtsform selectors) ─────── */

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

.radio-group {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
}

.radio-label {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--border);
  border-right: none;
  cursor: pointer;
  background: var(--bg);
  color: var(--fg);
  transition: background 0.1s, color 0.1s;
  user-select: none;
}

.radio-label:last-child {
  border-right: 2px solid var(--border);
}

/* highlight selected option */
#auftrag_unbefristet:checked ~ .radio-group label[for="auftrag_unbefristet"],
#auftrag_befristet:checked   ~ .radio-group label[for="auftrag_befristet"] {
  background: var(--fg);
  color: var(--bg);
}

/* show date field only when "befristet" is selected */
.date-field-conditional {
  display: none;
}

#auftrag_befristet:checked ~ .date-field-conditional {
  display: block;
}

/* ── RECHTSFORM SELECTOR ─────────────────────────────────── */

/* all conditional register panels hidden by default */
.rf-fields {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--border);
  margin-bottom: 0.25rem;
}

/* Handelsregister — GmbH, UG, AG, OHG, KG */
.form-section:has(#rechtsform option[value="GmbH"]:checked) .rf-hr-fields,
.form-section:has(#rechtsform option[value="UG"]:checked)   .rf-hr-fields,
.form-section:has(#rechtsform option[value="AG"]:checked)   .rf-hr-fields,
.form-section:has(#rechtsform option[value="OHG"]:checked)  .rf-hr-fields,
.form-section:has(#rechtsform option[value="KG"]:checked)   .rf-hr-fields {
  display: block;
}

/* Sonstige */
.form-section:has(#rechtsform option[value="Sonstige"]:checked) .rf-sonstige-fields {
  display: block;
}

/* ── AUFTRAG TYPE TOGGLE (upload form) ───────────────────── */

/* both panels hidden by default */
.auftrag-existing-panel,
.auftrag-new-panel {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--border);
}

.form-section:has(#auftrag_existing:checked) .auftrag-existing-panel { display: block; }
.form-section:has(#auftrag_new:checked)      .auftrag-new-panel      { display: block; }

/* highlight active auftrag-type label */
.form-section:has(#auftrag_existing:checked) label[for="auftrag_existing"],
.form-section:has(#auftrag_new:checked)      label[for="auftrag_new"] {
  background: var(--fg);
  color: var(--bg);
}

/* scope date panel hidden by default */
.scope-date-panel { display: none; }

.auftrag-new-panel:has(#scope_befristet:checked) .scope-date-panel { display: block; }

/* highlight active scope label */
.auftrag-new-panel:has(#scope_einmalig:checked)    label[for="scope_einmalig"],
.auftrag-new-panel:has(#scope_befristet:checked)   label[for="scope_befristet"],
.auftrag-new-panel:has(#scope_unbefristet:checked) label[for="scope_unbefristet"] {
  background: var(--fg);
  color: var(--bg);
}

/* ── CHECKLIST ───────────────────────────────────────────── */

.checklist {
  list-style: none;
  padding: 0;
  border: var(--border-width) solid var(--border);
  margin-bottom: 2rem;
}

.checklist li {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  margin: 0;
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist li::before {
  content: "□";
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ── FORMS ───────────────────────────────────────────────── */

form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: var(--fg);
}

input[type="text"],
input[type="email"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font);
  border: 2px solid var(--border);
  background: #fff;
  color: var(--fg);
  border-radius: 0;
  appearance: none;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(6, 138, 34, 0.15);
}

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

input[type="file"] {
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.form-section {
  border: var(--border-width) solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section h2 {
  margin-top: 0;
  font-size: 0.85rem;
}

fieldset {
  border: none;
  padding: 0;
}

/* ── TABLE ───────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--fg);
  color: var(--bg);
}

td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  vertical-align: top;
}

tr:nth-child(even) td {
  background: #e8e4de;
}

/* ── FOOTER ──────────────────────────────────────────────── */

footer {
  border-top: var(--border-width) solid var(--border);
  padding: 1.25rem 0;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .site-title { font-size: 1.6rem; }
  h1 { font-size: 1.5rem; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card { border-right: none; border-bottom: 2px solid var(--border); }
  .info-card:last-child { border-bottom: none; }
  nav ul li a { padding: 0.55rem 0.75rem; font-size: 0.72rem; }
  .hero { padding: 1.25rem; }
  .form-section { padding: 1rem; }
}
