@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Plus_Jakarta_Sans:wght@700;800&display=swap');

:root {
  /* Backgrounds */
  --bg-primary: #f6f2e5;      /* Warm sand canvas background */
  --bg-card: #ffffff;         /* High-contrast white cards */
  --panel-bg: rgba(17, 48, 35, 0.03); /* Translucent soft olive background */
  --border-color: rgba(17, 48, 35, 0.08);
  --border-hover: rgba(194, 65, 12, 0.3);
  
  /* Accent Colors */
  --accent-olive: #113023;    /* Dark olive green primary */
  --accent-mint: #4deaa7;     /* Lighter mint green */
  --accent-orange: #c2410c;   /* Burnt orange primary CTA */
  
  /* Typography */
  --text-primary: #113023;    /* Dark olive green main headlines */
  --text-secondary: #4a5c53;  /* Muted olive gray for descriptions */
  --text-dark: #113023;       /* Card content text */
  --text-muted: #5a7266;      /* Muted text on light canvas (contrast compliant) */
  
  --gradient-accent: linear-gradient(135deg, var(--accent-orange) 0%, #d97706 100%);
  --success-color: #10b981;
  --warning-color: #c2410c;
  --danger-color: #ef4444;
  
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-sans: 'Inter', sans-serif;

  /* Spacing Tokens */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2.5rem;      /* Increased for Visual Density 3 (Art Gallery) */
  --spacing-xl: 4.5rem;      /* Increased for Visual Density 3 (Art Gallery) */
  --spacing-xxl: 9rem;       /* Increased for Visual Density 3 (Art Gallery) */

  /* Border Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;

  /* Premium Motion Curves */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Hover Backgrounds */
  --nav-hover-bg: rgba(17, 48, 35, 0.045);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Atmospheric Background Glows */
body::before, body::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.05; /* Soft, delicate glows */
  pointer-events: none;
}

body::before {
  top: -15%;
  left: 5%;
  background: var(--accent-mint);
}

body::after {
  bottom: 10%;
  right: 5%;
  background: var(--accent-orange);
}

/* Focus States for Keyboard Accessibility (WCAG 2.1 AA) */
a:focus-visible,
button:focus-visible,
iframe:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent-orange);
  outline-offset: 3px;
}

/* Header & Navbar */
.navbar {
  background: rgba(246, 242, 229, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 200ms cubic-bezier(0.23, 1, 0.32, 1), border-color 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.logo-container:active {
  transform: scale(0.97);
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-svg {
  width: 2.25rem;
  height: 2.25rem;
  filter: drop-shadow(0 2px 6px rgba(17, 48, 35, 0.15));
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.logo-hub {
  fill: var(--accent-orange);
  stroke: var(--bg-primary, #f6f2e5);
  stroke-width: 1.5px;
  transition: stroke 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

body.gate-active .logo-hub,
.gate-card .logo-hub {
  stroke: #ffffff !important; /* Crisp high-contrast white border on dark green backdrops */
}

@media (hover: hover) and (pointer: fine) {
  .logo-container:hover .logo-svg {
    transform: rotate(45deg);
  }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--accent-olive);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links #auth-btn {
  margin-left: 0.75rem; /* Add organic spacing separation to CTA */
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  margin: 0 0.1rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: 
    color 200ms var(--ease-out-expo), 
    background-color 200ms var(--ease-out-expo), 
    transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; /* Pull into link padded boundaries */
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  background-color: var(--accent-orange);
  border-radius: 1px;
  transform: scaleX(0);
  opacity: 0;
  transform-origin: center;
  transition: 
    transform 240ms var(--ease-out-expo), 
    opacity 240ms var(--ease-out-expo), 
    background-color 200ms var(--ease-out-expo);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--text-primary);
    background-color: var(--nav-hover-bg);
  }
  .nav-link:hover::after {
    transform: scaleX(1);
    opacity: 1;
  }
  .nav-link.active:hover::after {
    background-color: var(--accent-orange); /* Smooth active indicator hover color shift */
  }
}

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

.nav-link.active {
  color: var(--text-primary);
  font-weight: 700;
}

.nav-link.active::after {
  transform: scaleX(1);
  opacity: 1;
  background-color: var(--accent-olive);
}

/* Hamburger menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1.1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

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

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1), background-color 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Mobile Slide-out Drawer Navigation */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #f6f2e5;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(17, 48, 35, 0.15);
  z-index: 500;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  transition: right 400ms cubic-bezier(0.32, 0.72, 0, 1);
  visibility: hidden;
}

.mobile-drawer.open {
  right: 0;
  visibility: visible;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-md);
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .drawer-close:hover {
    color: var(--text-primary);
  }
}

.drawer-close:active {
  transform: scale(0.9);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.drawer-links .nav-link {
  font-size: 1.05rem;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  display: block;
}

.drawer-links .nav-link::after {
  display: none !important; /* Hide pseudo-indicator from mobile layout */
}

@media (hover: hover) and (pointer: fine) {
  .drawer-links .nav-link:hover {
    background: transparent;
    color: var(--accent-orange);
  }
}

.drawer-links .nav-link.active {
  color: var(--accent-orange);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--accent-orange);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 19, 26, 0.4);
  backdrop-filter: blur(4px);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gradient-accent);
  color: #ffffff; /* Contrast-compliant bold white text on burnt orange */
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms cubic-bezier(0.23, 1, 0.32, 1), filter 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(194, 65, 12, 0.18);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(194, 65, 12, 0.3);
    filter: brightness(1.05);
  }
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-olive);
  color: var(--accent-olive);
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    background: rgba(17, 48, 35, 0.03);
    border-color: var(--accent-olive);
    box-shadow: none;
    transform: translateY(-2px);
  }
}

