/* ==========================================================================
   Beanstalk's Governance Studio — Shared Design System
   Version: 1.0 | May 2026
   ========================================================================== */

/* ── Design tokens ── */
:root {
  --canvas: #fcfcfd;
  --surface: #ffffff;
  --brand-dark: #0f172a;
  --brand-primary: #4f46e5;
  --brand-secondary: #0284c7;
  --brand-purple: #7c3aed;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-subtle: rgba(15, 23, 42, 0.06);
  --success: #059669;
  --bg-cards: #f0f0f0;
  --radius-ui: 8px;

  --11-fs: 11px;
  --12-fs: 12px;
  --13-fs: 13px;
  --14-fs: 14px;
  --15-fs: 15px;
  --16-fs: 16px;
  --18-fs: 18px;
  --20-fs: 20px;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: var(--canvas);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* ── Focus states ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-primary) !important;
  outline-offset: 2px !important;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--brand-dark);
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 999;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius-ui) var(--radius-ui);
  transition: top 0.1s;
}
.skip-link:focus {
  top: 0;
}

/* ── Header ── */
html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.site-header {
  background: rgba(252, 252, 253, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
}
.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  /* padding: 0 2rem; */
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.logo-area:hover {
  color: var(--brand-primary);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}
.nav-links > li:not(.nav-cta) > a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color 0.15s;
  padding: 0.4rem 0;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.nav-links > li:not(.nav-cta) > a:hover {
  color: var(--brand-dark);
  border-bottom-color: var(--brand-primary);
}
.nav-links > li:not(.nav-cta) > a.active {
  color: var(--brand-primary);
  font-weight: 600;
}

/* Nav CTA button */
.nav-links > li.nav-cta {
  border: 3px solid black;
  border-radius: 7px;
}

.nav-links > li.nav-cta > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary);
  color: #fff !important;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-ui);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
  white-space: nowrap;
  border: 3px solid var(--surface);
}

.nav-links > li.nav-cta > a:hover,
.nav-links > li.nav-cta > a:focus-visible {
  background: #1e293b;
  color: #fff !important;
  /* transform: translateY(-1px); */
  /* background: rgba(79, 70, 229, 0.2); */
  /* color: var(--brand-primary) !important; */
  /* box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15); */
}

/* ── Dropdown — hover + click with no gap ── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0;
  font-family: inherit;
  transition: color 0.15s;
}
.nav-dropdown-btn:hover {
  color: var(--brand-dark);
}

/* Invisible bridge fills the gap between button and menu so mouse doesn't fall through */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* flush — no gap */
  left: 0;
  padding-top: 10px; /* invisible top padding acts as hover bridge */
  z-index: 200;
  min-width: 240px;
}
.nav-dropdown-menu-inner {
  background: rgba(252, 252, 253, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  /* box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1); */
  padding: 6px;
  list-style: none;
}
/* Show on hover OR JS-toggled .open class */
.nav-dropdown:hover:not(.closed) .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu-inner li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 7px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 0.12s,
    color 0.12s;
  border-bottom: none !important;
  min-height: auto;
}
.nav-dropdown-menu-inner li a:hover {
  background: var(--canvas);
  color: var(--brand-dark);
}
.nav-dropdown-menu-inner li a.active {
  color: var(--brand-primary);
  font-weight: 600;
  background: #f1f0fd;
}
.nav-dropdown-menu-inner li a .dd-icon {
  font-size: 16px;
}
.nav-dropdown-menu-inner li a .dd-text {
  display: flex;
  flex-direction: column;
}
.nav-dropdown-menu-inner li a .dd-label {
  font-weight: 600;
  color: var(--brand-dark);
  font-size: 13px;
}
.nav-dropdown-menu-inner li a .dd-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.nav-dropdown-menu-inner li a:hover .dd-label {
  color: var(--brand-primary);
}

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand-dark);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Shared footer ── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 2rem 2.5rem;

  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
}
.footer-brand {
  max-width: 280px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.footer-tagline {
  font-size: var(--15-fs);
  color: #bac2cf;
  line-height: 1.55;
}
.footer-cols {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}
.footer-col h3 {
  font-size: var(--13-fs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bac2cf;
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 0.6rem;
}
.footer-col a {
  color: #bac2cf;
  text-decoration: none;
  font-size: var(--14-fs);
  transition: color 0.15s;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom p {
  color: #bac2cf;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-ui);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  min-height: 44px;
  font-family: inherit;
}
.btn-primary {
  background: var(--brand-dark);
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}
.btn-outline {
  border-color: rgba(15, 23, 42, 0.12);
  background: var(--surface);
  color: var(--brand-dark) !important;
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

/* ── Layout helpers ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-padding {
  padding: 7rem 2rem;
}
.section-header {
  max-width: 750px;
  margin: 0 auto 5rem;
  text-align: center;
}
.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .footer-cols {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(252, 252, 253);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 0.5rem 1.5rem 1.5rem;
    gap: 0;
    z-index: 150;
    align-items: flex-start;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links > li:last-child {
    border-bottom: none;
  }
  .nav-links > li > a {
    padding: 0.85rem 0;
    display: block;
    border-bottom: none;
  }
  .nav-dropdown-btn {
    padding: 0.85rem 0;
    width: 100%;
    justify-content: space-between;
  }
  .nav-dropdown-menu {
    position: static;
    transform: none;
    padding-top: 0;
    min-width: 0;
  }
  .nav-dropdown-menu-inner {
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(79, 70, 229, 0.03);
  }
  .nav-dropdown-menu-inner li a {
    padding: 0.7rem 0.75rem;
  }
  .nav-links > li.nav-cta {
    margin: 0.75rem 0;
  }
  .nav-links > li.nav-cta > a {
    /* display: inline-block; */
    padding: 0 16px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    text-align: center;
    align-items: center;
  }
  .footer-cols {
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .section-padding {
    padding: 4rem 1.5rem;
  }
  .section-header h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1.25rem;
  }
}

/* new code starts */
.site-header {
  min-height: 72px;
  height: auto;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 70, 229, 0.35),
    transparent
  );
  pointer-events: none;
}

