/* ————————————————————————————————————————————————
   Danziger Straße 104 — Wiesbaden · Altbau Editorial
   ———————————————————————————————————————————————— */

:root {
  --plaster: #f3eee4;
  --plaster-deep: #e9e2d2;
  --ink: #1c1b18;
  --ink-soft: #4a4740;
  --sign-blue: #1e3a6e;
  --sign-blue-bright: #2a4d8f;
  --oxide: #a24936;
  --line: rgba(28, 27, 24, 0.16);
  --card: #faf7ef;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Fine grain over everything, like old plaster */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--sign-blue); color: var(--plaster); }

/* ————— Header ————— */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(24px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark em {
  font-style: italic;
  color: var(--oxide);
}

.site-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--sign-blue);
  border-color: var(--sign-blue);
  color: #fff;
}

/* ————— Hero ————— */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 8vh, 96px) clamp(24px, 6vw, 72px);
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.hero-copy .kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxide);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-copy .kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--oxide);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 28px;
}

.hero-copy h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--sign-blue);
}

.hero-copy p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 36px;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}

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

.btn.primary {
  background: var(--sign-blue);
  border-color: var(--sign-blue);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(30, 58, 110, 0.55);
}

.btn.primary:hover { background: var(--sign-blue-bright); }

/* ————— The street sign ————— */

.street-sign-wrap {
  display: flex;
  justify-content: center;
  perspective: 900px;
}

.street-sign {
  background: linear-gradient(168deg, var(--sign-blue-bright) 0%, var(--sign-blue) 55%, #16294e 100%);
  color: #fff;
  border-radius: 14px;
  border: 5px solid #fff;
  outline: 1px solid var(--line);
  box-shadow:
    0 30px 60px -20px rgba(22, 41, 78, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  padding: clamp(28px, 4vw, 48px) clamp(32px, 5vw, 64px);
  text-align: center;
  transform: rotate(-2deg);
  animation: sign-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
  animation-delay: 0.15s;
}

@keyframes sign-in {
  from { opacity: 0; transform: rotate(-2deg) translateY(26px); }
  to   { opacity: 1; transform: rotate(-2deg) translateY(0); }
}

.street-sign .strasse {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.street-sign .nummer {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 10vw, 8rem);
  line-height: 1;
  margin-top: 8px;
  font-variant-numeric: lining-nums;
}

.street-sign .bezirk {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 14px;
}

/* Staggered reveal for hero copy */
.hero-copy > * {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.35s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ————— Footer ————— */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px clamp(24px, 6vw, 72px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ————— Documents area ————— */

.docs-main {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(36px, 7vh, 72px) clamp(24px, 6vw, 48px);
}

.docs-main h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 10px;
}

.docs-main .sub {
  color: var(--ink-soft);
  margin-bottom: 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 20px 50px -30px rgba(28, 27, 24, 0.35);
}

.login-card { max-width: 440px; }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--sign-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 110, 0.15);
}

.error-msg {
  display: none;
  background: rgba(162, 73, 54, 0.09);
  border: 1px solid rgba(162, 73, 54, 0.35);
  color: var(--oxide);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.error-msg.visible { display: block; }

/* File list */

.docs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.user-chip {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.btn.ghost {
  padding: 10px 20px;
  font-size: 0.75rem;
  border-color: var(--line);
  color: var(--ink-soft);
}

.btn.ghost:hover { border-color: var(--ink); color: var(--ink); transform: none; }

.file-list { list-style: none; }

.file-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.5s ease both;
}

.file-item:last-child { border-bottom: none; }

.file-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--sign-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.file-meta { flex: 1; min-width: 0; }

.file-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.file-detail {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.file-item .btn { flex-shrink: 0; }

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.view-toggle button {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle button.active {
  background: var(--sign-blue);
  color: #fff;
}

.intern-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oxide);
  border: 1px solid rgba(162, 73, 54, 0.45);
  border-radius: 999px;
  padding: 2px 10px;
  vertical-align: 2px;
}

.doc-section-intern {
  border-style: dashed;
  border-color: rgba(162, 73, 54, 0.4);
}

.file-note {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--plaster-deep);
  font-style: italic;
}

.stand-line {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.doc-section .section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}

.section-number {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--oxide);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  transform: translateY(-3px);
}

.section-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.section-empty {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
  padding: 10px 0 2px;
}

.empty-state, .loading-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
}

.hidden { display: none !important; }

/* ————— Responsive ————— */

@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .street-sign-wrap { order: -1; }
  .street-sign { transform: rotate(-1.5deg) scale(0.9); }
}