/* Banner Alert (Profile Incompleteness) */
.banner {
  background: rgba(194, 65, 12, 0.04);
  border: 1px solid rgba(194, 65, 12, 0.12);
  border-left: 4px solid var(--warning-color);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(8px);
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(194, 65, 12, 0.03); }
  50% { box-shadow: 0 0 20px rgba(194, 65, 12, 0.08); }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.banner-link {
  color: var(--accent-orange);
  text-decoration: underline;
  font-weight: 600;
  transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .banner-link:hover {
    color: #a13000;
  }
}

/* Main Container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-xl) 2rem;
  flex: 1;
}

/* Hero Section */
.hero {
  text-align: left; /* Left-aligned for Asymmetry (Design Variance 9) */
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* Cohesive proximity gap */
}

.container > .hero {
  margin-bottom: var(--spacing-lg); /* Centralized subpage hero spacing */
}

.hero-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero.compact {
  margin-bottom: var(--spacing-sm) !important;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem); /* Fluid responsive display sizing */
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0;
  line-height: 1.05;
  color: var(--text-primary);
}

.hero h1 span {
  color: var(--accent-orange);
}

.hero p {
  font-size: 1.15rem; /* Balanced size for better typographic hierarchy */
  color: var(--text-secondary);
  max-width: 50ch;
  margin: 0;
  line-height: 1.65;
  font-weight: 400;
}

/* Asymmetric Layout Grid & Stagger Entry Reveals (DESIGN_VARIANCE 9 & MOTION_INTENSITY 8) */
.landing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  padding: var(--spacing-lg) 0 var(--spacing-xxl) 0;
  width: 100%;
}

@media (min-width: 1024px) {
  .landing-grid {
    grid-template-columns: 1fr 1.4fr; /* Asymmetric layout making the visual card section wider than text */
    gap: var(--spacing-xxl);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-item {
  animation: revealUp 1000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero h1.reveal-item {
  animation-delay: 100ms;
}

.hero p.reveal-item {
  animation-delay: 250ms;
}

.landing-right-col.reveal-item {
  animation-delay: 400ms;
}

/* Gateway Mode Card Style */
.gate-card {
  background: rgba(255, 255, 255, 0.45); /* Frosted glass panel backdrop for contrast over warm sand background */
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  color: var(--text-dark);
  border-radius: var(--radius-lg);
  padding: 5.5rem 4.5rem; /* Increased padding for luxurious editorial breathing room */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.80), /* Specular reflection highlight on top edge */
    0 1px 3px rgba(17, 48, 35, 0.03),
    0 25px 50px -12px rgba(17, 48, 35, 0.08); /* Deep, soft drop shadow */
  max-width: 560px; /* Wider card to anchor the screen visual weight */
  width: 100%;
  margin: 1rem auto 0 auto;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.60); /* Translucent white border */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  animation: fadeIn 0.8s ease-out;
  position: relative;
  overflow: hidden; /* Prevent particles floating outside card bounds */
}

/* Diagonal Specular Sheen reflection on glass */
.gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
  z-index: 1;
}

