:root {
  --accent: #e07a1f;
  --accent-dim: #a15513;
}

[data-bs-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f5f2;
  --text-primary: #1f2428;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] {
  --bg-primary: #15181c;
  --bg-secondary: #1c2026;
  --text-primary: #e9ecef;
  --text-muted: #adb5bd;
  --border-color: #2d333b;
  --card-bg: #1f242b;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

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

html, body { margin: 0; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s, color 0.3s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent); }
a:hover { color: var(--accent-dim); }

.accent { color: var(--accent); }
.accent-dim { color: var(--accent-dim); }
.bg-alt { background-color: var(--bg-secondary); }

/* --- Navigation --- */
.site-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.site-nav .navbar-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  font-size: 1.25rem;
}
.site-nav .navbar-brand .accent-to { color: var(--accent); font-weight: 400; font-style: italic; padding: 0 0.25rem; }
.site-nav .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  transition: color 0.2s;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active { color: var(--accent); }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #111;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45) saturate(1.1);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 4rem 0;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 680px;
  color: rgba(255,255,255,0.85);
}

/* --- Page header (non-hero pages) --- */
.page-header {
  padding: 4rem 0 2rem;
  text-align: center;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.page-header p.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* --- Section headings --- */
.section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 2rem;
  display: inline-block;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* --- Feature rows (home) --- */
.feature-row {
  padding: 4.5rem 0;
}
.feature-row img.feature-img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
}

/* --- Buttons --- */
.btn-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 0.4rem;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.btn-accent:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #fff;
}
.btn-accent:active { transform: translateY(1px); }
.btn-outline-accent {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 0.4rem;
  transition: background 0.2s, color 0.2s;
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Material / machine cards --- */
.material-card,
.machine-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  height: 100%;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.material-card:hover,
.machine-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.material-card h4,
.machine-card h4 {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.material-card .subtitle,
.machine-card .subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}
.material-card p,
.machine-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
  color: var(--text-primary);
}

.material-group {
  margin-bottom: 3.5rem;
}
.material-group .group-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.machine-card .tagline {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.machine-card .spec-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.machine-card .spec-list li {
  padding: 0.2rem 0;
  border-top: 1px solid var(--border-color);
}
.machine-card .spec-list li:first-child { border-top: none; }
.machine-card .spec-list strong { color: var(--text-primary); font-weight: 600; }

/* --- Contact CTA --- */
.contact-cta {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
}
.contact-cta h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}
.contact-cta .btn-contact {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 0.4rem;
  border: none;
  transition: transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}
.contact-cta .btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  color: var(--accent-dim);
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
