/* =============================================
   baseKemp WordPress Theme – main.css
   ============================================= */

:root {
  --bk-bg:          #f8f8f8;
  --bk-text:        #2e4233;
  --bk-dark:        #1c1b18;
  --bk-muted:       #54534b;
  --bk-very-muted:  #74736c;
  --bk-faint:       #8a897e;
  --bk-light-bg:    #f4f3ef;
  --bk-border:      rgba(28,27,24,.16);
  --bk-accent:      #c5ff13;
  --bk-accent-alt:  #c6ee4b;
  --bk-green-dark:  #1c2415;
  --bk-warm-gray:   #efeee7;
}

*,*::before,*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  color: var(--bk-text);
  background-color: var(--bk-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

::selection { background: var(--bk-accent-alt); color: var(--bk-green-dark); }

/* ── Animations ───────────────────────────── */
@keyframes bk-kenburns {
  0%   { transform: scale(1.05) translate(0,0); }
  100% { transform: scale(1.13) translate(-1.4%,-1%); }
}
@keyframes bk-modalin {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:none; }
}
@keyframes bk-fadein {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes bk-bob {
  0%,100% { transform:translateY(0); }
  50%     { transform:translateY(6px); }
}

/* ── Scroll reveal ────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-visible { opacity:1; transform:none; }

/* ── Header ───────────────────────────────── */
#bk-header {
  position: fixed;
  top:0; left:0; right:0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(22px,4vw,56px);
  color: #ffffff;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, color .4s ease, border-color .4s ease;
}
#bk-header.is-solid {
  background: rgba(244,243,239,.92);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  color: var(--bk-dark);
  border-bottom-color: rgba(28,27,24,.14);
}
#bk-header a { color: inherit; text-decoration: none; }

.bk-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px,2.2vw,32px);
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.bk-nav a { color:inherit; text-decoration:none; opacity:.8; }
.bk-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid currentColor;
  padding: 9px 15px;
  opacity: 1 !important;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.bk-nav-cta:hover {
  background: var(--bk-dark);
  color: #f4f3ef !important;
  border-color: var(--bk-dark) !important;
  transform: translateY(-2px);
}
#bk-header:not(.is-solid) .bk-nav-cta:hover {
  background: rgba(244,243,239,.18);
  color: #f4f3ef !important;
  border-color: rgba(244,243,239,.8) !important;
}

/* ── Hero ─────────────────────────────────── */
#bk-hero {
  position: relative;
  min-height: 100vh;     /* Fallback */
  min-height: 100svh;    /* Modern mobile */
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#bk-hero-media {
  position: absolute;
  top: -14%; left: 0;
  width: 100%;
  height: 128vh;
  z-index: 0;
}
#bk-hero-media > div {
  width:100%; height:100%;
  animation: bk-kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
#bk-hero-media img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  display: block !important;
}
.bk-hero-overlay {
  position: absolute;
  inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(20,22,18,.46) 0%,
    rgba(20,22,18,0) 26%,
    rgba(20,22,18,.02) 54%,
    rgba(20,22,18,.58) 100%);
  pointer-events: none;
}
.bk-scroll-indicator {
  position: absolute;
  bottom: 16px;
  left: clamp(22px,4vw,56px);
  z-index: 2;
  color: #f4f3ef;
  opacity: .55;
  animation: bk-bob 2.4s ease-in-out infinite;
}

/* ── Buttons ──────────────────────────────── */
.bk-btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--bk-green-dark);
  text-decoration: none;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 13px 17px;
  background-color: var(--bk-accent);
  border: none;
  cursor: pointer;
  transition: transform .25s ease;
}
.bk-btn-accent:hover { transform: translateY(-2px); }

.bk-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bk-dark);
  text-decoration: none;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 13px 18px;
  border: 1px solid rgba(28,27,24,.32);
  background: none;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.bk-btn-outline:hover { background: var(--bk-dark); color: #f4f3ef; }

.bk-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bk-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--bk-dark);
  padding-bottom: 4px;
}

/* ── Hero Ghost Button (Vormerken) ─────────── */
.bk-btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f4f3ef;
  text-decoration: none;
  border: 1px solid rgba(244,243,239,.42);
  padding: 13px 18px;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.bk-btn-hero-ghost:hover {
  background: rgba(244,243,239,.14);
  border-color: rgba(244,243,239,.8);
  transform: translateY(-2px);
}

/* ── Sections ─────────────────────────────── */
.bk-section { border-top: 1px solid var(--bk-border); }
.bk-section-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bk-very-muted);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.bk-dot      { width:7px; height:7px; display:inline-block; background:var(--bk-accent); flex-shrink:0; }
.bk-dot--lg  { width:9px; height:9px; }

/* ── Fill-image containers ────────────────── */
.bk-fill-img {
  position: relative;
  overflow: hidden;
}
.bk-fill-img img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  display: block !important;
}

/* ── Habau Logo Desktop max-width ────────────*/
.bk-logo-habau { max-width: 90px !important; }