.gate-card .logo-svg {
  width: 5rem; /* Proportionally larger icon to showcase the constellation design details */
  height: 5rem;
  filter: drop-shadow(0 4px 12px rgba(17, 48, 35, 0.12));
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 2;
}

.gate-card h3 {
  font-family: var(--font-display);
  font-size: 2.2rem; /* Scaled header to match the larger logo weight */
  font-weight: 800;
  color: var(--accent-olive);
  margin-bottom: var(--spacing-xs);
  position: relative;
  z-index: 2;
}

.gate-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  position: relative;
  z-index: 2;
}

.gate-card .btn {
  width: 100%;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  position: relative;
  z-index: 2;
  transition: opacity 500ms cubic-bezier(0.25, 1, 0.5, 1), transform 500ms cubic-bezier(0.25, 1, 0.5, 1);
}

#gate-enter-btn.animating {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  visibility: hidden;
}

#gate-enter-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  visibility: visible;
  animation: button-ignition 800ms cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes button-ignition {
  0% {
    box-shadow: 0 0 0 0 rgba(194, 65, 12, 0.8), 0 4px 15px rgba(194, 65, 12, 0.18);
    filter: brightness(1.2);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(194, 65, 12, 0), 0 8px 25px rgba(194, 65, 12, 0.3);
    filter: brightness(1.05);
  }
  100% {
    box-shadow: 0 4px 15px rgba(194, 65, 12, 0.18);
    filter: brightness(1);
  }
}

/* Card Grid / List (Member Dashboard) */
.portal-rows-container {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* Gap between separate card modules */
}

.portal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2.25rem; /* Spacious interior padding */
  background: var(--bg-card); /* White card base */
  border: 1px solid var(--border-color); /* Full border encapsulation */
  border-radius: var(--radius-md); /* 12px rounded corners */
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(17, 48, 35, 0.02); /* Extremely soft ambient shadow */
  transition: 
    background-color 200ms var(--ease-out-expo), 
    border-color 200ms var(--ease-out-expo), 
    box-shadow 200ms var(--ease-out-expo), 
    transform 200ms var(--ease-out-expo);
}

.portal-row-left {
  display: flex;
  align-items: flex-start;
  gap: 2.25rem;
  min-width: 0; /* Safeguard layout size calculations */
}

.portal-row-num {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.5;
  width: 1.5rem;
  letter-spacing: 0.05em;
  margin-top: 0.35rem; /* Optical baseline alignment with title */
}

.portal-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0; /* Force block context wrapping */
}

.portal-row-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  transition: color 200ms var(--ease-out-expo);
}

.portal-row-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  word-wrap: break-word; /* Safe multi-line text wrapping */
  overflow-wrap: break-word;
}

.portal-row-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: transform 200ms var(--ease-out-expo), color 200ms var(--ease-out-expo);
  font-weight: 300;
}

/* Hover States for Card Dashboard */
@media (hover: hover) and (pointer: fine) {
  .portal-row:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    box-shadow: 0 12px 28px rgba(17, 48, 35, 0.05); /* Premium layout elevation glow */
    transform: translateY(-4px); /* Satisfying card lift */
  }
  
  .portal-row:hover .portal-row-title {
    color: var(--accent-orange);
  }
  
  .portal-row:hover .portal-row-arrow {
    transform: translateX(6px);
    color: var(--accent-orange);
  }
}

.portal-row:active {
  transform: scale(0.985);
}

/* Embed / Search View Container */
.embed-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 700px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(17, 48, 35, 0.05);
}

