/* Shared marketing nav layout (home2 + blog) */

html[data-truffl-page="home2"] {
  --bg: #0a0a0f;
  --surface: #15151e;
  --text: rgba(255, 255, 255, 0.92);
  --muted: #868686;
  --accent: #a480ae;
  --accent-hover: #927599;
  --charcoal-500: rgba(255, 255, 255, 0.92);
  --charcoal-400: #868686;
  --charcoal-350: #a1a1aa;
  --charcoal-100: rgba(255, 255, 255, 0.1);
  --nav-auth-signin-bg: transparent;
  --nav-auth-signin-hover-bg: rgba(255, 255, 255, 0.05);
  --nav-auth-signin-border: rgba(255, 255, 255, 0.15);
  --nav-auth-signin-border-hover: rgba(255, 255, 255, 0.25);
  --nav-auth-signin-text: rgba(255, 255, 255, 0.92);
  --nav-auth-signup-bg: #a480ae;
  --nav-auth-signup-hover: #927599;
  --nav-auth-radius: 0.75rem;
  --nav-auth-pad-y: 0.375rem;
  --nav-auth-pad-x: 0.875rem;
}

html[data-truffl-page="home2"] body.blog-page {
  background: var(--bg);
  color: var(--muted);
}

html[data-truffl-page="home2"] .nav-root {
  position: static;
  width: 100%;
  z-index: 50;
  color: var(--text);
  background: transparent;
}

html[data-truffl-page="home2"] .nav-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(0.8125rem, 0.68vw, 1.25rem);
}

@media (min-width: 1024px) {
  html[data-truffl-page="home2"] .nav-shell {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
  }
}

html[data-truffl-page="home2"] .nav-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

html[data-truffl-page="home2"] .nav-end {
  display: none;
}

@media (min-width: 1024px) {
  html[data-truffl-page="home2"] .nav-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    grid-column: 3;
    justify-self: end;
  }
}

html[data-truffl-page="home2"] .nav-mobile-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

@media (min-width: 1024px) {
  html[data-truffl-page="home2"] .nav-mobile-bar {
    display: none;
  }
}

html[data-truffl-page="home2"] .auth-authed-only {
  display: none !important;
}

html[data-truffl-page="home2"] .auth-anon-only {
  display: inline-flex;
}

html[data-truffl-page="home2"][data-auth="authed"] .auth-anon-only {
  display: none !important;
}

html[data-truffl-page="home2"][data-auth="authed"] .auth-authed-only {
  display: inline-flex !important;
}

html[data-truffl-page="home2"][data-auth="authed"] .nav-end .nav-account.auth-authed-only,
html[data-truffl-page="home2"][data-auth="authed"] .nav-mobile-bar .nav-account.auth-authed-only {
  display: flex !important;
  align-items: center;
}

html[data-truffl-page="home2"] li.auth-authed-only {
  display: none !important;
}

html[data-truffl-page="home2"][data-auth="authed"] li.auth-authed-only {
  display: list-item !important;
}

html[data-truffl-page="home2"][data-auth="authed"] li.auth-anon-only {
  display: none !important;
}

html[data-truffl-page="home2"] .nav-account {
  position: relative;
  align-items: center;
}

html[data-truffl-page="home2"] .nav-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.35rem 0.2rem 0.2rem;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

html[data-truffl-page="home2"] .nav-account-trigger:hover {
  background: rgba(164, 128, 174, 0.08);
}

html[data-truffl-page="home2"] .nav-account-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-truffl-page="home2"] .nav-account--compact .nav-account-trigger {
  padding: 0.15rem;
}

html[data-truffl-page="home2"] .nav-account-chevron {
  font-size: 1.125rem !important;
  opacity: 0.72;
}

html[data-truffl-page="home2"] .nav-account--compact .nav-account-chevron {
  display: none;
}

html[data-truffl-page="home2"] .nav-account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

html[data-truffl-page="home2"] .nav-account-avatar.nav-account-avatar--photo {
  padding: 0;
  background: #e4dfec;
}

html[data-truffl-page="home2"] .nav-account-avatar.nav-account-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

html[data-truffl-page="home2"] .nav-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 228px;
  z-index: 500;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 8px;
}

html[data-truffl-page="home2"] .nav-account-menu[hidden] {
  display: none !important;
}

html[data-truffl-page="home2"] .nav-account-head {
  padding: 8px 10px 10px;
}

html[data-truffl-page="home2"] .nav-account-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

html[data-truffl-page="home2"] .nav-account-email {
  font-size: 0.8rem;
  color: var(--charcoal-350);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-truffl-page="home2"] .nav-account-plan {
  font-size: 0.75rem;
  color: var(--charcoal-400);
  margin-top: 4px;
}

html[data-truffl-page="home2"] .nav-account-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

html[data-truffl-page="home2"] a.nav-account-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

html[data-truffl-page="home2"] a.nav-account-item:hover {
  background: rgba(164, 128, 174, 0.08);
}

html[data-truffl-page="home2"] a.nav-account-item .material-symbols-outlined {
  font-size: 1.125rem;
  opacity: 0.85;
}

html[data-truffl-page="home2"] .nav-burger {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9590;
}

html[data-truffl-page="home2"] .nav-burger svg {
  width: 28px;
  height: 28px;
  transform: scaleX(-1);
}

@media (max-width: 1023px) {
  html[data-truffl-page="home2"] .nav-burger,
  html[data-truffl-page="home2"] .nav-overlay {
    display: none !important;
  }
}

html[data-truffl-page="home2"] .nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

html[data-truffl-page="home2"] .nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  html[data-truffl-page="home2"] .nav-overlay {
    display: none;
  }
}

html[data-truffl-page="home2"] .nav-overlay-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

html[data-truffl-page="home2"] .nav-overlay-close {
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.125rem;
  margin-right: -1px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #9a9590;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-truffl-page="home2"] .nav-overlay-list {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

html[data-truffl-page="home2"] .nav-overlay-list a {
  display: block;
  padding: 0.625rem 0;
  font-size: 1.5rem;
  color: var(--charcoal-500);
  text-decoration: none;
}

html[data-truffl-page="home2"] .nav-overlay-list a:hover {
  color: var(--accent);
}

html[data-truffl-page="home2"] .nav-btn-signin,
html[data-truffl-page="home2"] .nav-btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: var(--nav-auth-pad-y) var(--nav-auth-pad-x);
  border-radius: var(--nav-auth-radius);
  text-decoration: none;
  font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: inherit;
  line-height: 1.5;
  box-sizing: border-box;
}

html[data-truffl-page="home2"] .nav-btn-signin {
  color: var(--nav-auth-signin-text);
  background: var(--nav-auth-signin-bg);
  border: 1px solid var(--nav-auth-signin-border);
}

html[data-truffl-page="home2"] .nav-btn-signup {
  color: #fff;
  background: var(--nav-auth-signup-bg);
  border: 1px solid var(--nav-auth-signup-bg);
}

html[data-truffl-page="home2"] body.blog-page {
  padding-top: 0;
  background: var(--bg);
  color: var(--muted);
}
