/* ============================================================
   ELEKTRO RÄDER — shared page chrome
   Topbar · footer · buttons · forms · reveals · sub-page hero
   Loaded after colors_and_type.css.
   ============================================================ */

html { scroll-behavior: smooth; }
body { background: #fff; color: var(--fg-1); overflow-x: hidden; margin: 0; }
img { display: block; max-width: 100%; }
::selection { background: var(--color-yellow); color: #000; }

.wrap   { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-w { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.wrap-n { max-width: 960px;  margin: 0 auto; padding: 0 32px; }

.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 247, 225, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background .3s var(--ease-out);
}
.topbar__inner {
  display: flex; align-items: center; gap: 32px;
  max-width: 1440px; margin: 0 auto;
  padding: 14px 40px;
}
.topbar__logo { height: 64px; width: auto; display: block; }
.topbar__nav  { display: flex; gap: 2px; flex: 1; justify-content: center; }
.topbar__nav a {
  font-size: 14px; font-weight: 500; color: #000;
  padding: 9px 16px; border-radius: 999px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.topbar__nav a:hover { color: var(--accent); background: rgba(0,0,0,.04); }
.topbar__nav a.is-active { color: var(--accent); }
.topbar__nav .has-dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: var(--color-red-tesla); border-radius: 50%;
  margin-right: 8px; vertical-align: 2px;
  box-shadow: 0 0 0 0 rgba(204,0,0,.5);
  animation: navpulse 2.6s ease-in-out infinite;
}
@keyframes navpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(204,0,0,.4); }
  50%      { box-shadow: 0 0 0 6px rgba(204,0,0,0); }
}
.topbar__cta {
  background: var(--color-yellow); color: #000;
  padding: 10px 22px; border-radius: 999px;
  font-weight: 700; font-size: 13px;
  transition: all .22s var(--ease-out);
}
.topbar__cta:hover { background: #fff; color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  font-family: inherit; border: none; cursor: pointer;
  transition: all .22s var(--ease-out);
  letter-spacing: 0.01em; text-decoration: none;
}
.btn[disabled] { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn-yellow { background: var(--color-yellow); color: #000; }
.btn-yellow:hover { background: #fff; color: var(--accent); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.btn-black  { background: #000; color: #fff; }
.btn-black:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-red    { background: var(--accent); color: #fff; }
.btn-red:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }
.btn-ghost  { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.32); }
.btn-ghost:hover { background: #fff; color: #000; border-color: #fff; }
.btn-ghost-dark { background: transparent; color: #000; border: 1px solid rgba(0,0,0,.2); }
.btn-ghost-dark:hover { background: #000; color: #fff; }
.btn .arrow { display: inline-block; transition: transform .25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-back  { background: transparent; color: rgba(0,0,0,.6); border: 1px solid rgba(0,0,0,.14); }
.btn-back:hover { background: rgba(0,0,0,.04); color: #000; }

/* ---------------- Sub-page hero (smaller than home hero) ---------------- */
.subhero {
  position: relative; padding: 0;
  min-height: 56vh; background: #000;
  display: flex; align-items: flex-end; overflow: hidden;
}
.subhero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 45%;
  transform: scale(1.06); animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.subhero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.65) 100%),
    linear-gradient(90deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 60%);
}
.subhero__inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1440px;
  margin: 0 auto; padding: 80px 40px 72px;
}
.subhero__tag {
  color: var(--color-yellow);
  font-size: 12px; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.subhero__tag::before {
  content: ""; width: 36px; height: 1px; background: var(--color-yellow);
}
.subhero h1 {
  color: #fff; font-size: clamp(36px, 5vw, 68px);
  font-weight: 300; letter-spacing: -0.025em;
  line-height: 1.02; margin: 0; max-width: 880px;
  text-wrap: balance;
}
.subhero h1 strong { font-weight: 700; }
.subhero h1 .dash { color: var(--color-yellow); font-weight: 200; }
.subhero__sub {
  color: rgba(255,255,255,.85);
  font-size: 18px; font-weight: 300;
  line-height: 1.55; margin: 22px 0 0;
  max-width: 580px;
}
.subhero__crumb {
  position: absolute; top: 36px; left: 40px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.subhero__crumb a { color: rgba(255,255,255,.6); }
.subhero__crumb a:hover { color: #fff; }
.subhero__crumb .sep { opacity: .5; }
.subhero__crumb .cur { color: #fff; }

/* ---------------- Yellow promise strip (shared) ---------------- */
.promise { background: var(--color-yellow); padding: 52px 0; overflow: hidden; position: relative; }
.promise__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
}
.promise h2 {
  font-size: clamp(26px, 2.6vw, 36px); font-weight: 700; color: #000;
  letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance;
}
.promise h2 em { font-style: normal; color: var(--accent); }
.promise__pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff;
  padding: 12px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.promise__pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-yellow);
  box-shadow: 0 0 0 0 rgba(255,204,51,.5);
  animation: navpulse 2.4s ease-in-out infinite;
}

/* ---------------- Form controls ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px; font-weight: 600;
  color: rgba(0,0,0,.7);
  letter-spacing: .04em;
}
.field label .req { color: var(--accent); margin-left: 2px; }
.field input,
.field textarea,
.field select {
  font-family: inherit; font-size: 15px;
  padding: 14px 16px;
  border: 1px solid #e2e2e6;
  border-radius: 12px;
  background: #fff; color: #000; outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: #c8c8cc; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(204,0,51,.10);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.field.is-error input,
.field.is-error textarea,
.field.is-error select { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(204,0,51,.10); }
.field__err { font-size: 12px; color: var(--accent); font-weight: 600; min-height: 16px; }

.form-row { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-1-2 { grid-template-columns: 1fr 2fr; }

/* Choice chips (segmented control) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid #e2e2e6; background: #fff;
  font-size: 13.5px; font-weight: 500; color: #000;
  cursor: pointer; transition: all .18s var(--ease-out);
  user-select: none;
}
.chip:hover { border-color: rgba(0,0,0,.3); background: #fafafa; }
.chip.is-on {
  background: #000; color: #fff; border-color: #000;
}
.chip.is-on.is-yellow { background: var(--color-yellow); color: #000; border-color: #000; }

/* DSGVO checkbox row */
.dsgvo {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border: 1px solid #ececec; border-radius: 14px;
  background: #fafafa;
  font-size: 12.5px; line-height: 1.55; color: rgba(0,0,0,.7);
}
.dsgvo input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid #c8c8cc; border-radius: 6px; cursor: pointer;
  position: relative; transition: all .18s;
}
.dsgvo input[type=checkbox]:hover { border-color: rgba(0,0,0,.4); }
.dsgvo input[type=checkbox]:checked {
  background: var(--accent); border-color: var(--accent);
}
.dsgvo input[type=checkbox]:checked::after {
  content: ""; position: absolute;
  left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dsgvo label { cursor: pointer; }
.dsgvo a { color: var(--accent); text-decoration: underline; }

/* ---------------- Footer ---------------- */
footer.site { background: #000; color: rgba(255,255,255,.78); padding: 80px 0 36px; }
.footer__top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px; margin-bottom: 56px;
}
.footer__brand img { height: 64px; width: auto; filter: brightness(0) invert(1); margin-bottom: 20px; }
.footer__brand p { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.62); margin: 0 0 16px; max-width: 320px; }
.footer__brand .innung { height: 50px; border-radius: 4px; margin-top: 8px; filter: none; }
.footer__col h4 {
  color: var(--color-yellow);
  font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  margin: 0 0 16px;
}
.footer__col p, .footer__col a {
  font-size: 14px; line-height: 1.85;
  color: rgba(255,255,255,.72); margin: 0;
  display: block;
}
.footer__col a { transition: color .2s; }
.footer__col a:hover { color: var(--color-yellow); }
.footer__col .social { display: flex; gap: 10px; margin-top: 6px; }
.footer__col .social img { height: 38px; width: 38px; transition: transform .2s; }
.footer__col .social a:hover img { transform: translateY(-2px); }
.footer__bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 28px 32px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between;
  align-items: center; gap: 24px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,.45);
  letter-spacing: .04em;
}
.footer__bottom .tesla-mention { display: inline-flex; align-items: center; gap: 8px; }
.footer__bottom .tesla-mention img { height: 56px; width: auto; opacity: .85; filter: none; transition: opacity .2s; }
.footer__bottom .tesla-mention:hover img { opacity: 1; }

/* ---------------- Page transition curtain ---------------- */
#page-curtain {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-yellow);
  transform: translateY(-100%);
  transition: transform .55s cubic-bezier(0.65, 0, 0.35, 1);
  pointer-events: none;
  will-change: transform;
}
html.rt-incoming #page-curtain {
  transform: translateY(0);
  transition: none;
}
#page-curtain.is-covered { transform: translateY(0); }

/* ---------------- Reveal animations ---------------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(0.22,0.61,0.36,1), transform .9s cubic-bezier(0.22,0.61,0.36,1);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal--stagger > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s cubic-bezier(0.22,0.61,0.36,1), transform .8s cubic-bezier(0.22,0.61,0.36,1);
}
.reveal--stagger.is-in > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0ms; }
.reveal--stagger.is-in > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 80ms; }
.reveal--stagger.is-in > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 160ms; }
.reveal--stagger.is-in > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 240ms; }
.reveal--stagger.is-in > *:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: 320ms; }
.reveal--stagger.is-in > *:nth-child(6) { opacity:1; transform:translateY(0); transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--stagger > * { opacity:1!important; transform:none!important; transition:none!important; }
  .subhero__bg { animation: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .topbar__nav { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .form-row.cols-2, .form-row.cols-3, .form-row.cols-1-2 { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .subhero { min-height: 44vh; }
  .subhero__inner { padding: 64px 24px 48px; }
}
