/* ─── Navigation — exact Figma match ─── */
/* Figma: 1919×144px, inner content at y:50, padding 50px L/R */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 144px;
  display: flex;
  align-items: center;
  padding: 0 50px;
  transition: transform 0.5s cubic-bezier(0.7, 0.05, 0.13, 1),
              height 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              top 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              left 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              right 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              padding 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              border-radius 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              background 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              border-color 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
  border: 1px solid transparent;
}

/* ─── Scroll down: hide nav ─── */
.nav.is-hidden {
  transform: translateY(-120%);
}

/* Glass nav starts at top:20px — needs extra offset to fully clear viewport */
.nav.is-glass.is-hidden {
  transform: translateY(calc(-100% - 30px));
}

/* ─── Scroll up (not at top): floating glass pill ─── */
.nav.is-glass {
  top: 20px;
  left: max(16px, calc(50% - 575px));
  right: max(16px, calc(50% - 575px));
  height: 64px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Scale down logo */
.nav.is-glass .nav__logo svg {
  width: 100px;
  height: auto;
}

/* Scale down desc text */
.nav.is-glass .nav__desc span,
.nav.is-glass .nav__info span {
  font-size: 11px;
}

/* Scale down CTA */
.nav.is-glass .nav__cta-btn {
  width: 120px;
  height: 36px;
  padding: 8px 14px;
}

.nav.is-glass .nav__cta-btn span {
  font-size: 11px;
}

.nav.is-glass .nav__cta-overlay {
  width: 36px;
  height: 36px;
}

.nav.is-glass .nav__cta-overlay svg {
  width: 14px;
  height: 14px;
}

/* ─── Inner layout ─── */
.nav__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

/* ─── Logo ─── */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.nav__logo svg {
  transition: width 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              height 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ─── Center description ─── */
.nav__desc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav__desc span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-white);
  line-height: 1;
  white-space: nowrap;
  transition: font-size 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
}

/* ─── Right info ─── */
.nav__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.nav__info span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-white);
  line-height: 1;
  white-space: nowrap;
  transition: font-size 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
}

/* ─── CTA Group ─── */
.nav__cta-group {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

/* White pill button */
.nav__cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 151px;
  height: 44px;
  background: var(--color-white);
  padding: 11px 17px;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: width  0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              height 0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              padding 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
}

.nav__cta-btn span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-black);
  white-space: nowrap;
  position: relative;
  z-index: 1;
  transition: color 0.3s var(--ease-out),
              font-size 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
}

.nav__cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-black);
  transform: translateY(101%);
  transition: transform 0.35s var(--ease-out);
}

.nav__cta-btn:hover::before { transform: translateY(0); }
.nav__cta-btn:hover span { color: var(--color-white); }

/* Square overlay button */
.nav__cta-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  text-decoration: none;
  transition: background 0.3s var(--ease-out),
              width  0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              height 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
  flex-shrink: 0;
}

.nav__cta-overlay:hover { background: rgba(255, 255, 255, 0.35); }

.nav__cta-overlay svg {
  width: 18px;
  height: 18px;
  transition: width  0.45s cubic-bezier(0.7, 0.05, 0.13, 1),
              height 0.45s cubic-bezier(0.7, 0.05, 0.13, 1);
}

/* ─── Responsive ─── */
@media (max-width: 1280px) {
  .nav__desc { display: none; }
}

@media (max-width: 1024px) {
  .nav { height: 80px; padding: 0 30px; }
  .nav__info { display: none; }
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav__cta-btn { width: auto; padding: 11px 20px; }
  .nav__cta-overlay { display: none; }
}
