/* ============================================================
   Berner Express — Landingpage
   CI 1:1 von bernerexpress.ch (Webflow-Stylesheet extrahiert):
   Blau #008ce2 · Dunkel #001c22 · Flaechen #f8f7f4/#f4f6f1
   Headings: Bebas Neue · Body: Montserrat · Buttons: Pill 44px
   ============================================================ */

:root {
  --be-blau: #008ce2;          /* brand-color--primary */
  --be-dunkel: #001c22;        /* primary-text / dark-bg */
  --be-hell: #f8f7f4;          /* secondary-bg */
  --be-hell-2: #f4f6f1;        /* tertiary-bg */
  --be-weiss: #ffffff;         /* primary-bg */
  --be-grau: #999999;          /* secondary-text */
  --be-mute: #bdbdbd;          /* mute-text-color */
  --be-border: #e0e0e0;        /* border-card / divider */
  --be-lime: #baff00;          /* primary-hover / stars */
  --font-head: "Bebas Neue", Arial, sans-serif;
  --font-body: "Montserrat", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--be-weiss);
  color: var(--be-dunkel);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Buttons: exakt wie «OFFERTE EINHOLEN» ---------- */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 12px;
  background-color: var(--be-blau);
  color: var(--be-weiss);
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  line-height: 1.6em; text-decoration: none;
  border: 0; border-radius: 44px;
  padding: 16px 24px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.btn:hover { background-color: var(--be-dunkel); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- 3D-Buehne ---------- */
#stage { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }

/* ---------- Fallback ohne WebGL ---------- */
#fallback { display: none; }
body.no3d #stage { display: none; }
body.no3d #fallback {
  display: flex; position: fixed; inset: 0; z-index: 0;
  align-items: center; justify-content: center;
  perspective: 900px;
}
body.no3d #fallback img {
  width: min(58vmin, 460px);
  filter: drop-shadow(0 30px 60px rgba(0, 140, 226, 0.28));
  animation: fb-spin 26s linear infinite;
  transform-style: preserve-3d;
}
@keyframes fb-spin {
  0%   { transform: rotateY(0deg) rotateX(5deg); }
  50%  { transform: rotateY(180deg) rotateX(-5deg); }
  100% { transform: rotateY(360deg) rotateX(5deg); }
}
@media (prefers-reduced-motion: reduce) {
  body.no3d #fallback img { animation: none; }
}

/* ---------- Brand oben links ---------- */
.brand { position: fixed; top: 22px; left: 26px; z-index: 30; }
.brand img { height: 28px; width: auto; }

/* ---------- Scroll-Hinweis ---------- */
.scroll-hint {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--be-grau); font-size: 11px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  transition: opacity 0.5s ease; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint svg { animation: hint 1.8s ease-in-out infinite; }
  @keyframes hint { 0%, 100% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(7px); opacity: 0.35; } }
}

/* ---------- Klickflaeche ueber dem 3D-Logo ---------- */
.logo-hit {
  position: fixed; z-index: 20;
  left: 50%; top: 50%;
  width: min(56vmin, 520px); height: min(56vmin, 520px);
  transform: translate(-50%, -50%);
  background: transparent; border: 0; border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.4s ease;
}
.logo-hit:focus-visible { outline: 2px solid var(--be-blau); outline-offset: 8px; }
.logo-hit.hidden { opacity: 0; pointer-events: none; }

.intro-tip {
  position: fixed; z-index: 21;
  left: 50%; bottom: 90px; transform: translateX(-50%);
  color: var(--be-grau); font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity 1s ease 1.4s;
  pointer-events: none; white-space: nowrap; max-width: 92vw;
}
@media (max-width: 520px) { .intro-tip { white-space: normal; text-align: center; } }
body.ready .intro-tip { opacity: 1; }
body.scrolled .intro-tip, body.scrolled .scroll-hint { opacity: 0; }

