/*
 * FORMETRA3D DESIGN SYSTEM
 * Design Movement: Structured Industrial Confidence
 * Typography: Syne (display) + Source Serif 4 (body) + Roboto Condensed (labels/specs)
 * Color: Warm white bg, steel charcoal (#1C2333), bright blue (#47b0ed)
 * Layout: Asymmetric, horizontal rule section dividers, numbered workflow
 */

/* ========================================
   CSS VARIABLES & DESIGN TOKENS
   ======================================== */
:root {
  /* Brand Colors */
  --brand-charcoal: #1C2333;
  --brand-charcoal-light: #2a3449;
  --brand-blue: oklch(62% .18 250);
  --brand-blue-dark: oklch(52% .18 250);
  --brand-warm-white: #FAFAF8;
  --brand-orange: #c45c3e;
  --brand-orange-light: #d47252;
  
  /* Semantic Colors */
  --color-background: #FAFAF8;
  --color-foreground: #1C2333;
  --color-card: #ffffff;
  --color-card-foreground: #1C2333;
  --color-primary: oklch(62% .18 250);
  --color-primary-foreground: #ffffff;
  --color-secondary: #f5f5f3;
  --color-secondary-foreground: #1C2333;
  --color-muted: #f5f5f3;
  --color-muted-foreground: #6b7280;
  --color-accent: #f5f5f3;
  --color-accent-foreground: #1C2333;
  --color-destructive: #ef4444;
  --color-destructive-foreground: #ffffff;
  --color-border: #e5e7eb;
  --color-input: #e5e7eb;
  --color-ring: oklch(62% .18 250);
  
  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-label: 'Roboto Condensed', sans-serif;
  
  /* Spacing */
  --radius: 0.25rem;
  --container-max: 1280px;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
  box-sizing: border-box;
  border-color: var(--color-border);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

/* ========================================
   TYPOGRAPHY UTILITIES
   ======================================== */
.font-display {
  font-family: var(--font-display);
}

.font-body {
  font-family: var(--font-body);
}

.font-label {
  font-family: var(--font-label);
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: var(--container-max);
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: white;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  border: 2px solid var(--color-primary);
  transition: background-color 0.2s, transform 0.1s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
}

.btn-primary:active {
  background-color: #217bb0;
  border-color: #217bb0;
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--brand-charcoal);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  border: 2px solid var(--brand-charcoal);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--brand-charcoal);
  color: white;
}

.btn-secondary.border-white {
  border-color: white;
  color: white;
}

.btn-secondary.border-white:hover {
  background-color: white;
  color: var(--brand-charcoal);
}

/* ========================================
   SECTION DIVIDERS
   ======================================== */

.section-divider {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.section-divider::before {
  content: '';
  display: block;
  height: 2px;
  width: 3rem;
  background-color: var(--brand-blue);
  margin-right: 1rem;
  flex-shrink: 0;
}
.section-divider::after {
  content: '';
  display: block;
  height: 1px;
  background-color: var(--color-border);
  margin-left: 1rem;
  flex: 1 1 0%;
  min-width: 0;
}

.section-label {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}

.section-label.text-gray-500 {
  color: #6b7280;
}

.section-label.text-gray-600 {
  color: #4b5563;
}

/* ========================================
   INDUSTRIAL CARDS
   ======================================== */
.industrial-card {
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.industrial-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ========================================
   SPEC LABELS
   ======================================== */
.spec-label {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ========================================
   HEADING ACCENT
   ======================================== */
.heading-accent {
  position: relative;
  padding-left: 1.5rem;
}

.heading-accent::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.25em;
  width: 3px;
  border-radius: 2px;
  background-color: var(--brand-blue);
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */
.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand-charcoal);
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

/* ========================================
   MOBILE MENU
   ======================================== */
.mobile-menu {
  display: none;
  background-color: white;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand-charcoal);
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  border-left-color: var(--color-primary);
  color: var(--color-primary);
  background-color: #fff7ed;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ========================================
   SCROLLED HEADER
   ======================================== */
header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-brand-charcoal {
  color: var(--brand-charcoal);
}

.text-brand-blue {
  color: var(--brand-blue);
}

.bg-brand-charcoal {
  background-color: var(--brand-charcoal);
}

.bg-brand-blue {
  background-color: var(--brand-blue);
}

.bg-warm-white {
  background-color: var(--brand-warm-white);
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 92, 62, 0.1);
}

.form-label {
  display: block;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
  margin-bottom: 0.375rem;
}

.form-select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ========================================
   TABLE STYLES
   ======================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.625rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  background-color: var(--color-muted);
}

.data-table tr:nth-child(even) {
  background-color: var(--color-muted);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 1023px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none !important;
  }
}
