/*
  Tuchfabrik Berlin — Basis-Stylesheet
  Reset, Container, Typografie, Buttons, Header/Footer, responsive Nav.
  Seitenspezifische Sektionen (Hero, Teaser, Grids …) leben in eigenen
  Stylesheets pro Seitentyp, sobald diese Seiten gebaut werden.
*/

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.mono { font-family: var(--font-mono); }
.accent-dot { color: var(--brand-red); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-red-d); outline-offset: 3px; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: .98; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.08; }
h3 { font-size: 1.18rem; line-height: 1.3; font-family: var(--font-display); font-weight: 600; }
p { margin: 0 0 1em; }
p, h1, h2, h3 { text-wrap: pretty; }

.kicker, .eyebrow {
  font-family: var(--font-body); font-size: .76rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-slate); margin-bottom: 14px;
}
.eyebrow { font-weight: 500; }
.kicker::after {
  content: ""; display: block; width: 32px; height: 2px; margin-top: 9px; background: var(--brand-red-d);
}
.breadcrumb { min-height: 52px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-faint); font-size: .8rem; }
.breadcrumb a { text-decoration: none; color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--brand-red-d); }
.breadcrumb [aria-current="page"] { color: var(--brand-ink); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-intro { max-width: 62ch; color: var(--ink-muted); font-size: clamp(1rem, 1.5vw, 1.1rem); }

/* ---------- Buttons ----------
   Einheitlich wie "Besichtigung anfragen" im Header: rechteckig, Bordeaux, Versalien.
   primary / on-dark  = gefüllt (Bordeaux)
   ghost              = Bordeaux-Kontur auf hellem Grund
   brand-outline      = Bordeaux-Kontur auf dunklem Grund
   on-dark outline    = weiße Kontur auf Foto / dunklem Grund (Zweit-Button) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  font-size: .78rem; font-weight: 500; line-height: 1.2; text-decoration: none;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 12px 20px; border-radius: var(--radius-sm); white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; font-family: var(--font-body);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn.primary, .btn.on-dark { background: var(--brand-red-d); border-color: var(--brand-red-d); color: #fff; }
.btn.primary:hover, .btn.on-dark:hover { background: var(--brand-red); border-color: var(--brand-red); }
.btn.ghost { background: transparent; border-color: var(--brand-red-d); color: var(--brand-red-d); }
.btn.ghost:hover { background: var(--brand-red-d); color: #fff; }
.btn.brand-outline { background: transparent; border-color: var(--brand-red); color: #fff; }
.btn.brand-outline:hover { background: var(--brand-red-d); border-color: var(--brand-red-d); }
.btn.on-dark.outline { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn.on-dark.outline:hover { background: #fff; border-color: #fff; color: var(--brand-ink); }

/* ---------- Status-Pills (Vermarktungsstatus) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; padding: 3px 10px; border-radius: var(--radius-sm); font-weight: 500;
}
.pill.frei { background: var(--status-frei-bg); color: var(--status-frei); }
.pill.vermietet { background: var(--status-vermietet-bg); color: var(--status-vermietet); }
.pill.prep { background: var(--status-prep-bg); color: var(--status-prep); }

/* ---------- Logo (Wortmarke laut Logokarte) ---------- */
.wordmark {
  --wm-size: 2.15rem;
  --st1: 3px; --st2: 2px; --st3: 2px; --stg: 2px;
  display: inline-flex; flex-direction: column; align-items: stretch;
  text-decoration: none; white-space: nowrap; color: var(--brand-ink); line-height: 1;
}
.wordmark .wm-kicker {
  font-family: var(--font-body); font-weight: 500; font-size: calc(var(--wm-size) * .335);
  letter-spacing: .467em; margin-right: -.467em;
  text-transform: uppercase; color: var(--brand-slate);
}
.wordmark .wm-name {
  font-family: var(--font-logo); font-weight: 800; font-size: var(--wm-size);
  letter-spacing: .012em; text-transform: uppercase; line-height: .92; margin-top: .1em;
}
.wordmark .wm-stripes {
  display: block; margin-top: calc(var(--wm-size) * .12);
  height: calc(var(--st1) + var(--st2) + var(--st3) + 2 * var(--stg));
  background: linear-gradient(to bottom,
    var(--brand-red) 0 var(--st1),
    transparent var(--st1) calc(var(--st1) + var(--stg)),
    var(--brand-slate) calc(var(--st1) + var(--stg)) calc(var(--st1) + var(--stg) + var(--st2)),
    transparent calc(var(--st1) + var(--stg) + var(--st2)) calc(var(--st1) + 2 * var(--stg) + var(--st2)),
    var(--brand-stripe-gray) calc(var(--st1) + 2 * var(--stg) + var(--st2)) 100%);
}

/* ---------- Header / Navigation ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
header.site .wrap {
  max-width: 1440px; padding: 14px clamp(18px, 3.3vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-panel { display: flex; align-items: center; gap: clamp(28px, 4vw, 58px); }
nav.main { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); font-size: .8rem; }
header.site .wordmark { flex-shrink: 0; }
nav.main a, nav.main .drop-trigger {
  text-decoration: none; color: var(--brand-ink); position: relative; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .045em; font-weight: 500;
}
nav.main a:hover, .drop-trigger:hover { color: var(--brand-red-d); }
nav.main a[aria-current="page"]::after,
nav.main .drop:has(.menu a[aria-current="page"]) > .drop-trigger::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px;
  height: 3px; background: var(--brand-red-d);
}
.drop { position: relative; }
.drop-trigger {
  font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--brand-ink); padding: 0;
}
.drop-trigger::after {
  content: ""; width: 6px; height: 6px; margin-top: -4px;
  border-right: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease, margin .15s ease;
}
.drop.open .drop-trigger::after { transform: rotate(-135deg); margin-top: 3px; }
.drop .menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; margin-top: 18px;
  display: none; flex-direction: column; min-width: 220px;
}
.drop .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.drop:hover .menu, .drop.open .menu { display: flex; }
.drop .menu a {
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: .85rem; color: var(--brand-ink);
  text-decoration: none; text-transform: none; letter-spacing: normal; font-weight: 400;
}
.drop .menu a::after { display: none; }
.drop .menu a:hover { background: var(--surface); color: var(--brand-red-d); }
.drop .menu a[aria-current="true"] { font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: clamp(18px, 2vw, 28px); }
.lang-drop .drop-trigger {
  font-size: .8rem; font-weight: 500; letter-spacing: .045em; text-transform: uppercase;
}
.lang-drop .menu { min-width: 140px; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px; cursor: pointer; color: var(--brand-ink);
}
.nav-toggle svg { display: block; width: 20px; height: 20px; }

@media (max-width: 1220px) {
  .nav-panel { display: none; }
  .nav-panel.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px clamp(18px,4vw,48px) 20px;
  }
  .nav-panel.open nav.main { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-panel.open nav.main > a, .nav-panel.open nav.main .drop-trigger { padding: 10px 0; }
  nav.main a[aria-current="page"]::after,
  nav.main .drop:has(.menu a[aria-current="page"]) > .drop-trigger::before { bottom: 6px; height: 2px; }
  .nav-panel .drop .menu {
    position: static; transform: none; box-shadow: none; border: none;
    display: flex; margin-top: 0; padding: 0 0 6px 14px; min-width: 0;
  }
  .nav-panel .drop .menu::before { display: none; }
  .nav-panel.open .header-actions {
    flex-direction: column; align-items: flex-start; gap: 12px;
    margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); width: 100%;
  }
  .nav-panel.open .btn.primary { width: 100%; justify-content: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 480px) { header.site .wordmark { --wm-size: 1.8rem; } }

/* ---------- Footer ---------- */
footer.site {
  --fpad: clamp(18px, 2.4vw, 32px);
  background: var(--surface); color: var(--brand-slate); position: relative; padding: 18px 0 26px;
}
footer.site::before, footer.site::after {
  content: ""; display: block;
  width: calc(100% - 2 * var(--fpad)); max-width: calc(1440px - 2 * var(--fpad));
  margin-left: auto; margin-right: auto;
}
footer.site::before {
  height: 14px;
  background: linear-gradient(to bottom,
    var(--brand-red) 0 3px, transparent 3px 6px,
    var(--brand-slate) 6px 8px, transparent 8px 11px,
    var(--brand-stripe-gray) 11px 14px);
}
footer.site::after { height: 1px; background: var(--brand-red); }
footer.site .wrap {
  max-width: 1440px;
  padding: clamp(56px, 7vw, 86px) calc(var(--fpad) + clamp(0px, 2vw, 24px)) clamp(44px, 5vw, 56px);
  display: grid; grid-template-columns: minmax(0,1.58fr) minmax(0,1fr) minmax(0,1.1fr) minmax(0,1.46fr);
  align-items: stretch;
}
footer.site .col { min-width: 0; }
footer.site .col:nth-child(3), footer.site .col:nth-child(4) {
  border-left: 1px solid var(--brand-line); padding-left: clamp(20px, 3vw, 36px);
}
footer.site .col:nth-child(4) { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
footer.site .wordmark { --wm-size: 3.25rem; --st1: 4px; --st2: 3px; --st3: 3px; --stg: 3px; margin-bottom: 24px; }
footer.site .col > div:not(.col-label):not(.contact-row) {
  font-size: .95rem; line-height: 1.7; color: var(--brand-slate);
}
footer.site .col > a:not(.wordmark), footer.site .col-label {
  display: block; width: fit-content; font-size: .95rem; line-height: 1.45;
  color: var(--brand-slate); text-decoration: none; margin: 0 0 17px;
}
footer.site .col > a:not(.wordmark):last-child { margin-bottom: 0; }
footer.site .col > a:not(.wordmark):hover { color: var(--brand-red-d); }
footer.site .col-label { display: inline-flex; align-items: center; gap: 12px; }
footer.site .col-label::after {
  content: ""; width: 6px; height: 6px; margin-top: -4px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg);
}
footer.site .contact-row { display: flex; align-items: center; gap: 14px; font-size: .98rem; color: var(--brand-slate); }
footer.site .contact-row .cicon { width: 20px; height: 20px; flex: none; color: var(--brand-red); }
footer.site .contact-row a { color: inherit; text-decoration: none; }
footer.site .contact-row a:hover { color: var(--brand-red-d); }

@media (max-width: 900px) {
  footer.site .wrap { grid-template-columns: minmax(0,1fr) minmax(0,1fr); row-gap: 40px; }
  footer.site .col:nth-child(1) { grid-column: 1 / -1; }
  footer.site .col:nth-child(3) { border-left: 1px solid var(--brand-line); }
  footer.site .col:nth-child(4) { grid-column: 1 / -1; border-left: none; padding-left: 0; }
}
@media (max-width: 520px) {
  footer.site .wrap { grid-template-columns: minmax(0,1fr); }
  footer.site .col:nth-child(3) { border-left: none; padding-left: 0; }
  footer.site .wordmark { --wm-size: 2.6rem; }
}

/* ---------- Hinweisseite (EN "coming soon", reservierte Einheiten) ---------- */
.coming-soon { padding: clamp(64px, 10vw, 128px) 0; border-bottom: 1px solid var(--line); }
.coming-soon h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; max-width: 18ch; }
.coming-soon .lede { margin-top: 14px; max-width: 60ch; color: var(--ink-muted); font-size: clamp(1rem, 1.4vw, 1.12rem); }
.coming-soon .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.coming-soon-contact { margin-top: 28px; font-size: .9rem; color: var(--ink-faint); }
.coming-soon-contact a { color: inherit; }

/* ---------- Entwurfs-Hinweis (nur für unveröffentlichte Einheiten) ---------- */
.draft-tag {
  background: var(--overlay-ink); color: rgba(255,255,255,.78);
  font-family: var(--font-mono); font-size: .8rem;
  padding: 10px clamp(18px,4vw,48px);
}