.nav-container {
  min-height: 72px;
  padding: 0 2rem;
}

.logo-area {
  min-width: 0;
  padding: 0.55rem 0;
}

.logo-area svg {
  flex: 0 0 auto;
}

.nav-links {
  gap: 0.35rem;
}

.nav-links > li:not(.nav-cta) > a,
.nav-dropdown-btn {
  min-height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-ui);
  border-bottom: 0;
}

.nav-links > li:not(.nav-cta) > a:hover,
.nav-dropdown-btn:hover,
.nav-dropdown.open .nav-dropdown-btn {
  color: var(--brand-dark);
  /* background: rgba(15, 23, 42, 0.04); */
  border-bottom-color: transparent;
}

.nav-links > li:not(.nav-cta) > a.active,
.nav-dropdown:has(.active) .nav-dropdown-btn {
  color: var(--brand-primary);
  background: #f1f0fd;
}
.nav-dropdown-btn svg {
  transition: transform 0.18s ease;
}

.nav-dropdown:hover:not(.closed) .nav-dropdown-btn svg,
.nav-dropdown.open .nav-dropdown-btn svg {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  min-width: 320px;
  padding-top: 14px;
}

.nav-dropdown-menu-inner {
  border-radius: var(--radius-ui);
  border-color: rgba(15, 23, 42, 0.08);
  /* box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06); */
}

.nav-dropdown-menu-inner li a {
  white-space: normal;
}

.nav-dropdown-menu-inner li a .dd-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(79, 70, 229, 0.08);
  flex: 0 0 auto;
}

.nav-dropdown-menu-inner li a:hover,
.nav-dropdown-menu-inner li a:focus-visible {
  background: #f8fafc;
}

.nav-links > li.nav-cta > a {
  min-height: 40px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.nav-hamburger {
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.nav-hamburger:hover {
  background: #f8fafc;
}

@media (max-width: 900px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-container {
    padding: 0 1.25rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-ui);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    padding: 0.75rem;
    z-index: 150;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li {
    width: 100%;
    border-bottom: 0;
  }

  .nav-links > li:not(.nav-cta) > a,
  .nav-dropdown-btn {
    width: 100%;
    min-height: 46px;
    padding: 0 0.9rem;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    width: 100%;
    position: static;
    transform: none;
    min-width: 0;
    padding: 0.15rem 0 0.35rem;
  }

  .nav-dropdown-menu-inner {
    background: rgba(79, 70, 229, 0.04);
    border: 0;
    border-radius: var(--radius-ui);
    box-shadow: none;
    padding: 0.35rem;
  }

  .nav-dropdown-menu-inner li a {
    padding: 0.75rem;
  }

  .nav-links > li.nav-cta {
    width: 100%;
    margin: 0.35rem 0 0;
  }

  .nav-links > li.nav-cta > a {
    width: 100%;
  }
}

/* Kunal's ask (Oct 2026): slightly larger logo + nav link font-size (+2pt,
   13px -> 15px) on desktop only. Originally scoped to min-width:901px
   (right above the 900px breakpoint where .nav-links collapses into the
   mobile hamburger menu), but confirmed via screenshot that the nav items
   were already tight at ~901-1000px even before this change — the larger
   text caused real overflow there ("How It Works" wrapping to 2 lines,
   "Download Free Trial" getting clipped). Tried 1050px next, but that was
   still right at the edge (confirmed via screenshot: wraps at exactly
   1050px, clean at 1049px and 1100px) — pushed to 1100px for real margin
   rather than sitting on the boundary. 901-1099px falls back to the
   original (smaller, already confirmed to fit) sizing while still using
   the horizontal nav layout (mobile hamburger only kicks in below 900px,
   unchanged). */
@media (min-width: 1100px) {
  .logo-area {
    font-size: 1.1rem;
  }

  .logo-area svg {
    width: 26px;
    height: 26px;
  }

  .nav-links > li:not(.nav-cta) > a,
  .nav-dropdown-btn,
  .nav-links > li.nav-cta > a {
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .logo-area {
    font-size: 0.9rem;
    max-width: calc(100% - 54px);
  }

  .logo-area span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
/* new code ends */