.embed-container.form-wrapper {
  min-height: 800px;
}

.embed-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

/* Tab Navigation for Directory */
.directory-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(17, 48, 35, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  transition: background-color 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms cubic-bezier(0.23, 1, 0.32, 1), color 160ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .tab-btn:hover {
    color: var(--text-primary);
    background: rgba(17, 48, 35, 0.06);
  }
}

.tab-btn:active {
  transform: scale(0.97);
}

.tab-btn.active {
  background: var(--gradient-accent);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(194, 65, 12, 0.15);
}

/* Loading Spinner for SSO redirects */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
}

.loading-container h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.loading-container p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

.spinner {
  width: 3.5rem;
  height: 3.5rem;
  border: 3px solid rgba(17, 48, 35, 0.06);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 2rem;
  box-shadow: 0 0 15px rgba(194, 65, 12, 0.1);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Policy Pages Styling */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
  animation: fadeIn 0.8s ease-out;
}

.policy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(17, 48, 35, 0.04);
}

.policy-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.policy-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.policy-card h2:first-of-type {
  margin-top: 0;
}

.policy-card p {
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.policy-card ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.policy-card li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.975rem;
}

.policy-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: block;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  background: rgba(246, 242, 229, 0.5);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--text-primary);
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-content {
    padding: 1rem;
  }
  .nav-links {
    display: none; /* Hide desktop links on mobile */
  }
  .menu-toggle {
    display: flex; /* Show mobile menu toggle */
  }
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .footer-links a {
    margin: 0 0.75rem;
  }
  .policy-card {
    padding: 1.75rem;
  }
  .portal-row {
    padding: 1.5rem 1.25rem; /* Better breathing room on mobile card view */
  }
  .portal-row-left {
    gap: 1.25rem;
  }
  /* Pad mobile interactive elements to ensure 44px tap targets */
  .nav-link {
    padding: 0.75rem 1rem;
  }
  .tab-btn {
    padding: 0.75rem 1.25rem;
  }
}

/* Gateway Dark Glassmorphic Theme */
body.gate-active {
  --bg-primary: #0e1411;       /* Warm Charcoal-black canvas background */
  --bg-card: rgba(255, 255, 255, 0.07); /* Dark glass card background */
  --accent-olive: #dce3df;     /* Pale warm-gray for text and links */
  --accent-orange: #e05a1e;    /* Organic, glowing burnt orange for active highlights */
  --text-primary: #dce3df;     /* Pale text */
  --text-secondary: #8c9c94;   /* Muted warm-gray for secondary text */
  --nav-hover-bg: rgba(220, 227, 223, 0.08); /* Glow-based hover pill in dark mode */
  --border-color: rgba(255, 255, 255, 0.1); /* Dark mode soft borders */
  --border-hover: rgba(224, 90, 30, 0.4); /* Dark mode active border glow */
  background-image: radial-gradient(circle at center, #113023 0%, #091711 75%, #030806 100%) !important;
  color: #ffffff;
  transition: background-image 0.5s ease;
}

body.gate-active .hero h1 {
  color: #ffffff !important;
}

body.gate-active .hero h1 span {
  color: var(--accent-mint) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

body.gate-active .hero p {
  color: rgba(255, 255, 255, 0.75) !important;
}

body.gate-active .navbar {
  background: rgba(17, 48, 35, 0.35) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.gate-active .gate-card {
  background: rgba(255, 255, 255, 0.07) !important; /* Frosty light-white base for glass refraction contrast over dark green */
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important; /* Clear highlight edge */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.25), /* Specular top edge catch */
    0 30px 60px rgba(0, 0, 0, 0.45) !important;
  color: #ffffff;
}

body.gate-active .gate-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.02) 100%) !important;
}

body.gate-active .logo-text {
  color: #ffffff;
}

body.gate-active .gate-card h3 {
  color: #ffffff;
}

body.gate-active .gate-card p {
  color: rgba(255, 255, 255, 0.70);
}

