/* Ambient grid lives in motion.css (subscription.html port). */

/* —— Header (sticky floating island) —— */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 0;
  pointer-events: none;
}

#site-header > * {
  pointer-events: auto;
}

.site-header {
  position: relative;
  width: min(100%, 1120px);
  margin: 0 auto;
  border: none;
  background: transparent;
  height: auto;
}

.header-island {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.75rem;
  width: 100%;
  padding: 0.4rem 0.5rem 0.4rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(8, 8, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 10px 40px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="light"] .header-island {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow:
    0 12px 36px -14px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  justify-self: center;
  grid-column: 2;
}

.brand-mark {
  width: var(--icon-badge-primary);
  height: var(--icon-badge-primary);
  display: grid;
  place-items: center;
  border-radius: var(--radius-curvy);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #818cf8;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 0 14px -2px rgba(99, 102, 241, 0.3);
}

.brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-heading);
}

@media (max-width: 1100px) {
  .brand-name {
    display: none;
  }
}

[data-theme="light"] .brand-mark {
  background: #4f46e5;
  border-color: #4338ca;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(67, 56, 202, 0.28);
}

/* Sliding pill nav — left-aligned, circular rail with · separators */
.nav-desktop {
  display: none;
  justify-self: start;
  grid-column: 1;
  min-width: 0;
}

.nav-rail {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(9, 9, 11, 0.85);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

[data-theme="light"] .nav-rail {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.nav-rail-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85rem;
  flex-shrink: 0;
  color: var(--text-subtle);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
}

/* Sliding pill — color set per active item; rainbow glow behind */
.nav-rail-indicator {
  --nav-pill: #6366f1;
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 0;
  border-radius: 999px;
  background: var(--nav-pill);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--nav-pill) 50%, #fff 12%),
    0 2px 12px color-mix(in srgb, var(--nav-pill) 55%, transparent),
    0 0 18px -1px color-mix(in srgb, var(--nav-pill) 50%, transparent),
    0 0 10px 1px rgba(56, 189, 248, 0.35),
    0 0 16px 2px rgba(168, 85, 247, 0.28),
    0 0 22px 3px rgba(244, 114, 182, 0.2);
  transition:
    left 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.45s ease,
    box-shadow 0.45s ease;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.nav-rail-indicator::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: linear-gradient(
    120deg,
    #38bdf8,
    #6366f1,
    #a855f7,
    #f472b6,
    #f59e0b,
    #34d399,
    #38bdf8
  );
  background-size: 220% 220%;
  opacity: 0.55;
  filter: blur(5px);
  z-index: -1;
  animation: navRainbowShift 3.5s linear infinite;
  pointer-events: none;
}

.nav-rail-indicator.is-hidden {
  box-shadow: none;
}

.nav-rail-indicator.is-hidden::before {
  opacity: 0;
}

@keyframes navRainbowShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.nav-rail-link {
  --nav-item: #a1a1aa;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease;
  background: transparent;
}

.nav-rail-link[data-nav="home"] { --nav-item: #a78bfa; }
.nav-rail-link[data-nav="blog"] { --nav-item: #f472b6; }
.nav-rail-link[data-nav="pricing"] { --nav-item: #f59e0b; }

.nav-rail-link:hover {
  color: var(--nav-item);
}

.nav-rail-link.is-active,
.nav-rail-link[aria-current="page"] {
  color: #ffffff;
  background: transparent;
}

[data-theme="light"] .nav-rail-link.is-active,
[data-theme="light"] .nav-rail-link[aria-current="page"] {
  color: #ffffff;
}

.nav-rail-link:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .nav-rail-indicator {
    transition: none;
  }
  .nav-rail-indicator::before {
    animation: none;
  }
}

/* Legacy alias — keep any stray .nav-link usable */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
  justify-self: end;
  grid-column: 3;
}

.header-actions .btn {
  display: none;
}

.header-island .btn {
  height: 36px;
  min-width: 7.25rem;
  padding: 0 1.15rem;
  font-size: 0.75rem;
  border-radius: 999px;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--color-bg-card);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle:active {
  transform: scale(0.97);
}

.menu-toggle i {
  font-size: 1.25rem;
  color: var(--text-heading);
}

@media (min-width: 960px) {
  .header-actions .btn {
    display: inline-flex;
  }
}

.nav-mobile {
  display: none;
  width: min(100%, 1120px);
  margin: 0.65rem auto 0;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: rgba(8, 8, 12, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 1rem 1.15rem;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .nav-mobile {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.12);
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-heading);
  font-weight: 500;
}

.nav-mobile .mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

@media (max-width: 959px) {
  .header-island {
    grid-template-columns: 1fr auto;
  }

  .brand {
    grid-column: 1;
    justify-self: start;
  }

  .header-actions {
    grid-column: 2;
  }
}

@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

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

/* —— Sections —— */
.section {
  padding: var(--section-y) 0;
}

.section-tight {
  padding: var(--section-y-tight) 0;
}

.section-muted {
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.04), transparent);
}

/* Marketing section head (eyebrow → H2 → desc) */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 2rem;
  max-width: 48rem;
}

.section-head .eyebrow {
  margin-bottom: 0;
}

.section-head .section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-heading);
  display: block;
}

.section-head .section-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 52ch;
  margin-top: 0;
}

.section-head.center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

.section-head.center .section-desc {
  margin-inline: auto;
}

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  /* Top-align copy/CTAs with the product demo */
  align-items: start;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  max-width: 16ch;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin-top: 1.25rem;
  max-width: 44ch;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.hero-audience {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-body);
  max-width: 48ch;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-actions .btn {
  height: var(--btn-height-lg);
  min-width: 13.5rem;
  padding: 0 1.75rem;
  font-size: 0.8125rem;
}

.hero-note {
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--color-bg-sidebar);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.footer-brand p {
  margin-top: 0.85rem;
  max-width: 28ch;
  font-size: 0.9rem;
}

.footer-contact {
  margin-top: 1.25rem;
}

.footer-contact h4 {
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
  color: var(--text-body);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-contact a + a {
  display: flex;
}

.footer-contact a:hover,
.footer-phone:hover {
  color: var(--text-heading);
}

.footer-phone {
  color: var(--text-heading);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.footer-phone i {
  font-size: 1rem;
  color: #34d399;
}

.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.footer-col a {
  display: block;
  padding: 0.35rem 0;
  color: var(--text-body);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--text-heading);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 0.8125rem;
}

/* —— Page hero (inner pages) —— */
.page-hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 18ch;
}

.page-hero p {
  margin-top: 1rem;
  max-width: 52ch;
  font-size: 1.0625rem;
}
