/* ==========================================================================
   FUNDBRIDGE BASE STYLESHEET
   Modern, Full-Bleed, Glassmorphism Header & Design System Tokens
   ========================================================================== */

:root {
  --navy: #0b2948;
  --navy-deep: #06182b;
  --navy-dark: #0e345b;
  --blue: #226496;
  --blue-bright: #0284c7;
  --blue-soft: #eaf3f9;
  --blue-subtle: #f0f7fc;
  --ink: #0f2742;
  --muted: #5e7388;
  --muted-light: #8ca0b3;
  --border: #e2eaf0;
  --border-light: rgba(226, 234, 240, 0.7);
  --border-accent: rgba(34, 100, 150, 0.25);
  --pale: #f8fbfe;
  --white: #ffffff;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --accent: #2563eb;
  
  --shadow-xs: 0 1px 2px rgba(11, 41, 72, 0.04);
  --shadow-sm: 0 2px 8px rgba(11, 41, 72, 0.05);
  --shadow-md: 0 10px 25px -4px rgba(11, 41, 72, 0.08), 0 4px 10px -2px rgba(11, 41, 72, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(11, 41, 72, 0.12), 0 8px 16px -4px rgba(11, 41, 72, 0.06);
  --shadow-glow: 0 0 25px rgba(34, 100, 150, 0.18);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: #ffffff;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   CONTAINER & LAYOUT WRAPPERS (FULL-BLEED SYSTEM)
   ========================================================================== */

/* Standard max-width container inside full-width section bands */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 28px;
  box-sizing: border-box;
}

/* Sections span full viewport width */
.section-full {
  width: 100%;
  position: relative;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 234, 240, 0.85);
  box-shadow: 0 4px 20px -2px rgba(11, 41, 72, 0.04);
  transition: all var(--transition-smooth);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 24px -2px rgba(11, 41, 72, 0.08);
}

.pub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

/* Brand Logo */
.pub-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.pub-logo:hover {
  transform: translateY(-1px);
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Navigation Links */
.pub-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #4a6177;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--navy);
  background: var(--blue-soft);
}

/* Action Buttons Area */
.pub-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.inline-logout-form {
  margin: 0;
  display: inline-flex;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #0b2948 0%, #1a517c 100%);
  color: #ffffff;
  border: 1px solid rgba(11, 41, 72, 0.15);
  box-shadow: 0 4px 14px rgba(11, 41, 72, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #061b31 0%, #15456c 100%);
  box-shadow: 0 8px 22px rgba(11, 41, 72, 0.28);
  color: #ffffff;
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transition: left 0.6s ease;
}

.btn-glow:hover::after {
  left: 140%;
}

.btn-ghost {
  background: #ffffff;
  border-color: #d6e3ec;
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}

.btn-ghost:hover {
  background: var(--blue-soft);
  border-color: #bcd5e6;
  color: var(--blue);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   MOBILE NAV TOGGLE (HAMBURGER)
   ========================================================================== */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background-color: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.pub-footer {
  background: var(--navy-deep);
  color: #a3b8cb;
  padding: 72px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.pub-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  width: 500px;
  height: 250px;
  background: radial-gradient(ellipse at center, rgba(34, 100, 150, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.pub-footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.2fr 1.1fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.footer-brand-col {
  padding-right: 20px;
}

.footer-logo-wrap {
  display: inline-block;
  margin-bottom: 12px;
}

.footer-logo-img {
  filter: brightness(0) invert(1);
  height: 38px;
  width: auto;
  opacity: 0.95;
}

.footer-tagline {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  margin: 12px 0 8px;
}

.footer-disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: #8da4b8;
  max-width: 380px;
  margin: 0 0 18px;
}

.footer-badges {
  margin-top: 14px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #a8dfc8;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.pub-footer h3 {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 20px;
}

.pub-footer-grid > div > a:not(.pub-logo) {
  display: block;
  font-size: 13.5px;
  margin: 10px 0;
  color: #9cb2c5;
  transition: all var(--transition-fast);
}

.pub-footer-grid > div > a:not(.pub-logo):hover {
  color: #ffffff;
  transform: translateX(3px);
}

.footer-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #7b93a7;
}

.footer-copy-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.copy-bullet {
  opacity: 0.5;
}

.footer-copy-right {
  font-size: 11.5px;
  opacity: 0.85;
}

/* Mobile Drawer Auth */
.mobile-drawer-auth {
  display: none;
}

/* ==========================================================================
   RESPONSIVENESS (TABLETS & MOBILE)
   ========================================================================== */

@media (max-width: 960px) {
  .pub-nav-links {
    display: none;
    position: absolute;
    z-index: 100;
    top: 76px;
    left: 16px;
    right: 16px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .pub-nav-links.open {
    display: flex;
    animation: slide-fade-down 0.22s ease-out;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: var(--radius-sm);
  }

  .mobile-drawer-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .mobile-auth-btn {
    width: 100%;
    min-height: 40px;
  }

  .mobile-auth-logout {
    margin: 0;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .pub-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@keyframes slide-fade-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  .nav-action-desktop {
    display: none !important;
  }

  .pub-nav {
    min-height: 64px;
    gap: 12px;
  }

  .brand-logo-img {
    height: 32px;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 580px) {
  .wrap {
    padding-inline: 16px;
  }

  .btn-sm {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .pub-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
