/* --- Funnel Display font --- */
@font-face {
  font-family: 'Funnel Display';
  src: url('funnel-display/400Regular/FunnelDisplay_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Funnel Display';
  src: url('funnel-display/600SemiBold/FunnelDisplay_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Funnel Display';
  src: url('funnel-display/700Bold/FunnelDisplay_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Entrance animations --- */
@keyframes nav-enter {
  from { transform: translateY(-110%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes toggle-enter {
  from { transform: translateX(-50%) translateY(-12px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);     opacity: 1; }
}

@keyframes content-enter {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}


@keyframes nav-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

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

html {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: 'Funnel Display', system-ui, -apple-system, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  position: relative;
}

/* --- Blurry bottom circle --- */
@keyframes bg-circle-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

.bg-circle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.2;
  filter: blur(60px);
  z-index: 0;
  animation: bg-circle-pulse 5s ease-in-out infinite;
}

.bg-circle-bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(80%);
  width: min(120vmin, 700px);
  height: min(50vmin, 450px);
}

/* --- Fixed nav bar --- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: #040404;
  padding: 0.4rem 1.5rem;
  min-height: 50px;
  box-sizing: border-box;
  border-radius: 0 0 40px 40px;
  margin: 0 1rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  animation: nav-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-bar--hidden {
  max-width: 180px;
  padding: 0.5rem 1rem;
  min-height: 44px;
}

.nav-bar--hidden .nav-bar-inner {
  justify-content: center;
}

.nav-bar--hidden .nav-spacer {
  display: none;
}

.nav-bar--hidden .nav-btn {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-bar--hidden .nav-logo img {
  height: 26px;
}

.nav-bar--shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 65%
  );
  pointer-events: none;
  animation: nav-shimmer 0.6s 0.2s ease-out both;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
}

.nav-logo img {
  display: block;
  height: 33px;
  width: auto;
  object-fit: contain;
  transition: height 0.2s ease;
}

.nav-spacer {
  flex: 1;
  min-width: 0.5rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border-radius: 80px;
  font-family: 'Funnel Display', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0s;
}

.nav-btn:hover {
  opacity: 0.9;
}

.nav-btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.nav-btn-primary {
  background: #E9EF19;
  color: #000;
  border: none;
}

/* Hamburger and mobile menu: hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  position: relative;
  z-index: 101;
}

.nav-hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.nav-hamburger.is-open .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open .nav-hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-open .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu-mobile {
  display: none;
}

/* --- Screen toggle: fixed pill directly below the nav --- */
.screen-toggle {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.3rem;
  background: #e8e8e8;
  border-radius: 80px;
  width: auto;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: toggle-enter 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen-toggle-indicator {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  left: 0;
  width: 0;
  background: #fff;
  border-radius: 80px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.screen-toggle-btn {
  flex: 1 1 0%;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 80px;
  text-align: center;
  font-family: 'Funnel Display', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  background: transparent;
  cursor: pointer;
  transition: color 0.25s ease;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.screen-toggle-btn:hover {
  color: #1a1a1a;
}

.screen-toggle-btn.is-active {
  color: #1a1a1a;
}

/* Toggle hidden state (scale down + fade) */
.screen-toggle--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) scale(0.7);
}

/* --- Screens: no padding so scroll-area starts at 0; toggle/nav are fixed so first scroll drives animation --- */
.screens {
  padding-top: 0;
  position: relative;
}

.screen {
  display: none;
  content-visibility: auto;
}

.screen.is-active {
  display: block;
}

.screen-exit {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.screen-enter {
  opacity: 0;
  transform: scale(0.97);
  animation: screen-fade-in 0.3s ease forwards;
}

@keyframes screen-fade-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* --- Scroll area --- */
.scroll-area {
  position: relative;
  z-index: 1;
}

.scroll-content {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}

/* --- Desktop only: vertical centering happens in content-layer; mobile-text-slot is not used (display: contents) --- */
@media (min-width: 901px) {
  .content-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 115px 2rem 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    transition: opacity 0.2s ease;
  }

  .mobile-text-slot {
    display: contents;
  }

  .col {
    display: flex;
    align-items: center;
    min-height: 0;
  }

  .col-left {
    order: 0;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    padding-right: 0;
    margin-right: -1.25rem;
  }

  .col-center {
    order: 1;
    flex: 0 0 auto;
    width: clamp(280px, 40%, 520px);
    justify-content: center;
    align-items: center;
  }

  .col-right {
    order: 2;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
    padding-left: 0;
    margin-left: -1.25rem;
    position: relative;
  }
}

/* --- Columns (base; desktop flex/order above, mobile overrides in @media max-width) --- */
.col {
  display: flex;
  align-items: center;
  min-height: 0;
}

/* --- Scroll-end CTA --- */
.scroll-end-cta {
  position: absolute;
  top: 50%;
  left: 0;
  padding-left: 20px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-end-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-end-cta-link {
  display: block;
  line-height: 0;
}

.scroll-end-cta img {
  display: block;
  height: 180px;
  width: auto;
  object-fit: contain;
}

/* Enterprise end CTA: black button after last section fades (desktop: centered in right column; mobile: centered below) */
.enterprise-end-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.enterprise-end-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.enterprise-end-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  background: #040404;
  color: #fff;
  font-family: 'Funnel Display', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 80px;
  border: none;
  transition: opacity 0.2s;
}

.enterprise-end-cta-link:hover {
  opacity: 0.9;
}

/* --- Center frame display --- */
@keyframes frame-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

.frame-display {
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  transition: transform 0.2s ease-out;
  animation: content-enter 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.frame-display.is-floating {
  animation: content-enter 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both,
             frame-float 3.5s 1.1s ease-in-out infinite;
}

.frame-display canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Progress dots --- */
.progress-dots {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.progress-dots--hidden {
  display: none;
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s ease;
  display: block;
}

.progress-dot.is-active {
  background: #1a1a1a;
}

@media (max-width: 900px) {
  .progress-dots {
    flex-direction: row;
    top: auto;
    right: auto;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* --- Text blocks --- */
.text-blocks {
  position: relative;
  width: 100%;
  max-width: 320px;
  min-height: 160px;
  height: 160px;
  display: flex;
  align-items: center;
}

.col-left .text-blocks {
  max-width: 400px;
}

.text-block {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(calc(-50% + 18px));
  padding: 1rem 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.text-block.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}

.text-block .block-title {
  font-family: 'Funnel Display', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: #838383;
}

.text-block .block-body {
  font-family: 'Funnel Display', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  color: #1a1a1a;
}

.col-right .text-blocks .text-block {
  left: 0;
  right: auto;
}

.col-left .text-blocks .text-block {
  left: auto;
  right: 0;
}

/* --- Hover-to-expand on desktop (nav bar + toggle, linked via JS .hover-expand class) --- */
.nav-bar--hidden.hover-expand {
  max-width: 540px;
  padding: 0.4rem 1.5rem;
  min-height: 50px;
}

.nav-bar--hidden.hover-expand .nav-bar-inner {
  justify-content: flex-start;
}

.nav-bar--hidden.hover-expand .nav-spacer {
  display: block;
}

.nav-bar--hidden.hover-expand .nav-btn {
  position: static;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.15s ease 0.15s;
}

.nav-bar--hidden.hover-expand .nav-logo img {
  height: 33px;
}

/* --- Mobile logo (hidden on desktop) --- */
.mobile-logo {
  display: none;
}

/* --- Responsive (mobile) --- */
@media (max-width: 900px) {
  .bg-circle {
    animation: none;
    opacity: 0.3;
  }

  body {
    overflow-x: clip;
    max-width: 100vw;
  }

  .nav-bar {
    display: none;
  }

  .nav-menu-mobile {
    display: none !important;
  }

  .mobile-logo {
    display: block;
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
  }

  .mobile-logo img {
    display: block;
    height: 32.5px;
    width: auto;
    filter: brightness(0);
  }

  .screen-toggle {
    top: 56px;
  }

  .scroll-area {
    position: relative;
    z-index: 1;
  }

  .scroll-content {
    padding-top: 0;
    box-sizing: border-box;
  }

  .content-layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    flex: none;
    min-height: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: none;
    padding: 80px 1.25rem 110px;
  }

  .content-layer::before {
    content: none;
  }

  .mobile-text-slot {
    flex: 0 0 auto;
    min-height: 140px;
    height: auto;
    position: relative;
    z-index: 1;
    order: 0;
  }

  .content-layer::after {
    content: none;
  }

  .col-center {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    flex: 0 0 auto;
    min-height: 200px;
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    margin-top: -0.75rem;
  }

  .frame-display {
    max-width: 240px;
    will-change: transform;
  }

  .mobile-text-slot .col-left,
  .mobile-text-slot .col-right {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
  }

  .mobile-text-slot .col-left {
    grid-column: unset;
    grid-row: unset;
  }

  .mobile-text-slot .col-right {
    grid-column: unset;
    grid-row: unset;
  }

  .mobile-text-slot .col-left .text-blocks,
  .mobile-text-slot .col-right .text-blocks {
    max-width: 85% !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    height: auto;
    justify-content: center;
    align-items: center;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }

  .mobile-text-slot .col-left .text-blocks .text-block,
  .mobile-text-slot .col-right .text-blocks .text-block {
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }

  .text-block .block-body {
    font-size: 1.35rem;
  }

  #scroll-end-cta {
    left: 50%;
    right: auto;
    padding-left: 0;
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
  }

  #scroll-end-cta img {
    height: 140px;
  }

  .enterprise-end-cta {
    left: 50%;
    right: auto;
    bottom: 0;
    top: auto;
    transform: translateX(-50%);
  }

}
