/* Dachstich — steiler Giebel, Sparrenlinien, Ziegelrot. */
:root {
  --ziegel: #9d2b22;
  --balken: #6b4a2b;
  --himmel: #d5e4ef;
  --kalk: #f7f1e6;
  --russ: #2a2118;
  --first: #c4a574;
  --bad: #8f1d18;
  --gut: #2f5d3a;
}

*,
*::before,
*::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--himmel);
  color: var(--russ);
  font-family: Barlow, "Trebuchet MS", sans-serif;
  font-size: 1.04rem;
  line-height: 1.55;
}

body.nav-lock { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ziegel); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ziegel); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 0.8rem;
  top: -3rem;
  background: var(--ziegel);
  color: #fff;
  padding: 0.35rem 0.6rem;
  z-index: 80;
}
.skip:focus { top: 0.6rem; }

/* Steep gable: peak is decorative so the bar and menu are never clipped */
.giebel {
  position: relative;
  background: transparent;
  color: var(--kalk);
  padding: 0;
}
.giebel::before {
  content: "";
  display: block;
  height: 5.2rem;
  background: var(--ziegel);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.giebel-innen {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ziegel);
  padding: 0.85rem 6vw 1.25rem;
}
.giebel a.hofmark {
  text-decoration: none;
  color: var(--kalk);
  font-family: Literata, Georgia, serif;
  font-size: 1.8rem;
  line-height: 1;
}
.giebel a.hofmark span {
  display: block;
  font-family: Barlow, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.sparrenknopf {
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--kalk);
  background: transparent;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.sparrenknopf span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--kalk);
  transform-origin: center;
}
.sparrenknopf span:nth-child(1) { width: 1.35rem; }
.sparrenknopf span:nth-child(2) { width: 1.05rem; }
.sparrenknopf span:nth-child(3) { width: 0.75rem; }

.firstgang {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.firstgang a { color: var(--kalk); text-decoration: none; }
.firstgang a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 860px) {
  .giebel::before { height: 3.6rem; }
  .sparrenknopf { display: flex; position: relative; z-index: 90; }
  .firstgang {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: var(--ziegel);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.15rem;
  }
  .firstgang.is-open { display: flex; }
}

/* Rafter diagram behind content */
.hof {
  position: relative;
  max-width: 68rem;
  margin: -1.2rem auto 0;
  background: var(--kalk);
  padding: 2.2rem 1.6rem 3rem;
  box-shadow: 0 16px 40px rgba(42, 33, 24, 0.08);
}
.hof::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(28deg, transparent 49.6%, rgba(107, 74, 43, 0.16) 49.6% 50.2%, transparent 50.2%),
    linear-gradient(-28deg, transparent 49.6%, rgba(107, 74, 43, 0.16) 49.6% 50.2%, transparent 50.2%),
    linear-gradient(90deg, transparent 8%, rgba(107, 74, 43, 0.08) 8% 8.15%, transparent 8.15%);
}

.trauf {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 800px) { .trauf { grid-template-columns: 1fr; } }

.trauf h1 {
  font-family: Literata, Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.08;
  margin: 0 0 0.8rem;
}

.trauf-foto {
  position: relative;
}
.trauf-foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.trauf-foto figcaption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--balken);
}

.latte {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 2.4rem 0 0;
  position: relative;
}
.latte article {
  padding: 1rem 0.8rem 1.1rem 0;
  border-top: 3px solid var(--balken);
}
.latte h2 {
  font-family: Literata, Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}
.latte p { margin: 0; font-size: 0.95rem; }
@media (max-width: 800px) { .latte { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .latte { grid-template-columns: 1fr; } }

.nagel {
  display: inline-block;
  margin-top: 0.8rem;
  background: var(--ziegel);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.blatt {
  position: relative;
  max-width: 42rem;
}
.blatt h1,
.blatt h2 {
  font-family: Literata, Georgia, serif;
}
.blatt h1 { font-size: clamp(2rem, 4.4vw, 3rem); }

.sparrenliste {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}
.sparrenliste li {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(107, 74, 43, 0.22);
}
.sparrenliste i {
  font-style: normal;
  color: var(--ziegel);
  font-weight: 600;
}

.page-gable img {
  width: min(100%, 28rem);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  margin: 0 auto 1.4rem;
}

.balkenfeld {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.8rem;
}
.balkenfeld span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--balken);
}
.balkenfeld input,
.balkenfeld textarea {
  border: 1px solid var(--balken);
  background: #fff;
  padding: 0.55rem 0.6rem;
  font: inherit;
}
.balkenfeld textarea { min-height: 7.5rem; resize: vertical; }
.is-bad { border-color: var(--bad) !important; }

.agree { display: flex; gap: 0.55rem; align-items: flex-start; margin: 0.7rem 0 1rem; font-size: 0.92rem; }
.agree.is-bad { outline: 1px solid var(--bad); padding: 0.25rem; }

.ok { color: var(--gut); font-family: Literata, Georgia, serif; font-size: 1.25rem; }

.fundament {
  background: var(--balken);
  color: var(--kalk);
  padding: 1.8rem 1.4rem 5.2rem;
}
.fundament a { color: var(--kalk); }
.fund-grid {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.4rem;
}
@media (max-width: 720px) { .fund-grid { grid-template-columns: 1fr; } }
.fundament nav { display: flex; flex-direction: column; gap: 0.3rem; }

.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: var(--himmel);
  border-top: 6px solid var(--ziegel);
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}
.cookie-actions { display: flex; gap: 0.45rem; }
.cookie-actions button {
  font: inherit;
  cursor: pointer;
  border: 0;
  padding: 0.45rem 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}
.cookie-actions [data-cookie-accept] { background: var(--ziegel); color: #fff; }
.cookie-actions [data-cookie-reject] { background: transparent; border: 1px solid var(--ziegel); color: var(--ziegel); }
