@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@300;400;500;700;900&display=swap');

/* --- Reset & Base Settings --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  background-color: #ffffff;
  color: #121212;
  font-family: 'Inter', sans-serif;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide scrollbar for Chrome, Safari, Opera */
::-webkit-scrollbar {
  display: none;
}

body {
  height: 1400vh; /* 14x viewport height for scroll track */
  position: relative;
}

/* --- Loader Overlay --- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.loader-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  width: 100%;
  max-width: 320px;
  padding: 0 24px;
  text-align: center;
}

.loader-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  letter-spacing: 0.15em;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: #121212;
}

.loader-track {
  height: 2px;
  width: 100%;
  background-color: rgba(18, 18, 18, 0.1);
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.loader-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0%;
  background-color: #121212;
  transition: width 0.15s ease-out;
}

.loader-percent {
  font-size: 12px;
  font-family: monospace;
  color: rgba(18, 18, 18, 0.6);
}

/* --- Navigation --- */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  letter-spacing: 0.25em;
  font-size: 14px;
  color: #121212;
  pointer-events: auto;
  user-select: none;
}

.nav-button {
  background-color: #ffffff;
  color: #121212;
  border: 1px solid rgba(18, 18, 18, 0.1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-button:hover {
  transform: scale(1.05);
  border-color: #121212;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* --- Canvas container --- */
.canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
  user-select: none;
}

#airfryer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Background overlays --- */
.studio-lighting {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  mix-blend-mode: multiply;
  background: radial-gradient(ellipse at bottom, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0) 70%);
}

.mobile-contrast {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 50vh;
  z-index: 18;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0) 100%);
}

/* --- Text overlays --- */
.text-overlays-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 20;
  pointer-events: none;
  user-select: none;
}

.overlay-section {
  position: absolute;
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  transition: opacity 0.1s linear, transform 0.1s linear; /* Smoothly matches direct rendering updates */
}

/* Alignments on Desktop */
.left-align {
  top: 32%;
  left: 6%;
  text-align: left;
  align-items: flex-start;
}

.right-align {
  top: 32%;
  right: 6%;
  text-align: right;
  align-items: flex-end;
}

.cta-section {
  bottom: 8%;
  left: 6%;
  max-width: 500px;
  text-align: left;
  align-items: flex-start;
}

/* Typography styles */
.heading-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.88;
  font-size: 40px;
  margin-bottom: 24px;
  color: #121212;
}

.heading-subtitle {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  opacity: 0.8;
  color: #121212;
}

.cta-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, 0.5);
  margin-bottom: 12px;
}

.cta-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.88;
  font-size: 40px;
  margin-bottom: 24px;
  color: #121212;
}

.cta-button {
  background-color: #121212;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  pointer-events: auto; /* Clickable button inside transparent wrapper */
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover {
  transform: scale(1.03);
  background-color: #000000;
}

/* --- Scroll progress indicator --- */
.scroll-indicator {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  pointer-events: none;
  user-select: none;
}

.scroll-label {
  color: rgba(18, 18, 18, 0.4);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-90deg) translateY(-10px);
  transform-origin: bottom;
  transition: opacity 0.3s ease;
}

.scroll-track {
  width: 2px;
  height: 120px;
  background-color: rgba(18, 18, 18, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.scroll-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  background-color: #121212;
  border-radius: 9999px;
}

/* --- Responsive Media Queries --- */

@media (min-width: 640px) {
  .heading-title {
    font-size: 52px;
  }
  .heading-subtitle {
    font-size: 16px;
  }
  .cta-title {
    font-size: 52px;
  }
  .cta-button {
    font-size: 14px;
  }
  .nav-button {
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  .heading-title {
    font-size: 64px;
  }
  .heading-subtitle {
    font-size: 18px;
  }
  .cta-title {
    font-size: 64px;
  }
}

@media (min-width: 1024px) {
  .heading-title {
    font-size: 72px;
  }
  .cta-title {
    font-size: 72px;
  }
}

/* Mobile Portrait specific overrides (< 768px) */
@media (max-width: 767px) {
  .mobile-contrast {
    display: block;
  }
  .scroll-indicator {
    display: none; /* Hide progress indicator on mobile */
  }
  .overlay-section {
    top: 110px !important;
    left: 24px !important;
    right: 24px !important;
    bottom: auto !important;
    max-width: none !important;
    text-align: center !important;
    align-items: center !important;
  }
  .cta-section {
    top: auto !important;
    bottom: 10% !important;
    left: 24px !important;
    right: 24px !important;
  }
}
