/* Top navigation + branding */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.70);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.brand-text { display: inline-block; line-height: 1.05; }
.brand-name { display: block; font-weight: 900; letter-spacing: -0.02em; }
.brand-tagline { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.brand-in {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.55);
  font-weight: 900;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  text-decoration: none;
  color: rgba(15, 23, 42, 0.75);
  padding: 8px 10px;
  border-radius: 999px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.55);
  color: var(--ink);
}

.nav-btn {
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.55);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.nav-btn-primary {
  background: rgba(46, 120, 196, 0.92);
  color: #fff;
  border-color: rgba(255,255,255,0.30);
}

/* Step 25: modern nav sizing + spacing */
.topbar-inner {
  padding: 14px 16px;
}

.brand-name {
  font-size: 18px;
}

.brand-tagline {
  font-size: 12px;
}

.nav {
  gap: 8px;
}

.nav-link {
  padding: 8px 10px;
  font-weight: 600;
}

.nav-btn,
.nav-btn-primary {
  padding: 10px 14px;
  font-weight: 700;
  border-radius: 12px; /* less pill */
}

/* Hover states feel modern */
.nav-btn:hover {
  background: rgba(255,255,255,0.70);
}

.nav-btn-primary:hover {
  filter: brightness(0.96);
}

/* Step 27: keep nav items tidy */
.nav-link { white-space: nowrap; }

/* Home: keep header frozen but visually weightless (no divider, no hard bar) */
.home .topbar {
  position: sticky;
  top: 0;
  z-index: 50;

  border-bottom: 0;                /* no divider line */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* subtle fade so it doesn’t look like a “bar” */
  background: linear-gradient(
    to bottom,
    rgba(248, 250, 255, 0.92) 0%,
    rgba(248, 250, 255, 0.70) 60%,
    rgba(248, 250, 255, 0.00) 100%
  );
}


/* Sharp rectangle language */
.nav-link { border-radius: 6px; }
.nav-btn, .nav-btn-primary { border-radius: 6px; }
.brand-in { border-radius: 6px; }

/* Make topbar blend into the page atmosphere (no shade jump) */
body.atmo .topbar {
  position: sticky; /* keep if you already have sticky; harmless */
  top: 0;
  border-bottom: 0 !important;
  box-shadow: none !important;

  /* Use a soft gradient instead of a flat shade */
  background: linear-gradient(
    180deg,
    rgba(245, 247, 255, 0.92) 0%,
    rgba(245, 247, 255, 0.72) 70%,
    rgba(245, 247, 255, 0.00) 100%
  ) !important;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Add a tiny fade “tail” below the bar so it melts into the page */
body.atmo .topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: linear-gradient(
    180deg,
    rgba(245, 247, 255, 0.18),
    rgba(245, 247, 255, 0.00)
  );
  pointer-events: none;
}

/* ================================
   Wordmark row + nav row header
   ================================ */

.topbar{
  position: sticky;
  top: 0;
  z-index: 30;

  /* keep it “continuous” with page atmosphere (no hard divider bar) */
  background: transparent;
  border-bottom: 0;
  backdrop-filter: blur(10px);
}

/* Row 1: wordmark (70% of nav width) — tightened */
.topbar-brand{
  max-width: 980px;
  margin: 0 auto;
  padding: 4px 16px 0px;      /* tighter: less vertical space */
  display: flex;
  justify-content: center;
}

.brand-wordmark-link{
  display: block;
  width: 70%;
  text-align: center;
}

.brand-wordmark{
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

/* tagline centered, tighter */
.brand-tagline{
  display: block;
  margin-top: -25px;          /* bring it closer to the logo */
  font-size: 18px;          /* bigger than before */
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
  color: rgba(0,0,0,0.62);  /* readable but still subtle */
}


/* Row 2: nav underneath — pulled up closer */
.topbar-nav{
  max-width: 980px;
  margin: 0 auto;
  padding: 0px 16px 8px;      /* tighter top + bottom */
}

/* split left links + right auth controls */
.nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-left,
.nav-right{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* tighter nav links (less row height) */
.nav-link{
  padding: 6px 10px;
}

/* Home: still keep it continuous */
.home .topbar{
  background: transparent;
  border-bottom: 0;
}
