/* Clover navbar */

:root {
  --nav-text: #EDE4D6;
  --nav-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.10) 100%);
  --nav-surface-open: rgba(40, 128, 222, 0.88);
  --nav-border: rgba(255, 255, 255, 0.32);
  --nav-shadow: 0 6px 24px rgba(10, 60, 140, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --font-brand: "Alike", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--nav-border);
  border-radius: 999px;
  background: var(--nav-surface);
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  font-family: var(--font-ui);
  color: var(--nav-text);
  isolation: isolate;
  transition: max-width 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Solid brand-blue layer that fades in once the nav leaves the hero */
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(20, 146, 216, 0.88) 0%, rgba(0, 120, 192, 0.88) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.site-header {
  transition: top 0.35s ease;
}

.site-header.is-scrolled {
  top: 10px;
}

.site-header.is-scrolled .navbar {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 30px rgba(0, 60, 110, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.site-header.is-scrolled .navbar::before {
  opacity: 1;
}

/* Brand */
.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nav-text);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar__logo {
  display: block;
  width: auto;
  height: 28px;
}

.navbar__name {
  font-family: var(--font-brand);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* Links */
.navbar__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar__links a {
  display: block;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--nav-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.88;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.navbar__links a:hover,
.navbar__links a:focus-visible {
  opacity: 1;
  background: rgba(237, 228, 214, 0.12);
}

/* Actions */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.navbar__cta {
  padding: 9px 18px;
  font-size: 13px;
}

/* Dark liquid-glass button, shared by every Book a demo CTA */
.btn-glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(44, 46, 50, 0.86) 0%, rgba(6, 6, 8, 0.94) 100%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -1px 1px rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(6, 20, 45, 0.28);
  color: var(--nav-text);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* glossy upper highlight */
.btn-glass::before {
  content: "";
  position: absolute;
  inset: 1px 6px 52% 6px;
  z-index: -1;
  border-radius: 999px 999px 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* light sheen that sweeps across on hover */
.btn-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.btn-glass:hover,
.btn-glass:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 1px rgba(255, 255, 255, 0.10),
    0 10px 24px rgba(6, 20, 45, 0.34);
}

.btn-glass:hover::after,
.btn-glass:focus-visible::after {
  transform: translateX(120%);
}

.btn-glass:active {
  transform: translateY(0);
}

.navbar a:focus-visible,
.navbar__toggle:focus-visible {
  outline: 2px solid var(--nav-text);
  outline-offset: 2px;
}

/* Menu toggle (shown on smaller screens) */
.navbar__toggle {
  display: none;
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.navbar__toggle span {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--nav-text);
  transition: transform 0.2s ease;
}

.navbar__toggle span:first-child { top: 13px; }
.navbar__toggle span:last-child  { top: 19px; }

.navbar.is-open .navbar__toggle span:first-child { transform: translateY(3px) rotate(45deg); }
.navbar.is-open .navbar__toggle span:last-child  { transform: translateY(-3px) rotate(-45deg); }

/* Mobile: collapse links into a dropdown */
@media (max-width: 600px) {
  .site-header {
    top: 12px;
  }

  .navbar {
    max-width: 420px;
  }

  .navbar__toggle {
    display: block;
  }

  .navbar__links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--nav-border);
    border-radius: 18px;
    background: var(--nav-surface-open);
    box-shadow: var(--nav-shadow);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .navbar.is-open .navbar__links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .navbar__links a {
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .navbar__name {
    font-size: 18px;
  }

  .navbar__cta {
    padding: 8px 13px;
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .navbar *,
  .navbar__links,
  .navbar::before,
  .site-header,
  .btn-glass,
  .btn-glass::after {
    transition: none !important;
  }
}