/* ── Floor-plan type rows ─────────────────── */
.bk-type-row {
  width:100%; text-align:left; cursor:pointer;
  font-family: inherit; color: inherit;
  background: none; border: none;
  border-bottom: 1px solid var(--bk-border);
  padding: clamp(34px,5vh,60px) clamp(22px,4vw,56px);
  display: flex; flex-wrap: wrap;
  gap: clamp(24px,4vw,56px);
  align-items: center;
  transition: background .3s ease;
}
.bk-type-row:hover { background: var(--bk-warm-gray); }
.bk-type-img {
  flex: 0 0 auto;
  width: clamp(150px,16vw,210px);
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #ecebe4;
  position: relative;
}
.bk-type-img img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
}

/* ── Features ─────────────────────────────── */
.bk-feature-btn {
  width:100%; text-align:left; cursor:pointer;
  font-family:inherit; color:inherit;
  background:none; border:none;
  border-bottom:1px solid var(--bk-border);
  padding:18px 0; display:flex; gap:18px; align-items:flex-start;
}
.bk-feat-indicator {
  width:9px; height:9px;
  flex:none;
  display:inline-block;
  border:1px solid rgba(28,27,24,.3);
  transition: background .2s ease, border-color .2s ease;
}
.bk-feat-indicator.is-active {
  background: var(--bk-accent);
  border-color: transparent;
}
.bk-feature-desc {
  display: none;
  margin: 8px 0 2px 22px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--bk-muted);
  font-family: 'Geist Mono', monospace;
  animation: bk-fadein .4s ease;
}
.bk-feature-desc.is-visible { display: block; }

/* ── Vormerkung type selector ─────────────── */
.bk-vtype-btn {
  cursor:pointer; font-family:inherit; color:inherit;
  text-align:left; background:#ebeae3;
  border:none; padding:18px 20px;
  display:flex; align-items:flex-start; gap:14px;
  transition: background .25s ease;
}
.bk-vtype-btn.is-selected { background: var(--bk-accent-alt); }
.bk-vtype-check { display:none; margin-top:2px; flex:none; }
.bk-vtype-btn.is-selected .bk-vtype-check { display:block; }

/* ── Form ─────────────────────────────────── */
.bk-form-input {
  flex:1; min-width:220px;
  font-family:'Geist Mono',monospace; font-size:13px;
  padding:16px 20px;
  border:none; background:#ffffff; color:var(--bk-dark);
  outline:none;
}
.bk-form-input:focus { outline:2px solid var(--bk-accent); outline-offset:-2px; }
.bk-form-msg {
  margin-top:12px;
  font-family:'Geist Mono',monospace;
  font-size:11px; letter-spacing:.04em;
}
.bk-form-msg.success { color:#33401a; }
.bk-form-msg.error   { color:#a83232; }

/* ── Modal ────────────────────────────────── */
#bk-modal {
  display: none;
  position: fixed; inset:0; z-index:90;
  background: rgba(20,22,18,.28);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  align-items:center; justify-content:center;
  padding: clamp(8px,2vw,20px);
  animation: bk-fadein .25s ease;
}
#bk-modal.is-open { display:flex; }
.bk-modal-inner {
  background: var(--bk-light-bg);
  border:1px solid rgba(28,27,24,.18);
  max-width: min(1100px, 98vw); width:100%;
  max-height: 94vh; overflow:auto;
  display:grid; grid-template-columns:1fr 1fr;
  animation: bk-modalin .4s cubic-bezier(.16,1,.3,1);
}
.bk-modal-img-wrap {
  border-right:1px solid var(--bk-border);
  display:flex; align-items:center; justify-content:center;
  padding:10px; min-height:360px; background:#ecebe4;
}
.bk-modal-img-wrap img { width:100%; aspect-ratio:3/4; object-fit:contain; display:block; }
.bk-modal-close {
  position:absolute; top:22px; right:22px;
  width:40px; height:40px;
  border:1px solid rgba(28,27,24,.2);
  background:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--bk-dark);
  transition: background .2s ease;
}
.bk-modal-close:hover { background: rgba(28,27,24,.08); }