/* ---------- USP-Overlay ---------- */
.usp {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  background: rgba(0, 28, 34, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.usp[hidden] { display: none; }
.usp-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: 92vh; overflow-y: auto;
  background: var(--be-weiss);
  border: 1px solid var(--be-border);
  border-radius: 24px;
  padding: clamp(28px, 5vh, 52px) clamp(22px, 4vw, 52px);
  box-shadow: 0 40px 90px rgba(0, 28, 34, 0.35);
  animation: usp-in 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes usp-in { from { opacity: 0; transform: translateY(26px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .usp-panel { animation: none; } }

.usp-close {
  position: absolute; top: 16px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--be-hell); border: 1px solid var(--be-border);
  color: var(--be-dunkel); font-size: 15px; cursor: pointer;
  transition: background 0.2s ease;
}
.usp-close:hover { background: var(--be-border); }
.usp-kicker {
  color: var(--be-blau); font-size: 12px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 8px;
}
.usp h2 {
  font-family: var(--font-head);
  font-size: clamp(34px, 5vw, 52px); font-weight: 400;
  letter-spacing: 0.01em; line-height: 1;
  text-transform: uppercase; margin-bottom: 24px;
}
.usp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.usp-item {
  background: var(--be-hell);
  border: 1px solid var(--be-border); border-radius: 16px; padding: 18px 20px;
}
.usp-item h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 5px; }
.usp-item p { font-size: 13px; color: var(--be-grau); }
.usp-item.usp-stats {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; align-items: start; text-align: center;
  padding: 22px 16px;
}
.usp-stats > div { display: grid; gap: 6px; justify-items: center; }
.usp-stats b {
  display: block; font-family: var(--font-head);
  font-size: clamp(30px, 4vw, 44px); font-weight: 400;
  color: var(--be-blau); line-height: 1;
}
.usp-stats span {
  font-size: 11.5px; color: var(--be-grau);
  line-height: 1.35; max-width: 14ch;
}

.usp-nav { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.usp-nav a { flex: 1; min-width: 160px; }

/* ---------- Content-Sektionen ---------- */
main { position: relative; z-index: 10; }

.intro { height: 100vh; }
.intro { height: 100svh; }

.sec { padding: clamp(80px, 14vh, 140px) 6vw; position: relative; }
.wrap { width: min(1120px, 100%); margin: 0 auto; }
.wrap.narrow { max-width: 820px; }

.kicker {
  color: var(--be-blau); font-size: 12px; font-weight: 700;
  letter-spacing: 0.26em; text-transform: uppercase; margin-bottom: 12px;
}
.sec h2 {
  font-family: var(--font-head);
  font-size: clamp(44px, 7vw, 88px); font-weight: 400;
  letter-spacing: 0.01em; line-height: 0.95;
  text-transform: uppercase; margin-bottom: 18px;
  text-wrap: balance;
}
.sec .lead { color: var(--be-grau); font-size: 15.5px; max-width: 60ch; }

/* Dienstleistungen: helle Flaeche */
#dienstleistungen { background: var(--be-hell); }
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 44px;
}
.card {
  background: var(--be-weiss);
  border: 1px solid var(--be-border); border-radius: 20px;
  padding: 28px 26px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 140, 226, 0.45);
  box-shadow: 0 20px 44px rgba(0, 140, 226, 0.14);
}
.card h3 {
  font-family: var(--font-head); font-weight: 400;
  font-size: 26px; line-height: 1; letter-spacing: 0.01em;
  text-transform: uppercase; margin-bottom: 10px;
}
.card p { font-size: 14px; color: var(--be-grau); }

/* Video-Sektion: Einblicke (Portrait-Clips) */
#einblicke { background: var(--be-weiss); }
.reels {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; margin-top: 44px;
}
@media (max-width: 860px) {
  .reels { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
.reel { text-align: left; }
.reel .frame {
  position: relative; border-radius: 22px; overflow: hidden;
  aspect-ratio: 9 / 16;
  background: var(--be-hell-2);
  border: 1px solid var(--be-border);
  box-shadow: 0 24px 50px rgba(0, 28, 34, 0.14);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.reel:hover .frame { transform: translateY(-6px); box-shadow: 0 30px 64px rgba(0, 140, 226, 0.2); }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel figcaption { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--be-dunkel); }
.reel figcaption span { display: block; font-weight: 400; color: var(--be-grau); font-size: 12.5px; }

/* Kernkompetenz-Sektionen: Osmose (hell) und Gewerbe (weiss) */
#osmose { background: var(--be-hell); }
#gewerbe { background: var(--be-weiss); }
.split {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: center;
}
.split.rev .side-video { order: -1; }
.side-video {
  border-radius: 22px; overflow: hidden;
  aspect-ratio: 9 / 16; max-height: 620px;
  width: 100%; max-width: 350px; justify-self: center;
  background: var(--be-hell-2);
  border: 1px solid var(--be-border);
  box-shadow: 0 24px 50px rgba(0, 28, 34, 0.12);
}
.side-video video { width: 100%; height: 100%; object-fit: cover; }
.checklist { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
.checklist li {
  position: relative; padding-left: 32px;
  font-size: 14.5px; font-weight: 500; line-height: 1.5;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--be-blau);
}
.checklist li::after {
  content: ""; position: absolute; left: 5px; top: 6px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--be-weiss);
  border-bottom: 2px solid var(--be-weiss);
  transform: rotate(-45deg);
}

/* Ueber uns: dunkle Sektion (CI-Dunkel) */
#ueber-uns { background: var(--be-dunkel); color: var(--be-weiss); }
#ueber-uns .kicker { color: var(--be-blau); }
.about-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
}
.vision {
  font-size: clamp(16px, 2vw, 20px); color: #cfdadd;
  line-height: 1.6; margin: 22px 0 16px;
}
.target { color: var(--be-grau); font-size: 14.5px; }
.about-video {
  border-radius: 22px; overflow: hidden;
  aspect-ratio: 9 / 16; max-height: 640px; justify-self: center; width: 100%; max-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}
.about-video video { width: 100%; height: 100%; object-fit: cover; }

/* Kontakt */
#kontakt { background: var(--be-hell-2); }
.contact-grid {
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px;
  margin-top: 40px; align-items: start;
}
form {
  display: grid; gap: 16px;
  background: var(--be-weiss); border: 1px solid var(--be-border);
  border-radius: 20px; padding: 32px;
  box-shadow: 0 12px 34px rgba(0, 28, 34, 0.06);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 7px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--be-dunkel); }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--be-dunkel);
  background: var(--be-hell);
  border: 1px solid var(--be-border); border-radius: 10px;
  padding: 13px 14px; width: 100%;
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(0, 140, 226, 0.55); border-color: var(--be-blau);
}
.form-msg { font-size: 13.5px; color: var(--be-blau); min-height: 1.2em; font-weight: 600; }
.form-msg.err { color: #d84040; }

.contact-data { display: grid; gap: 14px; align-content: start; }
.contact-data a {
  display: block; text-decoration: none;
  background: var(--be-weiss); border: 1px solid var(--be-border);
  border-radius: 14px; padding: 16px 20px;
  font-weight: 700; font-size: 15px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-data a:hover {
  border-color: rgba(0, 140, 226, 0.5); transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 140, 226, 0.12);
}
.contact-data a small { display: block; color: var(--be-grau); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.contact-data .loc { color: var(--be-grau); font-size: 13.5px; padding: 4px 6px; }

/* ---------- Footer ---------- */
footer {
  position: relative; z-index: 10;
  background: var(--be-dunkel); color: var(--be-grau);
  padding: 30px 6vw;
}
.foot {
  width: min(1120px, 100%); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  font-size: 13px;
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: #cfdadd; text-decoration: none; }
.foot a:hover { color: var(--be-weiss); text-decoration: underline; }

/* ---------- Scroll-Reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0; transform: translateY(34px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .rv.in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid, .about-grid, .split { grid-template-columns: 1fr; }
  .split.rev .side-video { order: 0; }
  .side-video { max-width: 300px; }
  .row2 { grid-template-columns: 1fr; }
  .logo-hit { width: min(72vmin, 420px); height: min(72vmin, 420px); }
  .intro-tip { bottom: 76px; font-size: 12px; }
  .about-video { max-width: 300px; }
}
