:root {
  --bg: #f4efe6;
  --bg-alt: #efe4d2;
  --card: rgba(255, 252, 246, 0.82);
  --line: rgba(59, 44, 29, 0.12);
  --ink: #2f2418;
  --muted: #766250;
  --accent: #b5643b;
  --accent-dark: #8f4723;
  --shadow: 0 24px 80px rgba(83, 53, 28, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scroll-behavior: smooth;
  hyphens: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(181, 100, 59, 0.2), transparent 32%),
    radial-gradient(circle at right 15% top 10%, rgba(212, 180, 130, 0.3), transparent 24%),
    linear-gradient(180deg, #f7f2ea 0%, #f0e7d8 100%);
}

img { display: block; max-width: 100%; }

.page-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 0 56px;
  display: flex;
  flex-direction: column;
}

main {
  display: block;
}

.hero,
.content-grid,
.forms-grid,
.protected-grid {
  display: grid;
  gap: 24px;
}

.hero {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  min-height: 90vh;
  padding: 24px 0;
  isolation: isolate;
}

.hero-copy {
  min-width: 0;
  width: min(100%, 760px);
  padding: 32px 0;
  position: relative;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 252, 246, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.8rem, 4.4vw, 4.9rem);
}

h2 { font-size: clamp(1.8rem, 1.9vw, 2.45rem); }

.hero-teaser,
.copy-stack p,
.notice p,
.steps p,
.spoiler-output,
.status-box,
.history-box,
label span,
input,
textarea,
button {
  font-size: 1rem;
}

.hero-teaser,
.copy-stack p,
.notice p,
.steps p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta,
.hero-actions,
.facts-grid,
.steps,
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span,
.image-counter,
.notice strong {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  backdrop-filter: blur(14px);
}

.hero-actions { margin-top: 28px; }

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--accent) 0%, #c7774d 100%);
  box-shadow: 0 14px 28px rgba(181, 100, 59, 0.28);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.hero-stage {
  position: absolute;
  inset: 16px 0 16px auto;
  width: min(62vw, 880px);
  min-width: 0;
  z-index: 0;
  pointer-events: none;
}

.main-image-card,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.main-image-card {
  height: 100%;
  padding: 22px;
  transform: none;
  background:
    linear-gradient(90deg, rgba(247, 242, 234, 0.96) 0%, rgba(247, 242, 234, 0.72) 28%, rgba(247, 242, 234, 0.18) 62%, rgba(247, 242, 234, 0.12) 100%),
    rgba(255, 252, 246, 0.28);
}

.main-image-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 8px);
  filter: saturate(0.82) contrast(0.94) brightness(1.03);
  opacity: 0.9;
}

.image-counter {
  position: absolute;
  right: 38px;
  bottom: 38px;
  font-weight: 700;
  z-index: 1;
}

.gallery-section { margin: 24px 0 40px; }
.section-heading { margin-bottom: 18px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.gallery-item:focus-visible,
.lightbox-close:focus-visible,
.lightbox-backdrop:focus-visible {
  outline: 3px solid rgba(181, 100, 59, 0.45);
  outline-offset: 4px;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(54, 37, 23, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-item:hover img,
.gallery-item.is-active img {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(54, 37, 23, 0.2);
}

.gallery-item span {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.feature-list li + li {
  margin-top: 6px;
}

.content-grid { grid-template-columns: 1.2fr 0.8fr; }
.card { padding: 28px; }

.facts-grid { margin: 22px 0 10px; }

.facts-grid div {
  flex: 1 1 calc(50% - 12px);
  min-width: 200px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(59, 44, 29, 0.08);
}

.facts-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.copy-stack { display: grid; gap: 14px; }
.process-card { margin: 24px 0; }
.steps { margin-top: 24px; align-items: stretch; }

.steps div {
  flex: 1 1 240px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(59, 44, 29, 0.08);
}

.steps span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fffaf4;
  font-family: "Fraunces", serif;
  background: var(--accent);
}

.forms-grid,
.protected-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.spoiler-card .form-inline {
  margin-top: 18px;
  align-items: flex-end;
}

.spoiler-card .button {
  flex-shrink: 0;
}

.form-stack {
  display: grid;
  gap: 14px;
}

label { display: grid; gap: 8px; }

input,
textarea {
  width: 100%;
  border: 1px solid rgba(59, 44, 29, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-family: inherit;
}

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

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status-box,
.history-box,
.spoiler-output {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(59, 44, 29, 0.1);
  color: var(--ink);
}

.history-box ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.history-box li {
  margin-bottom: 8px;
  color: var(--muted);
}

.notice {
  margin-top: 24px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(181, 100, 59, 0.14), rgba(255, 255, 255, 0.4));
  border: 1px solid rgba(181, 100, 59, 0.18);
}

.notice strong {
  display: inline-block;
  margin-bottom: 12px;
}

.bid-card { margin-top: 24px; }

.document-card {
  margin-top: 24px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.document-item {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.document-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(59, 44, 29, 0.08);
  box-shadow: 0 16px 36px rgba(54, 37, 23, 0.12);
  background: rgba(255, 255, 255, 0.85);
}

.document-item span {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
}

.document-grid.is-locked .document-item img {
  opacity: 0.98;
}

.document-grid.is-locked .document-item span::after {
  content: " · gesperrt";
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(31, 22, 14, 0.78);
  cursor: pointer;
}

.lightbox-dialog {
  position: relative;
  width: min(92vw, 1100px);
  height: min(86vh, 820px);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(43, 31, 21, 0.88);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.lightbox-dialog img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.document-lightbox {
  z-index: 62;
}

.document-lightbox-dialog {
  width: min(94vw, 920px);
  height: min(96vh, 1400px);
}

.document-lightbox-dialog img {
  width: auto;
  max-width: 100%;
  height: 100%;
  justify-self: center;
  background: rgba(255, 255, 255, 0.02);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.8rem;
  cursor: pointer;
}

.lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #fff8f0;
}

.site-footer {
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 28px 0 8px;
  color: var(--muted);
  margin-top: auto;
}

.site-footer a,
.legal-card a {
  color: inherit;
}

.legal-page {
  width: min(calc(100% - 24px), 900px);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.legal-card {
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .hero,
  .content-grid,
  .forms-grid,
  .protected-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero {
    min-height: auto;
    padding: 0;
  }

  .hero-copy {
    width: 100%;
    margin-bottom: 0;
    padding: 24px;
  }

  .hero-stage {
    position: relative;
    inset: auto;
    width: min(100%, 560px);
    justify-self: center;
    pointer-events: auto;
  }

  .main-image-card {
    height: auto;
    padding: 18px;
    background: var(--card);
  }

  .main-image-card img {
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    filter: none;
    opacity: 1;
  }

  .document-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1580px) {
  h1 {
    font-size: 4.2rem;
  }

  h2 {
    font-size: 2.45rem;
  }
}

@media (min-width: 1025px) {
  .hero-copy {
    margin-bottom: 73px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--container));
    padding-top: 14px;
  }

  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .card,
  .main-image-card { padding: 18px; }

  .form-inline { flex-direction: column; }

  .form-inline input,
  .form-inline button { width: 100%; }

  .lightbox {
    padding: 12px;
  }

  .lightbox-dialog {
    width: 100%;
    height: min(82vh, 720px);
    padding: 14px;
  }

  .document-lightbox-dialog {
    width: 100%;
    height: min(92vh, 980px);
  }

  .lightbox-footer {
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-footer {
    flex-wrap: wrap;
  }
}
