/* 
 * BitStation - CSS Stylesheet
 * Vintage Engineering Tech Catalog & Grid Aesthetic
 */

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

:root {
  /* Vintage Paper Palette */
  --bg-main: #f5f4f0;       /* Textured Warm Paper */
  --bg-card: #FAF9F6;       /* Warm White */
  --border-color: #2e2e2a;  /* Deep Charcoal-Brown */
  
  --color-orange: #f97316;  /* Retro Engineering Orange */
  --color-amber: #d97706;   /* Vintage Terminal Amber */
  --color-green: #15803d;   /* Technical Forest Green */
  --color-slate: #475569;   /* Slate Gray */
  
  --text-main: #2e2e2a;
  --text-muted: #6e6e6a;
  --text-light: #faf9f6;

  /* Font Families */
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Grids and Borders */
  --border-crisp: 1.5px solid var(--border-color);
  --border-thin: 1px solid rgba(46, 46, 42, 0.2);
  --border-radius: 4px; /* Industrial tight corners */
  
  /* Micro Elevations */
  --shadow-flat: 4px 4px 0px var(--border-color);
  --shadow-hover: 6px 6px 0px var(--border-color);
  --shadow-active: 1px 1px 0px var(--border-color);
  
  --max-width: 1140px;
  --transition-smooth: 0.15s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-heading);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 60px;
}

/* Custom Tech Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
  border-left: var(--border-crisp);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border: 1px solid var(--bg-main);
}

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

.section-spacing {
  padding: 60px 0;
  border-bottom: var(--border-crisp);
}

/* Utility Grid Details */
.grid-bg {
  background-image: radial-gradient(rgba(46, 46, 42, 0.15) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  text-transform: uppercase;
}

h2 {
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--color-orange);
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
}

/* Technical Label Tags */
.tech-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-orange);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.tech-label::before {
  content: '■';
  font-size: 0.65rem;
}

.meta-info {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
}

/* Navigation Header */
header {
  border-bottom: var(--border-crisp);
  background: var(--bg-card);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-symbol {
  width: 24px;
  height: 24px;
  border: var(--border-crisp);
  background: var(--color-orange);
  border-radius: 50%;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
}

nav a:hover,
nav a.active {
  border: var(--border-crisp);
  background: var(--bg-main);
  box-shadow: 2px 2px 0px var(--border-color);
}

/* Mobile drawer toggle */
.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: var(--border-crisp);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: var(--border-radius);
}

/* Hero Section */
.hero {
  border-bottom: var(--border-crisp);
  padding: 70px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-img-container {
  border: var(--border-crisp);
  background: var(--bg-card);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-flat);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.05);
}

/* Technical Styled Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--bg-card);
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  cursor: pointer;
  box-shadow: var(--shadow-flat);
  transition: var(--transition-smooth);
}

.btn:hover {
  box-shadow: var(--shadow-hover);
  transform: translate(-2px, -2px);
}

.btn:active {
  box-shadow: var(--shadow-active);
  transform: translate(1px, 1px);
}

.btn-orange {
  background: var(--color-orange);
  color: var(--text-light);
}

.btn-orange:hover {
  background: #ea580c;
}

.btn-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Technical Catalog Card */
.tech-card {
  background: var(--bg-card);
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-flat);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.tech-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translate(-2px, -2px);
}

.tech-card-header {
  border-bottom: var(--border-thin);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.tech-card-footer {
  border-top: var(--border-thin);
  padding-top: 12px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* Search and Filter Panel */
.catalog-control-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: var(--border-crisp);
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex-grow: 1;
  max-width: 360px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-main);
  color: var(--text-main);
}

.search-box input:focus {
  outline: none;
  background: white;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-main);
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: white;
}

.filter-btn.active {
  background: var(--color-orange);
  color: white;
}

/* Custom Editorial Rating Meter */
.meter-row {
  margin-bottom: 12px;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.meter-track {
  height: 8px;
  background: var(--bg-main);
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: var(--color-orange);
}

/* Technical Schematics Walkthrough */
.schematic-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.schematic-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  border: var(--border-crisp);
  background: var(--bg-card);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.schematic-num::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  width: 20px;
  height: 1.5px;
  background: var(--border-color);
}

.schematic-info {
  background: var(--bg-card);
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-flat);
}

/* Input Form Controls */
.form-card {
  background: var(--bg-card);
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-flat);
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-main);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  background: white;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  padding: 12px;
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  display: none;
}

.form-status.success {
  background: #dcfce7;
  color: #15803d;
  display: block;
}

.form-status.error {
  background: #fee2e2;
  color: #b91c1c;
  display: block;
}

/* Footer layout */
footer {
  border-top: var(--border-crisp);
  background: var(--bg-card);
  padding: 50px 0 20px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-orange);
  padding-left: 4px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.newsletter-form .form-control {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.newsletter-form .btn {
  padding: 8px 14px;
  box-shadow: 2px 2px 0px var(--border-color);
}

.footer-bottom {
  border-top: var(--border-thin);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 32px;
  height: 32px;
  border: var(--border-crisp);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  transition: var(--transition-smooth);
}

.social-btn svg {
  width: 14px;
  height: 14px;
  fill: var(--text-main);
}

.social-btn:hover {
  background: var(--color-orange);
}

.social-btn:hover svg {
  fill: white;
}

/* Responsive Queries */
@media (max-width: 992px) {
  h1 { font-size: 2.5rem; }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.1rem; }
  
  h2 { font-size: 1.6rem; }
  
  .mobile-menu-btn {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-card);
    border-top: var(--border-crisp);
    padding: 30px 24px;
    z-index: 999;
    transition: var(--transition-smooth);
  }
  
  nav.active {
    left: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 20px;
  }
  
  nav a {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    padding: 10px;
  }
  
  .grid-3, .grid-2, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .catalog-control-panel {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    max-width: 100%;
  }
  
  .schematic-step {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .schematic-num::after {
    display: none;
  }
  
  .schematic-num {
    height: 40px;
  }
}
