/* ============================================================
   BEE Retail Software Boxes (90s Windows-style)
   Real 3D via transform-style: preserve-3d.
   Default: skewed ~20° Y-rotation, sits on a drop shadow.
   Hover: straightens to face-on, lifts.
   ============================================================ */

:root {
  --box-tilt: 28deg;
  --box-depth: 92px;
  --box-w: 320px;
  --box-h: 460px;
}

.box-stage {
  width: 100%;
  display: flex; justify-content: center; align-items: flex-end;
  min-height: calc(var(--box-h) + 120px);
  padding-top: 60px;
  padding-bottom: 40px;
  overflow: visible;
}

.box-link {
  display: block; text-decoration: none; color: inherit;
  cursor: pointer;
  transform-style: preserve-3d;
}

.box-3d {
  position: relative;
  width: var(--box-w); height: var(--box-h);
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateY(calc(var(--box-tilt) * -1));
  transition: transform 0.55s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

/* ─── Shared face base ───────────────────────────────────────
   IMPORTANT: NO top/left/width/height here — every face
   sets its own so the side/top/bottom dimensions aren't
   overridden by a higher-specificity shared rule.
   ─────────────────────────────────────────────────────────── */
.box-3d .face {
  position: absolute;
  background: #0e0e10;
  backface-visibility: hidden;
}

/* ─── FRONT ─── full box face, pushed forward by depth/2 */
.face-front {
  top: 0; left: 0; width: 100%; height: 100%;
  transform: translateZ(calc(var(--box-depth) / 2));
  background: linear-gradient(180deg, #17171c 0%, #0a0a0c 100%);
  border: 1px solid #222;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -60px 80px rgba(0,0,0,0.4);
  padding: 28px 26px 26px;
  display: flex; flex-direction: column;
  color: #fff;
  overflow: hidden;
}

/* subtle grid texture on front */
.face-front::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(233,75,60,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,75,60,0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* diagonal blue stripe header */
.face-front::after {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 88px;
  background: linear-gradient(100deg, var(--blue) 0%, #2250d0 65%, #1a3fa0 100%);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
  pointer-events: none;
}

.box-brand {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.box-brand-logo {
  height: 28px; width: 28px;
  object-fit: contain;
  border-radius: 6px;
}
.box-brand-txt {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

.box-paket-tag {
  margin-left: auto;
  font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

.box-title {
  position: relative; z-index: 2;
  font-size: 32px; font-weight: 900;
  color: #fff; letter-spacing: -1.3px;
  line-height: 1.02;
  margin: 0 0 6px;
  text-wrap: balance;
}

.box-subtitle {
  position: relative; z-index: 2;
  font-size: 12px; font-weight: 600;
  color: var(--blue-light);
  letter-spacing: 0.4px;
  margin: 0 0 18px;
}

.box-divider {
  position: relative; z-index: 2;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  margin: 0 0 20px;
}

.box-bullets {
  position: relative; z-index: 2;
  list-style: none; padding: 0; margin: 0 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.box-bullets li {
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.82);
  line-height: 1.4;
  padding-left: 22px;
  position: relative;
}
.box-bullets li::before {
  content: ''; position: absolute;
  left: 0; top: 5px;
  width: 10px; height: 10px;
  background: var(--blue);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(233,75,60,0.5);
}

.box-price-wrap {
  position: relative; z-index: 2;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.box-price-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.box-price {
  font-size: 22px; font-weight: 900;
  color: #fff; letter-spacing: -0.8px;
  line-height: 1.15;
}
.box-price .unit { color: var(--blue-light); font-weight: 700; font-size: 14px; margin-left: 2px; }
.box-price-bonus {
  font-size: 11px; font-weight: 600;
  color: var(--blue-light);
  margin-top: 6px;
  letter-spacing: 0.2px;
}


/* ─── BACK ─── full box face, pushed back by depth/2 */
.face-back {
  top: 0; left: 0; width: 100%; height: 100%;
  transform: translateZ(calc(var(--box-depth) / -2)) rotateY(180deg);
  background: #050506;
}

/* ─── SIDE (right) ───────────────────────────────────────────
   depth-wide panel.
   Geometry: place it at x = box-width - depth, height = 100%.
   Its center is at x = box-width - depth/2.
   translateX(depth/2) → center is now at x = box-width.
   rotateY(90deg) → face rotates to be perpendicular to x-axis,
   spanning z = -depth/2 to z = +depth/2.
   Front edge (z = +depth/2) meets the front face's right edge. ✓
   ─────────────────────────────────────────────────────────── */
.face-side {
  top: 0;
  left: calc(100% - var(--box-depth));
  width: var(--box-depth);
  height: 100%;
  transform-origin: center center;
  transform: translateX(calc(var(--box-depth) / 2)) rotateY(90deg);
  background: linear-gradient(180deg, #0b0b0e 0%, #050506 100%);
  border-top: 1px solid #2a2a30;
  border-bottom: 1px solid #111;
  padding: 22px 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
}
.face-side .side-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.face-side .side-stripe {
  width: 60%; height: 3px;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(233,75,60,0.6);
}

/* ─── TOP ────────────────────────────────────────────────────
   depth-tall panel at the top edge.
   Geometry: top:0, height = depth. Center at y = depth/2.
   translateY(-depth/2) → center now at y = 0 (top edge of box).
   rotateX(90deg) → face rotates horizontal,
   spanning z = -depth/2 (back) to z = +depth/2 (front).
   Front edge meets the front face's top edge. ✓
   ─────────────────────────────────────────────────────────── */
.face-top {
  top: 0; left: 0;
  width: 100%;
  height: var(--box-depth);
  transform-origin: center center;
  transform: translateY(calc(var(--box-depth) / -2)) rotateX(90deg);
  background: linear-gradient(90deg, #0e0e12 0%, #1a1a22 50%, #0e0e12 100%);
  border-left: 1px solid #222;
  border-right: 1px solid #111;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
}
.face-top .bar {
  height: 2px; flex: 1; max-width: 40px;
  background: rgba(233,75,60,0.6);
  border-radius: 2px;
}
.face-top .bar.mid { background: rgba(255,255,255,0.25); }

/* ─── BOTTOM ─────────────────────────────────────────────────
   Mirrors the top: depth-tall panel at the bottom edge.
   Geometry: top = box-height - depth, height = depth.
   Center at y = box-height - depth/2.
   translateY(depth/2) → center at y = box-height (bottom edge).
   rotateX(-90deg) → face rotates horizontal downward. ✓
   ─────────────────────────────────────────────────────────── */
.face-bottom {
  top: calc(100% - var(--box-depth)); left: 0;
  width: 100%;
  height: var(--box-depth);
  transform-origin: center center;
  transform: translateY(calc(var(--box-depth) / 2)) rotateX(-90deg);
  background: linear-gradient(90deg, #050506 0%, #0b0b0e 50%, #050506 100%);
}

/* ─── Ground shadow ─── */
.box-shadow {
  position: absolute;
  left: 50%; bottom: -22px;
  width: 80%; height: 24px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.5), transparent 68%);
  transform: translateX(-50%) translateX(10px);
  filter: blur(5px);
  transition: all 0.55s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}

/* ─── HOVER: straighten + lift ─── */
.box-link:hover .box-3d {
  transform: perspective(1200px) rotateY(0deg) translateY(-16px) scale(1.03);
}
.box-link:hover .box-shadow {
  width: 78%;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(233,75,60,0.32), transparent 68%);
  filter: blur(10px);
  opacity: 0.9;
}

/* glow outline on hover */
.box-link:hover .face-front {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -60px 80px rgba(0,0,0,0.4),
    0 0 0 1px rgba(233,75,60,0.3),
    0 30px 80px rgba(233,75,60,0.15);
}

.box-cta-hint {
  position: relative; z-index: 2;
  margin-top: 14px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  display: flex; align-items: center; gap: 8px;
  transition: color 0.2s;
}
.box-cta-hint::after {
  content: '→';
  transition: transform 0.2s;
}
.box-link:hover .box-cta-hint { color: var(--blue-light); }
.box-link:hover .box-cta-hint::after { transform: translateX(4px); }

/* ─── Hover-mode variants (via body class) ─── */
body.hover-lift-only .box-link:hover .box-3d {
  transform: perspective(1200px) rotateY(calc(var(--box-tilt) * -1)) translateY(-20px) scale(1.03);
}
body.hover-straighten-only .box-link:hover .box-3d {
  transform: perspective(1200px) rotateY(0deg);
}

/* ─── Dark ratio variants — swaps section fill balance ─── */
body.dark-low .leistungen { background: #fff; }
body.dark-low .vorteile { background: var(--gray-light); }
body.dark-low .ueber { background: #0f0f12; }

body.dark-heavy .leistungen { background: #0a0a0c; }
body.dark-heavy .leistungen .bee-h2 { color: #fff; }
body.dark-heavy .leistungen .bee-h2 .accent { color: var(--blue-light); }
body.dark-heavy .leistungen .bee-sub { color: rgba(255,255,255,0.55); }
body.dark-heavy .leistungen .leistungen-footnote { color: rgba(255,255,255,0.5); }
body.dark-heavy .vorteile { background: #14141a; }
body.dark-heavy .vorteile .bee-h2 { color: #fff; }
body.dark-heavy .vorteile .bee-h2 .accent { color: var(--blue-light); }
body.dark-heavy .vorteile .bee-sub { color: rgba(255,255,255,0.55); }
body.dark-heavy .hex-filled {
  background: linear-gradient(160deg, var(--blue-light) 0%, var(--blue) 100%);
  filter: drop-shadow(0 8px 22px rgba(233,75,60,0.28));
}
body.dark-heavy .hex-filled::before {
  background:
    radial-gradient(ellipse 80% 80% at 30% 28%, rgba(40,52,80,0.95) 0%, rgba(20,28,46,0.95) 60%, rgba(14,20,36,0.95) 100%);
}
body.dark-heavy .hex-filled:hover {
  filter: drop-shadow(0 12px 32px rgba(233,75,60,0.45));
}
body.dark-heavy .hex-empty { background: rgba(255,255,255,0.025); }
body.dark-heavy .hex-title { color: #fff; }
body.dark-heavy .hex-text { color: rgba(255,255,255,0.58); }
body.dark-heavy .hex-marker { color: var(--blue-light); }
