:root {
  color-scheme: light;
  --ink: #18211e;
  --muted: #64716c;
  --line: #d9ded7;
  --paper: #f7f7f2;
  --white: #ffffff;
  --forest: #173d35;
  --copper: #b96f3a;
  --lake: #4f8ea0;
  --shadow: 0 22px 60px rgba(24, 33, 30, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(247, 247, 242, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(24, 33, 30, 0.08);
}

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

.brand.compact { margin-bottom: 28px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(23, 61, 53, .42);
  border-radius: 3px;
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(79,142,160,.18), rgba(255,255,255,.7));
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 8px;
  height: 7px;
  border-top: 2px solid var(--forest);
  border-bottom: 2px solid var(--lake);
  transform: skewY(-8deg);
}
.brand-mark::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 8px;
  border-top: 2px solid var(--copper);
  transform: skewY(-12deg);
}
.brand-mark span {
  position: absolute;
  inset: 0;
}
.brand-mark span::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 6px;
  width: 1px;
  height: 22px;
  background: rgba(23,61,53,.28);
  transform: rotate(18deg);
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
}

.nav-cta {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--forest);
  color: white;
  font-weight: 800;
}

button, .primary, .secondary, .ghost {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

button:hover, .primary:hover, .secondary:hover { transform: translateY(-1px); }
.primary { background: var(--forest); color: white; font-weight: 700; }
.secondary { background: white; color: var(--forest); border: 1px solid var(--line); }
.ghost { background: transparent; color: var(--forest); border: 1px solid rgba(23, 61, 53, 0.28); }

.hero {
  min-height: 88vh;
  position: relative;
  display: grid;
  align-items: end;
  padding: 140px 48px 80px;
  overflow: hidden;
  color: white;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #102420 url("/assets/hero-panorama-sweep.jpg") left 50% / cover no-repeat;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 26, 24, .06), rgba(11, 26, 24, .7)),
    linear-gradient(120deg, rgba(23, 61, 53, .48), rgba(79, 142, 160, .06));
  z-index: 2;
}

.hero-panorama-track {
  position: absolute;
  inset: 0;
  width: 176%;
  background: url("/assets/hero-panorama-sweep.jpg") left 50% / cover no-repeat;
  animation: panoramaLook 44s infinite cubic-bezier(.45, 0, .55, 1);
  will-change: transform;
}

.hero-panel {
  display: none;
}

.hero-panel-1 { background-image: url("/assets/panorama-sequence-1.jpg"); }
.hero-panel-2 { background-image: url("/assets/panorama-sequence-2.jpg"); }
.hero-panel-3 { background-image: url("/assets/panorama-sequence-3.jpg"); }

@keyframes panoramaLook {
  0% { transform: translateX(0); }
  50% { transform: translateX(-43.2%); }
  100% { transform: translateX(0); }
}

.hero-content {
  position: relative;
  max-width: 760px;
}

#zugang, #fakten, #lage, #prozess {
  scroll-margin-top: 92px;
}

.eyebrow {
  color: var(--copper);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  margin: 0 0 14px;
}

.hero .eyebrow { color: #f3b986; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 9vw, 132px);
  line-height: .92;
  letter-spacing: 0;
  margin-bottom: 24px;
}
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: 0;
}
h3 { font-size: 18px; margin-bottom: 8px; }
.lead { font-size: 21px; line-height: 1.5; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: white;
}
.strip span {
  padding: 22px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.section {
  padding: 96px 48px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-head {
  max-width: 820px;
  margin-bottom: 34px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 18px;
}

.facts-section {
  display: grid;
  gap: 8px;
  padding-bottom: 58px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.fact-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px 16px;
  min-height: 132px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  align-items: start;
}

.fact-grid span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .1em;
}

.fact-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 1.36vw, 27px);
  line-height: 1.05;
  font-weight: 500;
  align-self: start;
  display: flex;
  align-items: flex-start;
  white-space: nowrap;
}

.fact-grid small {
  color: var(--muted);
  line-height: 1.28;
  font-size: 14px;
}

.visual-band {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .65fr);
  gap: 56px;
  align-items: center;
  background: #102420;
  color: white;
  padding: 58px 48px;
}

