/* --- Reset & base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pixelify Sans", system-ui, sans-serif;
  background: #ffffff;
  color: #111111;
  overflow-x: hidden;
}

/* --- Canvas (background) --- */
#canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

#animation-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#model-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: floatUpDown 6s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

model-viewer {
  background-color: transparent !important;
  --poster-color: transparent;
}

#honk-model-color,
#honk-model-white {
  position: absolute;
  width: min(70vw, 520px);
  height: min(70vh, 520px);
  pointer-events: none;
  filter: drop-shadow(0 24px 40px rgba(255, 255, 255, 0));
}

#honk-model-white {
  filter: saturate(0) brightness(1.6)
    drop-shadow(0 24px 40px rgba(255, 255, 255, 0.65));
  clip-path: inset(0 0 var(--reveal-clip, 0%) 0);
  transition: clip-path 0.2s linear;
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(10px);
  }
  50% {
    transform: translateY(-10px);
  }
}

#model-wrap.visible {
  opacity: 1;
}

/* --- Floating pill topbar --- */
.topbar {
  position: sticky;
  top: 1.5rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.topbar-nav a {
  color: #111111;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.topbar-nav a:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #000;
}

.topbar-nav a.active {
  background: #111111;
  color: #ffffff;
}

/* --- Sections --- */
.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

.slide {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.slide--active {
  opacity: 1;
  pointer-events: auto;
}

#personalized.slide {
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  padding: 3rem 1.5rem 4rem;
}

#features.slide {
  justify-content: center;       /* vertical center */
  align-items: flex-end;         /* push content to right edge */
  text-align: right;
  padding: 4rem 2rem;            /* small inset from right */
}

#features {
  max-width: none;
  width: 100%;
}

#features .feature-list {
  margin-left: auto;             /* push list toward right */
  text-align: right;
}

#hill.slide {
  justify-content: flex-end;   /* near bottom */
  align-items: center;         /* centered horizontally */
  text-align: center;
  padding: 0 1.5rem 5rem;      /* space below model */
}

#hill {
  max-width: none;
  width: 100%;
}

.perfect-for-section.slide {
  justify-content: flex-end;   /* same vertical position as hill */
  align-items: center;         /* centered horizontally */
  text-align: center;
  padding: 0 1.5rem 5rem;
}

.perfect-for-section {
  max-width: none;
  width: 100%;
}

#about.slide {
  justify-content: flex-end;   /* bottom */
  align-items: flex-end;       /* right */
  text-align: right;
  padding: 0 2rem 3rem;        /* slightly closer to bottom-right */
}

#about {
  max-width: none;
  width: 100%;
}

#contact.slide {
  justify-content: center;     /* vertical center */
  align-items: flex-start;     /* left edge */
  text-align: left;
  padding: 4rem 0 4rem 2rem;   /* inset from left edge */
}

.hero {
  padding-top: 0;
  padding-bottom: 0;
  min-height: calc(100vh - 6rem);
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  margin: 0 0 1.5rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: #111111;
  border: 1px solid #111111;
  border-radius: 10px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.download-btn:hover {
  background: #000000;
  border-color: #000000;
  transform: translateY(-1px);
}

.tagline {
  font-size: 1.15rem;
  opacity: 0.85;
  margin: 0 0 0.75rem;
  max-width: 36rem;
}

.hero-sub {
  font-size: 1rem;
  opacity: 0.85;
  margin: 0 0 0.5rem;
  max-width: 36rem;
  line-height: 1.6;
}

.hero-sub:last-of-type {
  margin-bottom: 0;
}

.spacer {
  min-height: 80vh;
  padding: 2rem;
}

.animation-section,
.content {
  max-width: 42rem;
}

.animation-section h2,
.content h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin: 0 0 1rem;
}

.animation-section p,
.content p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
  opacity: 0.9;
}

.content p:last-child {
  margin-bottom: 0;
}

.feature-list,
.perfect-for-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 38rem;
  text-align: left;
}

.feature-list li {
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  line-height: 1.5;
  opacity: 0.95;
}

.feature-list li:last-child {
  margin-bottom: 0;
}

.perfect-for-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

.perfect-for-list li {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.95;
}

/* --- Legal pages (standalone) --- */
.static-page .topbar {
  margin-bottom: 0;
}

.legal-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  text-align: left;
}

.legal-inner {
  max-width: 42rem;
  width: 100%;
}

.legal-inner h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.5rem;
}

.legal-inner h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.4rem;
}

.legal-updated {
  font-size: 0.9rem;
  opacity: 0.65;
  margin: 0 0 1.5rem;
}

.legal-inner p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
  opacity: 0.9;
}

.legal-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.legal-back:hover {
  color: #fff;
}

/* --- Footer --- */
.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.footer-inner p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.footer-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: #111111;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer-btn:hover {
  background: rgba(15, 23, 42, 0.14);
  border-color: rgba(15, 23, 42, 0.35);
  color: #000000;
}

/* --- Loading --- */
.loading {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-bar {
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.loading-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--load-progress, 0%);
  background: #fff;
  border-radius: 2px;
  transition: width 0.2s ease;
}

.loading-text {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .topbar-nav {
    padding: 0.4rem 0.75rem;
  }

  .topbar-nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }

  .section {
    padding: 3rem 1rem;
  }
}
