/* Chilview nav — one pill, one lamp. Supersedes the nav rules in iw-home.css. */

.cv-head {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 20px 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.cv-pill {
  position: relative;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 8px 6px 8px;
  background: #f6f4f0;
  border: 1px solid rgba(96, 17, 35, 0.22);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(96, 17, 35, 0.12);
  pointer-events: auto;
}

.cv-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 12px 0 8px;
  color: #601123;
  font-family: Inter, "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.cv-brand img {
  display: block;
  width: 22px;
  height: 22px;
}

.cv-links,
.cv-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
}

.cv-links > a,
.cv-scroll > a,
.cv-item > button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #601123;
  opacity: 1;
  font-family: Inter, "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.cv-links > a.cv-trial,
.cv-pill > a.cv-trial {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-left: 4px;
  padding: 0 16px;
  border-radius: 999px;
  background: #601123;
  color: #f6f4f0;
  font-family: Inter, "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.cv-links > a.cv-trial:hover,
.cv-pill > a.cv-trial:hover {
  background: #4c0e1c;
  color: #f6f4f0;
  box-shadow: 0 6px 14px rgba(96, 17, 35, 0.18);
}

.cv-item {
  position: relative;
  z-index: 2;
}

.cv-card {
  position: absolute;
  top: calc(100% + 17px);
  left: 0;
  min-width: 220px;
  padding: 6px;
  background: #f6f4f0;
  border: 1px solid rgba(96, 17, 35, 0.18);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(96, 17, 35, 0.12);
  visibility: hidden;
  pointer-events: none;
}

.cv-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.cv-item.is-open .cv-card {
  visibility: visible;
  pointer-events: auto;
}

.cv-card a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: #601123;
  font-family: Inter, "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.cv-card a:hover {
  background: #ddd2bf;
  color: #601123;
}

.cv-lamp {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  height: 100%;
  pointer-events: none;
  transition: transform 450ms ease, width 450ms ease;
}

.cv-lamp__pool {
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 6px;
  left: 0;
  border-radius: 999px;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, #fff7e6 0%, #ddd2bf 72%);
}

.cv-lamp__shade {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  width: 60%;
  max-width: 44px;
  height: 12px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(#fff7e6, #e8d9be);
  box-shadow: 0 0 0 1px rgba(96, 17, 35, 0.35);
  transform: translateX(-50%);
}

.cv-lamp__halo {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 10px);
  width: 48px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 247, 230, 0.9) 0%, rgba(255, 247, 230, 0) 70%);
  opacity: 0.25;
  transform: translateX(-50%);
}

.cv-mobile {
  display: none;
}

@media (max-width: 979px) {
  .cv-head {
    position: relative;
    padding: 14px 16px 0;
  }

  .cv-head .cv-pill {
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .cv-head .cv-links {
    display: none;
  }

  .cv-mobile {
    display: block;
    position: fixed;
    z-index: 40;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .cv-mobile .cv-pill {
    width: 100%;
    margin: 0;
    padding: 8px 6px 6px;
  }

  .cv-scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .cv-scroll::-webkit-scrollbar {
    display: none;
  }

  .cv-mobile .cv-card {
    top: auto;
    bottom: calc(100% + 15px);
  }

  .cv-mobile .cv-card::before {
    top: auto;
    bottom: -16px;
  }

  .cv-scroll > a,
  .cv-item > button,
  .cv-pill > a.cv-trial {
    min-height: 44px;
    height: 44px;
  }

  body {
    padding-bottom: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cv-lamp,
  .cv-trial {
    transition: none;
  }
}
