:root {
  --bg: #030304;
  --text: #ffffff;
  --text-dim: #999999;
  --accent: #D4AF37; /* Gold */
  
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --gap: 20px; /* Gap between bento cards */
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  /* Ensure text sharpness on all monitors */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Film Grain Noise --- */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; /* Subtle grain */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1 {
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
  /* ISSUE 1 FIX: Solid White for Sharpness */
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: initial;
  text-shadow: 0 10px 40px rgba(0,0,0,0.6); /* Depth via shadow, not gradient */
}

h2 { font-size: 3rem; letter-spacing: -0.03em; margin-bottom: 1rem; color: #fff; }
h3 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 1rem; color: #fff; }
h4 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: #fff; }

p { font-size: 1.1rem; line-height: 1.6; color: var(--text-dim); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
  background: rgba(212, 175, 55, 0.05);
}

/* --- Navigation --- */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 20px 40px;
  /* ISSUE 2 FIX: Frosted Glass instead of Mix-Blend-Mode */
  background: rgba(3, 3, 4, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
}
.brand { font-weight: 800; text-decoration: none; color: white; letter-spacing: -0.02em; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-link { text-decoration: none; color: #ccc; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-link:hover { color: #fff; }

/* --- Buttons --- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 32px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}
.button.primary { background: #fff; color: #000; border: none; }
.button.primary:hover { transform: scale(1.02); box-shadow: 0 0 30px rgba(255,255,255,0.2); }

.button.small { padding: 10px 20px; font-size: 0.85rem; }
.button.glass {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
}
.button.glass:hover { background: rgba(255,255,255,0.2); }

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5vw;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  /* Fade heavy at bottom to blend into grid */
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}
.hero-overlay {
  position: absolute; inset: 0;
  /* Radial vignette to focus center */
  background: radial-gradient(circle at center, transparent 0%, var(--bg) 90%);
}

.hero-content { max-width: 900px; padding-top: 10vh; }
.hero-sub { max-width: 500px; margin-bottom: 40px; font-size: 1.25rem; }

/* --- Bento Grid Section --- */
.grid-section { padding: 5vw; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 400px 300px;
  gap: var(--gap);
}

.card {
  background: #0f0f11;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.card:hover { 
  transform: translateY(-5px); 
  border-color: rgba(255,255,255,0.2);
}

.text-card {
  grid-column: span 1;
  padding: 40px;
  display: flex; flex-direction: column; justify-content: flex-end;
}

.image-card { position: relative; }
.image-card:nth-child(2) { grid-column: span 2; }
.image-card:nth-child(3) { grid-column: span 2; }

.cover-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s ease;
  opacity: 0.9;
}
.card:hover .cover-img { transform: scale(1.05); opacity: 1; }

.card-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%;
  padding: 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, transparent 100%);
  z-index: 2;
}

.stat-card {
  grid-column: span 1;
  padding: 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 12px;
}
.stat-val { font-family: var(--font-mono); color: #fff; font-weight: 500; }

/* --- Notify Section --- */
.notify-section {
  padding: 100px 5vw;
  display: flex; justify-content: center;
  text-align: center;
}
.notify-container { max-width: 500px; width: 100%; }
.notify-sub { margin-bottom: 40px; }

.input-group {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.input-glass {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 16px; border-radius: 8px;
  color: #fff; outline: none;
  font-family: var(--font-mono);
}
.input-glass:focus { border-color: var(--accent); }

.toggles { display: flex; justify-content: center; gap: 30px; margin-top: 20px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { display: none; }
.toggle-box {
  width: 16px; height: 16px; border: 1px solid #555; display: block;
}
.toggle input:checked + .toggle-box { background: var(--accent); border-color: var(--accent); }

/* ISSUE 4 FIX: Status Message Styling */
.status {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 20px;
}

.footer { padding: 40px 5vw; border-top: 1px solid #111; }
.footer-inner { display: flex; justify-content: space-between; opacity: 0.5; }
.footer-links { display: flex; gap: 20px; }
.footer a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
.footer a:hover { opacity: 1; }

/* --- Animations --- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- Bento Grid Refinements --- */

/* 1. Dim Labels (Philosophy & Spec Header) */
.label-dim {
  color: #666;
  margin-bottom: 12px;
  display: block;
}

/* 2. Stat Header Styling */
.stat-header {
  margin-bottom: 24px;
}
.stat-header h4 {
  font-size: 1.2rem;
  margin-top: 4px;
  color: #fff;
}

/* 3. Image Specific Positioning */
/* Mantis: Center focus */
.img-mantis {
  object-position: center;
}
/* Iron: Top-Center focus (to catch the spine) */
.img-iron {
  object-position: center top;
}

/* 4. Card Description Text */
.card-desc {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 6px;
  line-height: 1.4;
  font-weight: 400;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .card { grid-column: span 1 !important; min-height: 300px; }
  h1 { font-size: 3.5rem; }
  .hero { height: auto; min-height: 90vh; padding-top: 150px; }
  .nav { padding: 20px; }
  
  /* 5. Mobile Image Adjustments */
  .img-iron {
    object-position: center; /* Reset for mobile vertical stacking */
  }
}
