/* =========================================================================
   BINARY VERSE - Premium Design System
   ========================================================================= */

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

/* --- CSS Variables & Theming --- */
:root {
  /* Light Mode Palette */
  --color-bg: #FFFFFF;
  --color-text: #0F172A;
  --color-text-muted: #475569;
  --color-surface: #F8FAF9;
  --color-surface-elevated: #FFFFFF;
  --color-border: rgba(31, 94, 58, 0.1);
  --color-primary: #15803D; /* Vibrant Green */
  --color-primary-dark: #0A2E22;
  --color-accent: #22C55E;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 24px -8px rgba(10, 46, 34, 0.15);
  --shadow-lg: 0 24px 48px -12px rgba(10, 46, 34, 0.25);
  --shadow-glow: 0 0 24px rgba(34, 197, 94, 0.2);

  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
  /* Dark Mode Palette - Million Dollar Tech Aesthetic */
  --color-bg: #030806;
  --color-text: #F8FAFC;
  --color-text-muted: #94A3B8;
  --color-surface: #09140E;
  --color-surface-elevated: #112017;
  --color-border: rgba(34, 197, 94, 0.15);
  --color-primary: #22C55E;
  --color-primary-dark: #15803D;
  --color-accent: #4ADE80;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 32px rgba(34, 197, 94, 0.15);

  --glass-bg: rgba(9, 20, 14, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary-dark);
  border-radius: 4px;
}

/* --- Layout & Utilities --- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 8rem 0;
  position: relative;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-text), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, #FFFFFF, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
}

/* --- Components --- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 64px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-primary-dark);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .btn-primary {
  background: var(--color-primary);
  color: #000000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--color-primary);
}
[data-theme="dark"] .btn-primary:hover {
  background: var(--color-accent);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(34, 197, 94, 0.05);
}

/* Navbar */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}
.navbar-wrapper.scrolled {
  padding: 12px 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo svg {
  width: 28px;
  height: 28px;
  fill: var(--color-primary);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
  color: var(--color-primary);
}
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px; /* Offset for navbar */
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  object-fit: cover;
  opacity: 0.15;
  transition: opacity 0.5s ease;
}
[data-theme="dark"] .hero-bg {
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--color-bg) 80%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.badge i {
  font-size: 0.7rem;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--color-text-muted);
  font-weight: 400;
  margin-bottom: 3rem;
  max-width: 680px;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Sections Common */
.section-header {
  text-align: center;
  margin-bottom: 5rem;
  max-width: 700px;
  margin-inline: auto;
}
.section-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.pillar-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  padding: 40px;
  border-radius: 24px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity 0.4s;
}
.pillar-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}
.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-primary);
  font-size: 1.8rem;
}

.pillar-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.pillar-card p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* Manifesto / About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.metric-box {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  padding: 32px 24px;
  border-radius: 24px;
  text-align: center;
}
.metric-value {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.metric-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Case Studies */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 40px;
}
.case-card {
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}
.case-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.case-visual {
  height: 240px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.case-visual svg {
  width: 80px;
  height: 80px;
  opacity: 0.8;
  color: var(--color-primary);
}
.case-visual::after {
  content: '';
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: radial-gradient(circle at center, var(--color-border) 0%, transparent 70%);
}

.case-content {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.case-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-primary);
  background: rgba(34, 197, 94, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  align-self: flex-start;
  margin-bottom: 20px;
}

.case-content h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.case-content p {
  color: var(--color-text-muted);
  margin-bottom: 32px;
  flex-grow: 1;
}

.link-arrow {
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.link-arrow:hover {
  gap: 12px;
}

/* Contact Section */
.contact-wrapper {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 32px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  box-shadow: var(--shadow-md);
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 24px;
}
.contact-info p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.contact-direct {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid var(--color-border);
  padding: 32px;
  border-radius: 20px;
}
.contact-direct a {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 12px;
}

.form-group {
  margin-bottom: 24px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  transition: all 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
}

/* Animations Core */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid, .contact-wrapper {
    grid-template-columns: 1fr;
  }
  .contact-wrapper {
    padding: 40px 24px;
  }
}
@media (max-width: 768px) {
  .hero-actions {
    flex-direction: column;
  }
  .nav-links {
    display: none; /* simple mobile behavior for now */
  }
  section {
    padding: 5rem 0;
  }
}
