/* 
 * TEMS ELEKTRİK | Schneider Electric Automation Distribution Turkey
 * Designed under strict adherence to taste-skill & utilitarian minimalism directives.
 * Palette: Pure Monochrome Graphite + Authentic Schneider Electric Industrial Green (#00A344).
 */

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

:root {
  --bg-primary: #090B0E;
  --bg-secondary: #0E1217;
  --bg-elevated: #141A20;
  --bg-surface: #1A222B;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-highlight: rgba(0, 163, 68, 0.35);
  
  --text-primary: #F2F5F8;
  --text-secondary: #94A1B0;
  --text-muted: #5C6775;
  --text-inverse: #090B0E;
  
  --accent: #00A344;
  --accent-hover: #00BF50;
  --accent-dim: rgba(0, 163, 68, 0.12);
  --accent-glow: rgba(0, 163, 68, 0.22);
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Light Mode Overrides for accessibility & dual-mode preference */
[data-theme="light"] {
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-elevated: #F1F3F5;
  --bg-surface: #E9ECEF;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);
  --border-highlight: rgba(0, 163, 68, 0.45);
  
  --text-primary: #12161A;
  --text-secondary: #556270;
  --text-muted: #8391A0;
  --text-inverse: #FFFFFF;
  
  --accent: #008A39;
  --accent-hover: #00A344;
  --accent-dim: rgba(0, 163, 68, 0.08);
  --accent-glow: rgba(0, 163, 68, 0.15);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  line-height: 1.5;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* Typography Directives (taste-skill 4.1) */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

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

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

/* Navigation - Single line desktop, height capped <= 72px (taste-skill 4.7) */
.header-nav {
  height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(9, 11, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="light"] .header-nav {
  background: rgba(248, 249, 250, 0.9);
}

.nav-container {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-highlight);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
  padding: 0.375rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Button & CTA Directives (taste-skill 4.5 & WCAG AA) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.84375rem;
  font-weight: 500;
  padding: 0.5625rem 1.125rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
  line-height: 1.2;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--accent);
  color: #FFFFFF;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .btn-secondary:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 0.4rem 0.85rem;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Layout Utilities (taste-skill 3.E) */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Grid & Bento Architecture (taste-skill 4.4 & 4.7) */
.grid-hairline {
  display: grid;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--border-subtle);
  gap: 1px;
}

.grid-cell {
  background-color: var(--bg-secondary);
  padding: 2rem;
  transition: background-color 0.2s ease;
}

.grid-cell:hover {
  background-color: var(--bg-elevated);
}

/* Hero Section (taste-skill 4.7 viewport fit, max 4 stack elements) */
.hero-section {
  min-height: calc(100dvh - 64px);
  display: flex;
  align-items: center;
  padding: 2.5rem 0 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Eyebrow Restraint (taste-skill 4.7: max 1 per 3 sections) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent);
}

.hero-title {
  font-size: 2.875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  max-width: 22ch;
}

.hero-subtext {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 48ch;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.hero-asset-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-secondary);
  aspect-ratio: 16 / 10;
}

.hero-asset-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-spec-overlay {
  position: absolute;
  bottom: 0.875rem;
  left: 0.875rem;
  right: 0.875rem;
  padding: 0.625rem 0.875rem;
  background: rgba(9, 11, 14, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  color: var(--text-secondary);
}

/* Status / Metric Strip (Under Hero, taste-skill 4.7) */
.status-strip {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 1.25rem 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.status-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Sections General */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  margin-bottom: 3rem;
  max-width: 620px;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Feature Matrix - Asymmetric bento / hairline grid (taste-skill 2.B) */
.matrix-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--border-subtle);
  gap: 1px;
}

.matrix-card {
  background-color: var(--bg-secondary);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: background-color 0.2s ease;
}

.matrix-card:hover {
  background-color: var(--bg-elevated);
}

.matrix-code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-highlight);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  width: fit-content;
}

.matrix-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.matrix-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Hardware Catalog / Series Matrix (Utilitarian layout) */
.series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.series-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.series-card:hover {
  border-color: var(--border-medium);
}

.series-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.series-name {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.series-models {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.model-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Forms & Data Fields (taste-skill 4.6 & WCAG AA) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.84375rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
}

.form-label-hint {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 0.6875rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-elevated);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}

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

/* Logistics / Verification Split (About page) */
.split-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.split-feature.reverse {
  direction: rtl;
}

.split-feature.reverse > * {
  direction: ltr;
}

.feature-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.feature-img-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Footer (taste-skill single intent, no slop) */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 3.5rem 0 2rem;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.footer-links a {
  font-size: 0.84375rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78125rem;
  color: var(--text-muted);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* Responsive Directives (taste-skill 3.E) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .matrix-4col {
    grid-template-columns: repeat(2, 1fr);
  }
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .split-feature {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.125rem;
  }
  .matrix-4col {
    grid-template-columns: 1fr;
  }
  .series-grid {
    grid-template-columns: 1fr;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
