/* ============================================
   GARY SHEDLIN — PREMIUM CORPORATE SITE
   Design System & Global Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Core Palette: Deep Navy & Charcoal */
  --navy: #08101a;
  --navy-light: #0d1726;
  --navy-deep: #050a11;
  --charcoal: #111827;
  --charcoal-light: #1f2937;
  --graphite: #1c2431;

  /* Accents: Steel Gray & Glows */
  --blue-primary: #1e3a8a;
  --blue-accent: #3b82f6;
  --blue-soft: #60a5fa;
  --blue-glow: rgba(59, 130, 246, 0.4);
  --teal-glow: rgba(45, 212, 191, 0.3);
  
  --silver: #9ca3af;
  --silver-light: #e5e7eb;
  --steel: #4b5563;
  --white: #ffffff;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-body: #d1d5db;
  
  /* Glassmorphism & Overlays */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-light: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  
  /* Geometry & Motion */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--navy);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.8;
  max-width: 70ch;
}

.text-gradient {
  background: linear-gradient(135deg, var(--white), var(--silver-light), var(--steel));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-blue {
  background: linear-gradient(135deg, var(--blue-soft), var(--blue-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blue-soft);
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* --- Animated Backgrounds --- */
.bg-gradient-animated {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy), var(--charcoal));
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

/* ============================================
   ACCESS GATE (PRE-HOMEPAGE)
   ============================================ */
.access-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  transition: opacity 1.2s cubic-bezier(0.8, 0, 0.1, 1), filter 1.2s ease;
}

.access-page.hidden {
  opacity: 0;
  pointer-events: none;
  filter: blur(10px);
}

.access-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, var(--blue-primary) 0%, transparent 40%);
  opacity: 0.15;
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.1; }
  100% { transform: scale(1.2); opacity: 0.25; }
}

.access-card {
  position: relative;
  z-index: 2;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 4rem 3.5rem;
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.access-card .logo-mark {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.05em;
  margin-bottom: 2rem;
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.access-card h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.access-card .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.access-input-group {
  position: relative;
  margin-bottom: 2rem;
}

.access-input-group input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  padding-right: 3rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-primary);
  text-align: center;
  outline: none;
  transition: var(--transition-smooth);
}

.access-input-group input:focus {
  border-color: var(--blue-soft);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.access-input-group .toggle-pass {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
}

.access-btn {
  width: 100%;
  padding: 1.2rem;
  background: var(--text-primary);
  color: var(--navy-deep);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.access-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
  background: var(--white);
}

.access-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.access-error.show { opacity: 1; }

.access-input-group input.error-glow {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition-smooth);
}

.main-nav.scrolled {
  background: rgba(8, 16, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}

.nav-logo span {
  color: var(--blue-soft);
}

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

.nav-links a {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: var(--glass-bg);
}

.nav-cta {
  padding: 0.6rem 1.4rem !important;
  background: var(--white) !important;
  color: var(--navy-deep) !important;
  font-weight: 700 !important;
  border-radius: var(--radius-sm) !important;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(5, 10, 17, 0.98);
  backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--blue-soft);
}

.mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--white);
  color: var(--navy-deep);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--blue-soft);
}

/* ============================================
   SECTIONS & GRIDS
   ============================================ */
.section {
  padding: 8rem 2rem;
  position: relative;
}

.section-lg {
  padding: 10rem 2rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.container-md {
  max-width: 1100px;
  margin: 0 auto;
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.15rem;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.grid-asymmetric { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: center; }
.grid-asymmetric-reverse { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: center; }

@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-4, .grid-asymmetric, .grid-asymmetric-reverse {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ============================================
   UTILITIES & COMPONENTS
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

/* Stats */
.stat-number {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Images */
.img-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--charcoal);
  border: 1px solid var(--glass-border);
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-slow);
}

.img-container:hover img {
  transform: scale(1.02);
}

/* Dividers */
.divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-accent), transparent);
  margin: 2rem 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid var(--glass-border);
  padding: 6rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer-col a {
  display: block;
  padding: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--blue-soft); }

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-bottom a { color: var(--white); }
.footer-bottom a:hover { text-decoration: underline; }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  z-index: 900;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--white);
  color: var(--navy-deep);
}

/* ============================================
   ANIMATIONS (SCROLL REVEAL)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: top 0.1s, left 0.1s;
}

/* ============================================
   EXPANSION UTILITIES (MASSIVE OVERHAUL)
   ============================================ */
.editorial-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 3rem;
  margin-top: 3rem;
}

.editorial-split .ed-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  border-left: 3px solid var(--blue-accent);
  padding-left: 1rem;
}

.editorial-split p {
  font-size: 1.15rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.stat-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  background: rgba(8, 16, 26, 0.8);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 2rem 0;
}

.stat-marquee {
  display: inline-block;
  animation: scroll-left 30s linear infinite;
}

.stat-marquee .stat-item {
  display: inline-flex;
  flex-direction: column;
  margin: 0 4rem;
  align-items: center;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.bento-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 1.5rem;
}

.bento-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; grid-row: span 1; }
.bento-tall { grid-column: span 1; grid-row: span 2; }

@media (max-width: 1024px) {
  .editorial-split { grid-template-columns: 1fr; gap: 2rem; }
  .bento-box { grid-template-columns: 1fr 1fr; }
  .bento-large, .bento-wide, .bento-tall { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 600px) {
  .bento-box { grid-template-columns: 1fr; }
  .bento-large, .bento-wide, .bento-tall { grid-column: span 1; }
}

.glass-accordion {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--glass-bg);
  transition: var(--transition-fast);
}

.glass-accordion:hover {
  background: rgba(255,255,255,0.06);
}

.glass-accordion summary {
  padding: 1.5rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--white);
  cursor: pointer;
  list-style: none; /* Hide default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.glass-accordion summary::-webkit-details-marker {
  display: none;
}

.glass-accordion summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--blue-soft);
  transition: transform 0.3s;
}

.glass-accordion[open] summary::after {
  content: '−';
}

.glass-accordion p {
  padding: 0 2rem 1.5rem;
  color: var(--text-secondary);
  border-top: 1px solid transparent;
}