/* Fullscreen Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

/* CSS Particle Container */
.animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* CSS Particle Styles (Option 2) */
.circle-container {
  position: absolute;
  transform: translateY(-10vh);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.circle-container .circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  mix-blend-mode: screen;
  background-image: radial-gradient(
    hsl(180, 100%, 80%),
    hsl(180, 100%, 80%) 10%,
    hsla(180, 100%, 80%, 0) 56%
  );
  animation: fade-frames 200ms infinite, scale-frames 2s infinite;
}

@keyframes fade-frames {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes scale-frames {
  0%, 100% { transform: scale3d(0.4, 0.4, 1); }
  50% { transform: scale3d(2.2, 2.2, 1); }
}

/* Skeleton Loader Styling */
.loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

body.gate-active .loader-card {
  background: rgba(17, 48, 35, 0.25) !important;
  border: 1px dashed rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
}

body:not(.gate-active) .loader-card {
  background: rgba(255, 255, 255, 0.3) !important;
  border: 1px dashed rgba(17, 48, 35, 0.12) !important;
  box-shadow: none !important;
}

.skeleton-logo, .skeleton-title, .skeleton-text, .skeleton-btn {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

body:not(.gate-active) .skeleton-logo,
body:not(.gate-active) .skeleton-title,
body:not(.gate-active) .skeleton-text,
body:not(.gate-active) .skeleton-btn {
  background: linear-gradient(90deg, rgba(17, 48, 35, 0.03) 25%, rgba(17, 48, 35, 0.08) 50%, rgba(17, 48, 35, 0.03) 75%);
  background-size: 200% 100%;
}

.skeleton-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-title {
  width: 140px;
  height: 24px;
}

.skeleton-text {
  width: 100%;
  height: 14px;
}

.skeleton-text.short {
  width: 75%;
}

.skeleton-btn {
  width: 160px;
  height: 40px;
  margin-top: 1rem;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* View Transition States (Smooth crossfade/reveal) */
.transition-view {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  transition: opacity 250ms cubic-bezier(0.25, 1, 0.5, 1), transform 250ms cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.transition-view.active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Dashboard Card Staggered Entrance */
.portal-row {
  opacity: 0;
  transform: translateY(16px); /* More pronounced vertical slide up for cards */
  transition: 
    opacity 350ms var(--ease-out-expo), 
    transform 350ms var(--ease-out-expo),
    background-color 200ms var(--ease-out-expo), 
    border-color 200ms var(--ease-out-expo), 
    box-shadow 200ms var(--ease-out-expo);
}

.portal-rows-container.active .portal-row {
  opacity: 1;
  transform: translateY(0);
}

.portal-rows-container.active .portal-row:nth-child(1) { transition-delay: 60ms; }
.portal-rows-container.active .portal-row:nth-child(2) { transition-delay: 140ms; }
.portal-rows-container.active .portal-row:nth-child(3) { transition-delay: 220ms; }

/* Hamburger Close Transformation */
.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Navbar Links Entrance Stagger (Visual refinement on login transition) */
.navbar.active .nav-link {
  animation: navLinkReveal 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(-4px);
}

.navbar.active .nav-link:nth-child(1) { animation-delay: 60ms; }
.navbar.active .nav-link:nth-child(2) { animation-delay: 120ms; }
.navbar.active .nav-link:nth-child(3) { animation-delay: 180ms; }
.navbar.active .nav-link:nth-child(4) { animation-delay: 240ms; }
.navbar.active .nav-link:nth-child(5) { animation-delay: 300ms; }

.navbar.active #auth-btn {
  animation: navLinkReveal 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 360ms;
  opacity: 0;
  transform: translateY(-4px);
}

@keyframes navLinkReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion Override (A11y compliance) */
@media (prefers-reduced-motion: reduce) {
  .transition-view,
  .portal-row,
  .menu-toggle span,
  #gate-enter-btn,
  .nav-link::after,
  .navbar.active .nav-link,
  .navbar.active #auth-btn {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Public Informational / SEO Section */
.info-section {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border-color);
  margin-bottom: var(--spacing-lg);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.info-col h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.info-col h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.info-col h4:first-child {
  margin-top: 0;
}

.info-col p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.info-col p a {
  color: var(--accent-orange);
  text-decoration: none;
}

.info-col p a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}