/* ── Hamburger Toggle ─────────────────────── */
#bk-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  z-index: 110;
}
#bk-menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: #ffffff;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
#bk-header.is-solid #bk-menu-toggle span {
  background: var(--bk-dark);
}
#bk-menu-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#bk-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
#bk-menu-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile Nav Overlay ───────────────────── */
#bk-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(244,243,239,.72);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 48px;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .3s ease, transform .3s ease;
}
#bk-mobile-nav.is-open {
  display: flex;
  opacity: 1;
  transform: none;
}
#bk-mobile-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  cursor: pointer; color: var(--bk-dark);
  opacity: .7;
  transition: opacity .2s ease;
}
#bk-mobile-close:hover { opacity: 1; }
#bk-mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  align-items: center;
}
#bk-mobile-nav nav a {
  display: block;
  width: 100%;
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: clamp(32px, 9vw, 52px);
  letter-spacing: -.02em;
  color: var(--bk-dark);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--bk-border);
  transition: color .2s ease;
  text-align: center;
}
#bk-mobile-nav nav a:first-child { border-top: 1px solid var(--bk-border); }
#bk-mobile-nav nav a:hover { color: var(--bk-muted); }
.bk-mobile-cta {
  margin-top: 36px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--bk-accent);
  color: var(--bk-green-dark) !important;
  text-decoration: none;
  padding: 14px 28px;
}
.bk-mobile-cta:hover { opacity: .88; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  .bk-nav { display: none; }
  #bk-menu-toggle { display: flex; }

  /* Hero – Content absolut unten links fixieren, bleibt immer in der Section */
  #bk-hero-content {
    position: absolute !important;
    bottom: 0; left: 0; right: 0;
    padding-left: clamp(22px,4vw,56px) !important;
    padding-right: clamp(22px,4vw,56px) !important;
    padding-bottom: clamp(56px, 9vh, 88px) !important;
  }
  #bk-hero-content > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0 !important;
  }
  #bk-hero-content > div > div:first-child {
    max-width: 100%;
  }
  /* Projektkarte ausblenden */
  #bk-hero-content > div > div:last-child {
    display: none !important;
  }

  /* Schriftgrößen: mehr Kontrast auf Mobile */

  /* Projekt Heading */
  #projekt h2 { font-size: clamp(38px,9vw,52px) !important; }

  /* Grundrisse Heading */
  #grundrisse h2 { font-size: clamp(44px,11vw,76px) !important; }

  /* Typ-Reihen Titel */
  .bk-type-row [data-type-title] { font-size: clamp(34px,8.5vw,46px) !important; }

  /* Stats: Zahl größer, Label etwas größer */
  .bk-stat-val   { font-size: clamp(64px,16vw,86px) !important; }
  .bk-stat-label { font-size: clamp(28px,7vw,52px)  !important; }

  /* Kontakt Heading */
  #kontakt h2 { font-size: clamp(42px,10vw,88px) !important; }

  /* Lage / Ausstattung Headings */
  .bk-section h2 { font-size: clamp(34px,8.5vw,56px) !important; }

  /* Projekt-Grid: 1 Spalte */
  #projekt > div {
    grid-template-columns: 1fr !important;
  }
  #projekt > div > div:first-child {
    border-right: none !important;
    border-bottom: 1px solid var(--bk-border);
  }

  /* Ausstattung-Grid: 1 Spalte */
  #ausstattung-grid,
  .bk-section > div[style*="grid-template-columns:repeat(auto-fit,minmax(330px"] {
    grid-template-columns: 1fr !important;
  }

  /* Type rows: gestapelt auf Mobile */
  .bk-type-row {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding: clamp(28px,4vh,44px) clamp(16px,4vw,28px) !important;
  }
  /* Punkt + Nummer oben – linksbündig */
  .bk-type-row > div:first-child {
    min-width: unset;
    margin-bottom: 14px;
    align-self: flex-start;
  }
  /* Titel + Tagline */
  .bk-type-row > div:nth-child(2) {
    flex: none !important;
    width: 100%;
    margin-bottom: 22px;
  }
  /* Specs-Tabelle: sichtbar, etwas größer */
  .bk-type-row > div:nth-child(3) {
    display: flex !important;
    flex: none !important;
    width: 100%;
  }
  .bk-type-row > div:nth-child(3) > div {
    font-size: 14px !important;
    padding: 7px 0 !important;
  }
  /* Pfeil ausblenden */
  .bk-type-row > div:last-child { display: none !important; }

  /* Modal */
  .bk-modal-inner {
    grid-template-columns: 1fr;
    max-height: 100vh;
    max-width: 100vw;
    border-radius: 0;
  }
  .bk-modal-img-wrap {
    min-height: 200px;
    padding: 28px;
    border-right: none !important;
    border-bottom: 1px solid var(--bk-border);
  }
  .bk-modal-inner > div:last-child {
    padding: clamp(24px,4vw,40px) !important;
  }

  /* Form inputs: full width */
  .bk-form-input {
    min-width: 0 !important;
    width: 100%;
    flex: 1 1 100%;
  }
  #bk-contact-form {
    flex-direction: column;
  }
  #bk-contact-form button[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  /* Anbindung grid */
  .bk-mob-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Galerie */
  .bk-gal-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer: Firmenadresse linksbündig auf Mobile */
  .bk-footer-company { text-align: left !important; }

  /* Footer top: nur Adresse, kein Kontakt-Block */
  footer > div:first-child {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  /* Hero logo kleiner */
  #bk-logo { width: min(95vw, 360px) !important; }

  /* Type rows: noch kompakter */
  .bk-type-row > div:nth-child(2) > div:first-child {
    font-size: clamp(22px, 7vw, 34px) !important;
  }

  /* Vormerkung Typ-Buttons: 1 Spalte */
  #kontakt .bk-vtype-btn {
    min-width: 100%;
  }

  /* Modal – Safe Area für iOS (Browser-Chrome unten) */
  #bk-modal {
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bk-modal-inner {
    max-height: 100dvh;
    max-height: 100svh; /* Fallback */
  }
}