.visual-band img {
  width: 100%;
  height: min(58vw, 620px);
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.visual-band p:not(.eyebrow) {
  color: rgba(255,255,255,.78);
  font-size: 18px;
  line-height: 1.62;
}

.gallery {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  grid-auto-rows: 270px;
  gap: 18px;
}

.gallery figure {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 58px rgba(24, 33, 30, 0.12);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery figure:nth-child(2) img {
  object-position: center 18%;
}

.gallery figure:first-child {
  grid-row: span 2;
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  color: white;
  background: linear-gradient(180deg, transparent, rgba(11, 26, 24, .76));
  line-height: 1.4;
}
.expose-section {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 64px;
  border-bottom: 1px solid var(--line);
}
.expose-copy {
  columns: 2;
  column-gap: 42px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
}
.expose-copy p {
  break-inside: avoid;
}
.privacy-note {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.42);
}
.privacy-note p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.privacy-note a {
  color: var(--forest);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.two-col, .access {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 64px;
}
.steps {
  display: grid;
  gap: 18px;
}
.steps article, .matrix div, .panel, .doc-card, .list-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.steps article { padding: 26px; }
.steps strong { color: var(--copper); }

.compliance {
  display: grid;
  gap: 36px;
}
.matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.matrix div { padding: 24px; min-height: 190px; }
.matrix p, .steps p, .form-copy p { color: var(--muted); line-height: 1.55; }

.panel {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  box-shadow: 0 16px 44px rgba(24, 33, 30, 0.08);
}
label { display: grid; gap: 8px; font-weight: 700; font-size: 13px; color: var(--ink); }
.field-note {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 10px 12px;
  background: #fbfbf8;
  color: var(--ink);
}
textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}
.check input {
  appearance: auto;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin: 1px 0 0;
  padding: 0;
}
.form-status { grid-column: 1 / -1; color: var(--forest); margin: 0; min-height: 20px; }
.form-status.error { color: #9b2f25; }

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  width: min(460px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(16, 28, 26, 0.56); backdrop-filter: blur(8px); }
.dialog-panel {
  padding: 30px;
  display: grid;
  gap: 16px;
  position: relative;
  background: white;
}
.icon-close {
  position: absolute;
  right: 16px;
  top: 16px;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: white;
  font-size: 24px;
}

.hidden { display: none !important; }
.portal {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 50;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.portal-nav {
  background: #102420;
  color: white;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.portal-nav .brand-mark { border-color: white; }
.portal-nav button {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.08);
}
.portal-nav button.active, .portal-nav button:hover { background: rgba(255,255,255,.11); color: white; }
.portal-main { overflow: auto; padding: 32px; }
.portal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: 26px;
}
#userBadge { color: var(--muted); text-align: right; }
.portal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.portal-actions #userBadge {
  flex-basis: 100%;
  margin: 0;
}
.account-badge {
  font-size: 13px;
  color: var(--muted);
}
.portal-copy {
  max-width: 980px;
  margin-bottom: 18px;
}
.portal-copy h2 {
  font-size: 36px;
}
.toolbar {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: wrap;
}
.toolbar select, .toolbar input {
  width: auto;
  min-width: 180px;
  background: white;
}
.toolbar input { min-width: 220px; }
.refresh-button { margin-left: auto; }
.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: white;
}
.segmented button {
  border-radius: 0;
  border: 0;
  background: white;
  color: var(--muted);
  min-height: 42px;
}
.segmented button.active {
  background: var(--forest);
  color: white;
}
.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.doc-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.doc-card {
  padding: 20px;
  display: grid;
  gap: 12px;
  border-left: 5px solid var(--doc-accent, var(--line));
}
.doc-grid .doc-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.doc-card p, .list-item p { color: var(--muted); margin-bottom: 0; }
.doc-card h3 { margin-bottom: 6px; }
.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.type-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--doc-accent, var(--forest));
  background: color-mix(in srgb, var(--doc-accent, var(--forest)) 12%, white);
  margin-bottom: 10px;
}
.cat-registry { --doc-accent: #8d5a2b; }
.cat-object { --doc-accent: #6f7855; }
.cat-planning { --doc-accent: #3f6f8f; }
.cat-survey { --doc-accent: #667f3d; }
.cat-utility { --doc-accent: #9a7a2f; }
.cat-building { --doc-accent: #7c667f; }
.cat-media { --doc-accent: #4f8ea0; }
.cat-sale { --doc-accent: #b96f3a; }
.cat-default { --doc-accent: #64716c; }
.doc-preview {
  height: 210px;
  background: #eef1ec;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.doc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-symbol {
  color: var(--doc-accent, var(--forest));
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .08em;
}
.upload-help {
  max-width: 860px;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.upload-help p {
  margin: 0;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.5;
}
.portal-form { max-width: 860px; }
.list { display: grid; gap: 12px; margin-top: 18px; }
.list-item { padding: 16px; }
.list-item header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.admin-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.admin-wide {
  grid-column: 1 / -1;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.metric-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.metric-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.dashboard-grid h4 {
  margin: 0 0 10px;
}
.admin-shell {
  display: grid;
  gap: 18px;
}
.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
}
.admin-subnav button {
  min-height: 40px;
  padding: 0 14px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.admin-subnav button.active {
  background: var(--forest);
  color: white;
}
.dashboard-wide {
  grid-column: 1 / -1;
}
.signal-item {
  box-shadow: none;
}
.admin-doc-item {
  border-left: 5px solid var(--doc-accent, var(--line));
}
.admin-doc-form {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 10px;
  margin: 10px 0;
}
.danger {
  border-color: rgba(155,47,37,.35);
  color: #9b2f25;
}
.compact-list { font-size: 13px; }

@media (max-width: 860px) {
  .topbar { padding: 0 18px; height: 68px; }
  nav { gap: 10px; }
  nav a:not(.nav-cta) { display: none; }
  .brand { font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-cta { min-height: 38px; padding: 0 12px; font-size: 13px; }
  .topbar .ghost { min-height: 38px; padding: 0 12px; font-size: 13px; }
  .hero { padding: 118px 22px 52px; min-height: 82vh; }
  .hero-content { max-width: 560px; }
  .lead { font-size: 18px; line-height: 1.45; }
  .strip, .matrix, .two-col, .access, .portal, .admin-layout, .admin-doc-form, .metric-grid, .dashboard-grid, .fact-grid, .visual-band, .gallery, .expose-section, .privacy-note { grid-template-columns: 1fr; }
  .strip span { border-right: 0; border-bottom: 1px solid var(--line); }
  .section { padding: 64px 22px; }
  h2 { font-size: 34px; }
  .section-head p { font-size: 16px; }
  .fact-grid { gap: 10px; }
  .fact-grid article { min-height: auto; }
  .fact-grid strong { font-size: 28px; }
  .visual-band { padding: 34px 22px; }
  .visual-band img, .gallery img { height: auto; aspect-ratio: 16 / 10; }
  .gallery { grid-auto-rows: auto; }
  .gallery figure:first-child { grid-row: auto; }
  .expose-copy { columns: 1; }
  .panel { grid-template-columns: 1fr; }
  .doc-grid .doc-card { grid-template-columns: 1fr; }
  .toolbar, .toolbar-filters { align-items: stretch; }
  .toolbar select, .toolbar input, .refresh-button, .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .admin-subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-subnav button { flex: 0 0 auto; }
  .portal { overflow: auto; display: block; }
  .portal-nav {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .portal-nav .brand { grid-column: 1 / -1; margin-bottom: 4px; }
  .portal-nav button {
    justify-content: center;
    min-height: 40px;
    padding: 0 8px;
    font-size: 13px;
  }
  .portal-main { padding: 20px; }
  .portal-head, .portal-actions { align-items: stretch; }
  .portal-actions { justify-content: flex-start; }
  #userBadge { text-align: left; }
  .portal-copy h2 { font-size: 30px; }
  .doc-preview { height: 180px; }
  .doc-actions > * { flex: 1 1 auto; }
}

@media (max-width: 520px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .brand span:last-child { max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  nav { gap: 6px; }
  .nav-cta {
    display: inline-flex;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
  .topbar .ghost {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
  .hero {
    min-height: 76vh;
    padding: 104px 18px 42px;
  }
  .hero-panorama-track {
    width: 260%;
    background-size: 100% 100%;
    animation-duration: 48s;
  }
  @keyframes panoramaLook {
    0% { transform: translateX(0); }
    50% { transform: translateX(-61.5%); }
    100% { transform: translateX(0); }
  }
  h1 { font-size: clamp(48px, 16vw, 72px); margin-bottom: 18px; }
  h2 { font-size: 30px; }
  .lead { font-size: 16px; }
  .hero-actions > * { width: 100%; }
  .strip span { padding: 14px 16px; font-size: 14px; }
  .section { padding: 48px 18px; }
  .facts-section { padding-bottom: 34px; }
  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .fact-grid article {
    padding: 13px;
    gap: 10px;
  }
  .fact-grid span { font-size: 10px; letter-spacing: .08em; }
  .fact-grid strong { font-size: 24px; }
  .fact-grid small { font-size: 12px; line-height: 1.25; }
  .visual-band { padding: 28px 18px; gap: 24px; }
  .visual-band p:not(.eyebrow), .expose-copy, .privacy-note p { font-size: 16px; }
  .gallery { gap: 10px; }
  .gallery figcaption { padding: 14px; font-size: 13px; }
  .panel { padding: 18px; gap: 14px; }
  input, textarea, select, button, .primary, .secondary, .ghost { min-height: 46px; }
  .check {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    font-size: 13px;
  }
  dialog { width: calc(100vw - 24px); }
  .dialog-panel { padding: 24px 18px 20px; }
  .portal-main { padding: 16px; }
  .portal-head { gap: 12px; margin-bottom: 16px; }
  .portal-actions button { flex: 1 1 120px; }
  .toolbar { gap: 8px; }
  .toolbar select, .toolbar input { min-width: 0; }
  .doc-preview-grid { grid-template-columns: 1fr; }
  .doc-card { padding: 16px; }
  .doc-card h3 { font-size: 16px; }
  .list-item header { display: grid; gap: 4px; }
  .metric-grid strong { font-size: 28px; }
  .admin-doc-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-panorama-track { animation: none; transform: translateX(0); }
}
