/* ════════════════════════════════════════
   BASE & RESET — Supercar Legends
   ════════════════════════════════════════ */

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;
}
html::-webkit-scrollbar { display: none; width: 0; height: 0; }
body::-webkit-scrollbar { display: none; }
*::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23DC143C' stroke='%23000000' stroke-width='3'/%3E%3C/svg%3E") 12 12, auto;
}

a {
  color: inherit; text-decoration: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='10' fill='%23FF2D55' stroke='%23000000' stroke-width='3'/%3E%3Ccircle cx='14' cy='14' r='4' fill='%23000000'/%3E%3C/svg%3E") 14 14, pointer;
}

button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='10' fill='%23FF2D55' stroke='%23000000' stroke-width='3'/%3E%3Ccircle cx='14' cy='14' r='4' fill='%23000000'/%3E%3C/svg%3E") 14 14, pointer;
  font-family: var(--font-body); border: none; outline: none; background: none;
}

img { max-width: 100%; display: block; }

#maze-canvas {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
}

section, footer { position: relative; z-index: 1; }

.section-container {
  max-width: var(--container-max); margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}
.section-header { text-align: center; margin-bottom: var(--space-xl); }
.section-tag {
  font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 6px;
  color: var(--grey-light); text-transform: uppercase; display: block;
  margin-bottom: var(--space-md);
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 6rem);
  letter-spacing: 8px; line-height: 1; margin-bottom: var(--space-sm);
  color: var(--white);
}
.title-underline { width: 80px; height: 3px; margin: var(--space-md) auto; border-radius: 2px; }
.ferrari-line  { background: var(--ferrari-primary); box-shadow: 0 0 20px var(--ferrari-glow); }
.porsche-line  { background: var(--porsche-primary); box-shadow: 0 0 20px var(--porsche-glow); }
.center-line   { background: linear-gradient(90deg, var(--ferrari-primary), var(--porsche-primary)); }
.section-desc {
  font-size: 1.1rem; color: var(--grey-light); max-width: 600px;
  margin: var(--space-lg) auto 0; font-weight: 300;
}

/* ── Reveals ── */
.reveal-text, .reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
}
.reveal-text  { transform: translateY(30px); }
.reveal-up    { transform: translateY(60px); }
.reveal-left  { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-text.visible, .reveal-up.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1; transform: translate(0);
}

.ferrari-text { color: var(--ferrari-primary); }
.porsche-text { color: var(--porsche-primary); }

::selection { background: var(--ferrari-primary); color: var(--white-pure); }
::-moz-selection { background: var(--ferrari-primary); color: var(--white-pure); }
:focus-visible { outline: 2px solid var(--ferrari-primary); outline-offset: 4px; }
.porsche-page ::selection { background: var(--porsche-primary); color: var(--black); }
.porsche-page :focus-visible { outline-color: var(--porsche-primary); }

/* ════════════════════════════════════════
   FLOATING HOLO-BAR (Non-homepage pages)
   ════════════════════════════════════════ */
.holo-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 40px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--holo-blur-heavy));
  -webkit-backdrop-filter: blur(var(--holo-blur-heavy));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 60px rgba(220, 20, 60, 0.05);
}

.holo-bar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
}
.holo-bar-item svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s;
}
.holo-bar-item:hover {
  background: rgba(220, 20, 60, 0.1);
  border-color: rgba(220, 20, 60, 0.3);
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.2);
  transform: translateY(-2px);
}
.holo-bar-item:hover svg {
  color: var(--ferrari-primary);
  filter: drop-shadow(0 0 6px var(--ferrari-glow));
}

/* Tooltip */
.holo-bar-item::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 52px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.45rem;
  letter-spacing: 2px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--white);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s var(--ease-out-expo);
  pointer-events: none;
}
.holo-bar-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Active state */
.holo-bar-item.bar-active {
  background: rgba(220, 20, 60, 0.12);
  border-color: rgba(220, 20, 60, 0.25);
}
.holo-bar-item.bar-active svg {
  color: var(--ferrari-primary);
}

/* Porsche page override */
.porsche-page .holo-bar-item:hover {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.3);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.2);
}
.porsche-page .holo-bar-item:hover svg {
  color: var(--porsche-primary);
  filter: drop-shadow(0 0 6px var(--porsche-glow));
}
.porsche-page .holo-bar-item.bar-active {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.25);
}
.porsche-page .holo-bar-item.bar-active svg {
  color: var(--porsche-primary);
}

/* Divider */
.holo-bar-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
}

/* Holo-bar refraction shimmer */
.holo-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(220, 20, 60, 0.04) 25%,
    rgba(100, 200, 255, 0.03) 50%,
    rgba(201, 168, 76, 0.04) 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: holoShimmer 6s linear infinite;
  pointer-events: none;
  border-radius: 40px;
}

@media (max-width: 600px) {
  .holo-bar {
    bottom: 12px;
    padding: 4px;
    gap: 2px;
  }
  .holo-bar-item {
    width: 38px;
    height: 38px;
  }
  .holo-bar-item svg {
    width: 15px;
    height: 15px;
  }
  .holo-bar-item::after { display: none; }
  .holo-bar-divider { height: 18px; }
}