/* PsiFi Brand Portal - Styles (matching psifi.app) */

:root {
  /* Brand Colors from Brand Guide PDF */
  --brand-green-solid: #54A44D;
  --brand-green-bright: #77E36D;
  --brand-green-muted: #99EA92;
  --brand-black: #111111;
  --brand-gray: #444442;
  --brand-white: #F1F1F1;

  /* Website Colors (current psifi.app) */
  --psifi-green: #2e8b57;
  --psifi-bright: #4ade80;
  --psifi-lime: #a3e635;
  --psifi-dark: #0a0b0e;
  --psifi-charcoal: #0f1014;
  --psifi-steel: #1f2128;
  --text-main: #ffffff;
  --text-muted: #9496a1;
  --text-subtle: #5f616d;

  /* Semantic aliases */
  --bg-primary: var(--psifi-dark);
  --bg-card: var(--psifi-charcoal);
  --accent: var(--psifi-bright);
  --accent-hover: var(--psifi-lime);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-glass-sm: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 4px 16px 0 rgba(0, 0, 0, 0.4);
  --shadow-glass: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(74, 222, 128, 0.15);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
}

body {
  font-family: 'Comfortaa', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Glass morphism */
.glass {
  background: rgba(10, 11, 14, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.glass-card {
  background: linear-gradient(180deg, rgba(20, 21, 24, 0.95) 0%, rgba(10, 11, 14, 0.98) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-glass-sm);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: rgba(5, 5, 7, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover {
  transform: scale(1.08);
}

.nav-logo-img {
  height: 24px;
  width: auto;
  transition: filter 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
  filter: brightness(1.1);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

/* Mobile menu */
.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  position: relative;
  width: 40px;
  height: 40px;
}

.nav-menu-btn svg {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu-btn[aria-expanded="true"] svg {
  transform: rotate(90deg);
  opacity: 0.7;
}

/* Main content */
main {
  padding-top: 72px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* Starfield background - basic version for other pages */
.starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.starfield::before,
.starfield::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow:
    100px 100px 0 0 rgba(255,255,255,0.3),
    200px 150px 0 0 rgba(255,255,255,0.2),
    350px 80px 0 0 rgba(255,255,255,0.25),
    450px 200px 0 0 rgba(255,255,255,0.15),
    600px 120px 0 0 rgba(255,255,255,0.2),
    750px 250px 0 0 rgba(255,255,255,0.3),
    900px 50px 0 0 rgba(255,255,255,0.2),
    1050px 180px 0 0 rgba(255,255,255,0.25),
    1200px 300px 0 0 rgba(255,255,255,0.15),
    150px 350px 0 0 rgba(255,255,255,0.2),
    320px 450px 0 0 rgba(255,255,255,0.3),
    500px 380px 0 0 rgba(255,255,255,0.2),
    680px 500px 0 0 rgba(255,255,255,0.25),
    850px 420px 0 0 rgba(255,255,255,0.15),
    1000px 550px 0 0 rgba(255,255,255,0.2),
    1150px 480px 0 0 rgba(255,255,255,0.3);
  animation: twinkle 8s ease-in-out infinite;
}

.starfield::after {
  animation-delay: -4s;
  opacity: 0.5;
  transform: scale(1.5) translateX(-100px);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Advanced starfield - for landing page */
.starfield-advanced {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46, 139, 87, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(74, 222, 128, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 20% 80%, rgba(46, 139, 87, 0.1) 0%, transparent 40%),
    var(--bg-primary);
}

/* Layer 1: Distant small stars */
.starfield-advanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow:
    /* Scattered tiny stars - increased opacity */
    50px 50px 0 0 rgba(255,255,255,0.7),
    120px 80px 0 0 rgba(255,255,255,0.6),
    200px 120px 0 0 rgba(255,255,255,0.65),
    280px 40px 0 0 rgba(255,255,255,0.5),
    350px 180px 0 0 rgba(255,255,255,0.7),
    420px 90px 0 0 rgba(255,255,255,0.6),
    500px 200px 0 0 rgba(255,255,255,0.65),
    580px 60px 0 0 rgba(255,255,255,0.5),
    660px 150px 0 0 rgba(255,255,255,0.7),
    740px 30px 0 0 rgba(255,255,255,0.6),
    820px 170px 0 0 rgba(255,255,255,0.65),
    900px 100px 0 0 rgba(255,255,255,0.5),
    980px 220px 0 0 rgba(255,255,255,0.7),
    1060px 70px 0 0 rgba(255,255,255,0.6),
    1140px 190px 0 0 rgba(255,255,255,0.65),
    1220px 140px 0 0 rgba(255,255,255,0.5),
    1300px 50px 0 0 rgba(255,255,255,0.7),
    1400px 120px 0 0 rgba(255,255,255,0.6),
    1500px 200px 0 0 rgba(255,255,255,0.55),
    1600px 80px 0 0 rgba(255,255,255,0.5),
    1700px 160px 0 0 rgba(255,255,255,0.7),
    1800px 100px 0 0 rgba(255,255,255,0.6),
    70px 280px 0 0 rgba(255,255,255,0.6),
    150px 350px 0 0 rgba(255,255,255,0.65),
    230px 300px 0 0 rgba(255,255,255,0.5),
    310px 400px 0 0 rgba(255,255,255,0.7),
    390px 320px 0 0 rgba(255,255,255,0.6),
    470px 450px 0 0 rgba(255,255,255,0.65),
    550px 380px 0 0 rgba(255,255,255,0.5),
    630px 500px 0 0 rgba(255,255,255,0.7),
    710px 420px 0 0 rgba(255,255,255,0.6),
    790px 550px 0 0 rgba(255,255,255,0.65),
    870px 480px 0 0 rgba(255,255,255,0.5),
    950px 600px 0 0 rgba(255,255,255,0.7),
    1030px 520px 0 0 rgba(255,255,255,0.6),
    1110px 650px 0 0 rgba(255,255,255,0.65),
    1190px 580px 0 0 rgba(255,255,255,0.5),
    1300px 450px 0 0 rgba(255,255,255,0.7),
    1400px 550px 0 0 rgba(255,255,255,0.6),
    1500px 480px 0 0 rgba(255,255,255,0.55),
    1600px 600px 0 0 rgba(255,255,255,0.5),
    1700px 520px 0 0 rgba(255,255,255,0.7),
    90px 700px 0 0 rgba(255,255,255,0.7),
    170px 620px 0 0 rgba(255,255,255,0.6),
    250px 750px 0 0 rgba(255,255,255,0.65),
    330px 680px 0 0 rgba(255,255,255,0.5),
    410px 800px 0 0 rgba(255,255,255,0.7),
    490px 720px 0 0 rgba(255,255,255,0.6),
    570px 850px 0 0 rgba(255,255,255,0.65),
    650px 780px 0 0 rgba(255,255,255,0.5),
    730px 900px 0 0 rgba(255,255,255,0.7),
    810px 820px 0 0 rgba(255,255,255,0.6),
    890px 950px 0 0 rgba(255,255,255,0.65),
    970px 880px 0 0 rgba(255,255,255,0.5),
    1100px 750px 0 0 rgba(255,255,255,0.7),
    1250px 820px 0 0 rgba(255,255,255,0.6),
    1400px 780px 0 0 rgba(255,255,255,0.55),
    1550px 850px 0 0 rgba(255,255,255,0.5);
  animation: twinkle-slow 12s ease-in-out infinite;
}

/* Layer 2: Medium bright stars */
.starfield-advanced::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow:
    /* Brighter scattered stars */
    180px 100px 0 0 rgba(255,255,255,0.6),
    400px 250px 0 0 rgba(255,255,255,0.5),
    620px 180px 0 0 rgba(255,255,255,0.55),
    840px 320px 0 0 rgba(255,255,255,0.45),
    1060px 150px 0 0 rgba(255,255,255,0.6),
    100px 450px 0 0 rgba(255,255,255,0.5),
    320px 580px 0 0 rgba(255,255,255,0.55),
    540px 420px 0 0 rgba(255,255,255,0.45),
    760px 650px 0 0 rgba(255,255,255,0.6),
    980px 480px 0 0 rgba(255,255,255,0.5),
    1200px 620px 0 0 rgba(255,255,255,0.55),
    220px 780px 0 0 rgba(255,255,255,0.45),
    440px 920px 0 0 rgba(255,255,255,0.6),
    660px 850px 0 0 rgba(255,255,255,0.5),
    880px 750px 0 0 rgba(255,255,255,0.55),
    1100px 890px 0 0 rgba(255,255,255,0.45),
    /* Accent colored stars */
    300px 200px 0 0 rgba(74,222,128,0.4),
    700px 400px 0 0 rgba(74,222,128,0.35),
    1000px 300px 0 0 rgba(74,222,128,0.4),
    500px 700px 0 0 rgba(74,222,128,0.35),
    900px 600px 0 0 rgba(74,222,128,0.4);
  animation: twinkle-medium 8s ease-in-out infinite;
}

@keyframes twinkle-slow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes twinkle-medium {
  0%, 100% { opacity: 0.6; }
  25% { opacity: 1; }
  50% { opacity: 0.5; }
  75% { opacity: 0.9; }
}

/* Hero section */
.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: var(--psifi-green);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.08;
  pointer-events: none;
}

.hero-logo-container {
  position: relative;
  margin-bottom: var(--space-lg);
  cursor: default;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  width: 100px;
  height: auto;
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.cursor-glow {
  position: absolute;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.6) 0%, rgba(74, 222, 128, 0.2) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  z-index: 1;
  filter: blur(10px);
}

.hero-logo-container:hover .cursor-glow {
  opacity: 1;
}

/* Double-slit diffraction pattern - quantum interference effect */
.diffraction-pattern {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 40px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.15s ease-out;
  z-index: 0;
  /* Interference pattern: bright center, alternating bands fading outward */
  background:
    /* Central bright band */
    linear-gradient(90deg,
      transparent 0%,
      transparent 42%,
      rgba(74, 222, 128, 0.8) 48%,
      rgba(74, 222, 128, 1) 50%,
      rgba(74, 222, 128, 0.8) 52%,
      transparent 58%,
      transparent 100%
    ),
    /* Secondary bands */
    repeating-linear-gradient(90deg,
      transparent 0px,
      transparent 20px,
      rgba(74, 222, 128, 0.4) 25px,
      rgba(74, 222, 128, 0.5) 30px,
      rgba(74, 222, 128, 0.4) 35px,
      transparent 40px,
      transparent 60px
    );
  filter: blur(2px);
  mask-image: linear-gradient(to bottom, transparent, white 30%, white 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, white 30%, white 70%, transparent);
}

.hero-logo-container:hover .diffraction-pattern {
  opacity: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

/* Section styles */
.section {
  padding: var(--space-xl) 0;
}

.section-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.section-header h1,
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 1rem;
  margin-left: auto;
  margin-right: auto;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, 0.2);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Click to copy card */
.color-swatch-card {
  cursor: pointer;
}

.click-to-copy-hint {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.75rem;
  transition: color 0.2s;
}

.color-swatch-card:hover .click-to-copy-hint {
  color: var(--accent);
}

.color-swatch-card.copied .click-to-copy-hint {
  color: var(--accent);
}

.color-swatch-card.copied .click-to-copy-hint::after {
  content: ' - Copied!';
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--text-main);
  color: var(--psifi-dark);
  border: 1px solid white;
}

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

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* Color swatches */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.color-swatch {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.color-swatch:hover,
.color-swatch:focus {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

.color-swatch:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.color-preview {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.color-preview::after {
  content: 'Click to copy';
  position: absolute;
  font-size: 0.75rem;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.color-swatch:hover .color-preview::after {
  opacity: 1;
}

.color-info {
  padding: var(--space-sm);
}

.color-name {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.color-hex {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.color-copied {
  color: var(--accent);
  font-size: 0.75rem;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.color-swatch.copied .color-copied {
  opacity: 1;
}

.color-swatch.copied .color-preview::after {
  content: 'Copied!';
  opacity: 1;
  background: var(--accent);
  color: var(--psifi-dark);
}

/* Logo previews */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

.logo-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg-card);
}

.logo-preview {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.logo-preview.dark-bg {
  background: var(--psifi-dark);
}

.logo-preview.light-bg {
  background: var(--brand-white);
}

.logo-preview.green-bg {
  background: var(--brand-green-bright);
}

.logo-preview img {
  max-width: 50%;
  max-height: 70%;
  object-fit: contain;
}

.logo-info {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.logo-format {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.logo-actions {
  display: flex;
  gap: var(--space-xs);
}

/* Typography showcase */
.type-sample {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.type-sample h3 {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.type-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

.type-alphabet {
  font-size: 1.25rem;
  letter-spacing: 2px;
  color: var(--text-subtle);
}

.type-weights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.type-weight {
  flex: 1;
  min-width: 150px;
}

.type-weight-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

/* Symbol section */
.symbol-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.symbol-visual {
  display: flex;
  justify-content: center;
}

.symbol-visual img {
  width: 200px;
  height: auto;
}

.symbol-meaning h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.symbol-meaning p {
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.symbol-values {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.symbol-value {
  background: rgba(74, 222, 128, 0.1);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Footer - matching main website */
.footer {
  padding: 5rem var(--space-md) 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--psifi-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 5rem;
}

.footer-brand {
  grid-column: span 1;
}

.footer-logo {
  height: 2rem;
  opacity: 0.6;
  filter: grayscale(1);
  margin-bottom: 1.5rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-list a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-list a:hover {
  color: var(--text-main);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-legal p {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.footer-corp {
  margin-top: 0.25rem;
  opacity: 0.6;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--text-subtle);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--text-main);
}

.footer-social svg {
  display: block;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: var(--psifi-dark);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Download all button */
.download-all {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}

/* Focus styles for keyboard accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: var(--shadow-glow);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-logo {
    animation: none;
  }

  .starfield,
  .starfield-advanced,
  .starfield::before,
  .starfield::after,
  .starfield-advanced::before,
  .starfield-advanced::after {
    animation: none;
    opacity: 0.3;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive - Mobile first fixes */
@media (max-width: 768px) {
  :root {
    /* Fixed mobile padding - 24px on all sides */
    --mobile-padding: 1.5rem;
  }

  html, body {
    overflow-x: hidden;
  }

  .nav {
    padding: var(--space-sm) var(--mobile-padding);
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(16px);
    padding: var(--space-md) var(--mobile-padding);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Animation */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links li {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.open li {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.25s; }

  .nav-menu-btn {
    display: block;
  }

  .container {
    padding-left: var(--mobile-padding) !important;
    padding-right: var(--mobile-padding) !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  main {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero {
    padding: var(--space-lg) var(--mobile-padding);
    text-align: center;
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding: var(--space-lg) 0;
  }

  /* Ensure all section content has proper spacing */
  .section.container {
    padding-left: var(--mobile-padding) !important;
    padding-right: var(--mobile-padding) !important;
    box-sizing: border-box;
  }

  .section.container > * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .section.container > h3,
  .section.container > h4,
  .section.container > p,
  .section.container > div {
    box-sizing: border-box;
  }

  .section-header {
    text-align: center;
    padding: 0;
  }

  .section-header p {
    padding: 0;
  }

  .symbol-showcase {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-md);
  }

  .symbol-visual {
    justify-content: center;
  }

  .symbol-visual img {
    width: 150px;
  }

  .symbol-meaning {
    padding: 0;
    text-align: center;
  }

  .symbol-meaning h3 {
    text-align: center;
  }

  .symbol-meaning p {
    text-align: center;
  }

  .symbol-values {
    justify-content: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .card {
    text-align: center;
    padding: var(--space-md);
  }

  .card-icon {
    margin-left: auto;
    margin-right: auto;
  }

  .logo-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .logo-card {
    margin: 0;
  }

  .color-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .type-sample {
    padding: var(--space-md);
  }

  .type-sample h3 {
    font-size: 1.75rem;
  }

  .type-alphabet {
    font-size: 1rem;
    word-break: break-all;
  }

  .type-weights {
    justify-content: center;
    gap: var(--space-sm);
  }

  .type-weight {
    min-width: 80px;
    flex: 0 0 auto;
  }

  .footer {
    padding: 3rem var(--mobile-padding) 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand {
    grid-column: span 1;
    text-align: center;
  }

  .footer-brand .footer-tagline {
    max-width: 100%;
    margin: 0 auto;
  }

  .footer-brand .footer-logo {
    margin: 0 auto 1.5rem;
  }

  .footer-column {
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  /* Fix inline styles bleeding on mobile */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  [style*="padding: 3rem"] {
    padding: 1.5rem var(--mobile-padding) !important;
  }

  [style*="padding: 2rem"] {
    padding: 1.25rem !important;
  }

  /* Ensure flex containers wrap properly */
  [style*="display: flex"] {
    flex-wrap: wrap !important;
  }

  /* Fix any divs with inline padding in containers */
  .section.container > div[style*="padding"] {
    margin-left: 0;
    margin-right: 0;
  }

  /* Make inline lists readable on mobile */
  .section.container ul[style] {
    padding-left: 1rem;
  }
}

/* ===========================================
   Utility Classes (replacing inline styles)
   =========================================== */

/* Section subheadings */
.section-subheading {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.section-subheading-sm {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.section-description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.section-subheading-muted {
  margin: 2rem 0 1rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.section-subheading-top {
  margin: 3rem 0 1.5rem;
  font-size: 1.25rem;
}

.section-subheading-top-sm {
  margin: 3rem 0 1rem;
  font-size: 1.25rem;
}

/* Info boxes */
.info-box {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
}

.info-box-sm {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
}

.info-box-heading {
  margin-bottom: 1rem;
}

.info-box-heading-lg {
  margin-bottom: 1.5rem;
}

.info-list {
  color: var(--text-muted);
  line-height: 2;
}

.info-list-nostyle {
  color: var(--text-muted);
  line-height: 2;
  list-style: none;
}

/* Text utilities */
.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.text-main {
  color: var(--text-main);
}

.text-error {
  color: #ef4444;
}

.mt-sm {
  margin-top: 0.5rem;
}

.mt-md {
  margin-top: 1rem;
}

.mt-lg {
  margin-top: 1.5rem;
}

/* Typography samples */
.type-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.font-weight-sample {
  font-size: 1.5rem;
}

.font-weight-300 { font-weight: 300; }
.font-weight-400 { font-weight: 400; }
.font-weight-500 { font-weight: 500; }
.font-weight-600 { font-weight: 600; }
.font-weight-700 { font-weight: 700; }

/* Quick reference cards (index.html) */
.pronunciation {
  font-size: 1.5rem;
  font-family: serif;
  margin-top: 0.5rem;
}

.color-preview-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.color-preview-box {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.code-lg {
  font-size: 1.125rem;
}

.font-name {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

/* Button grid */
.btn-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Logo preview heights */
.logo-preview-md {
  height: 140px;
}

.logo-preview-sm {
  height: 120px;
}

.logo-preview-lg {
  height: 200px;
}

.logo-preview-img-lg {
  max-width: 70%;
  max-height: 70%;
}

.logo-preview-img-xl {
  max-width: 80%;
  max-height: 90%;
}

.logo-preview-img-full {
  max-width: 90%;
  max-height: 90%;
}

/* Symbol page */
.italic-callout {
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Clear space demo */
.clear-space-demo {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 3rem;
  border: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

.clear-space-box {
  display: inline-block;
  position: relative;
  padding: 2rem;
  border: 2px dashed rgba(74, 222, 128, 0.3);
}

.clear-space-img {
  width: 80px;
  height: 80px;
}

.clear-space-label {
  position: absolute;
  font-size: 0.75rem;
  color: var(--accent);
}

.clear-space-label-top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.clear-space-label-bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.clear-space-label-left {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.clear-space-label-right {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.clear-space-caption {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Do's and Don'ts */
.dos-donts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.dos-donts-heading {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tables */
.brand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.brand-table thead tr {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-weight: 600;
}

.brand-table tbody {
  color: var(--text-muted);
}

.brand-table td {
  padding: 0.75rem 1rem;
}

.brand-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-table tbody tr:last-child {
  border-bottom: none;
}

.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  overflow-x: auto;
}

.table-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Color swatches - specific backgrounds */
.color-bg-solid-green { background: #54A44D; }
.color-bg-bright-lime { background: #77E36D; }
.color-bg-muted-green { background: #99EA92; }
.color-bg-black { background: #111111; }
.color-bg-cool-gray { background: #444442; }
.color-bg-clean-white { background: #F1F1F1; }
.color-bg-dark-bg { background: #0a0b0e; }
.color-bg-vibrant-green { background: #4ade80; }
.color-bg-deep-sea { background: #2e8b57; }

.color-preview-dark {
  border: 1px solid rgba(255,255,255,0.1);
}

/* Typography page - font families */
.font-versatylo {
  font-family: 'Comfortaa', cursive; /* Versatylo fallback */
}

.font-comfortaa {
  font-family: 'Comfortaa', cursive;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

/* Landing page specific - Comfortaa font for headings */
.hero h1,
.section-header h2,
.card h3 {
  font-family: 'Comfortaa', cursive;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* Extra small devices */
@media (max-width: 400px) {
  :root {
    --mobile-padding: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section-header h1,
  .section-header h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.8125rem;
  }

  .type-sample h3 {
    font-size: 1.5rem;
  }

  .type-alphabet {
    font-size: 0.875rem;
  }
}
