/* mechanicalmonitoring.com homepage stylesheet */
/* Blue theme: --primary var(--primary) / --primary-dark var(--primary-dark) / --primary-light var(--primary-light) */

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

/* ─── COLOR VARIABLES ──────────────────────────────────────────
   electricalmonitoring.com homepage stylesheet — self-contained, no external dependencies.
   --primary, --primary-dark, --primary-light,
   --primary-200, --primary-300, --primary-400
   All other tokens (text, bg, border, spacing) are shared.
   ────────────────────────────────────────────────────────────── */
:root {
  /* Shared tokens (same for all domains) */
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text:           #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --bg:             #ffffff;
  --bg-subtle:      #f8fafc;
  --border:         #e2e8f0;
  --max-width:      1100px;

  /* Domain colors (electricalmonitoring.com) */
  --primary:        #EA580C;
  --primary-dark:   #C2410C;
  --primary-light:  #FFF7ED;
  --primary-200:    #fed7aa;
  --primary-300:    #fdba74;
  --primary-400:    #fb923c;
}

html { scroll-behavior: smooth; }

/* Lucide icon sizing — force all icon SVGs to fixed size */
svg.lucide, .lucide { width: 24px !important; height: 24px !important; display: inline-block !important; flex-shrink: 0; }
.benefit-icon svg.lucide { width: 28px !important; height: 28px !important; }
.topic-card svg.lucide { width: 20px !important; height: 20px !important; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }

/* ─── Nav ───────────────────────────────────────────────────────── */
nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

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

.tractian-badge {
  font-size: 11px;
  background: #f1f5f9;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ─── Layout Helpers ────────────────────────────────────────────── */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 48px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 80px 32px 0;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
}


.hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 760px;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  max-width: 620px;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  padding: 13px 26px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.65);
  padding: 13px 26px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  text-decoration: none;
}

/* Stats bar */
.hero-stats {
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  gap: 0;
}

.hero-stat {
  flex: 1;
  padding: 20px 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  position: relative;
}

.hero-stat + .hero-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255,255,255,0.2);
}

.hero-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

@media (max-width: 600px) {
  .hero-stats { flex-direction: column; }
  .hero-stat + .hero-stat::before { display: none; }
  .hero-stat { padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.15); }
}

/* ─── Definition Section ────────────────────────────────────────── */
#definition {
  background: #fff;
}

.definition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 768px) {
  .definition-grid { grid-template-columns: 1fr; gap: 36px; }
}

#definition h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

#definition p {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--text-secondary);
}

/* SVG diagram */
.definition-diagram {
  background: var(--primary-light);
  border: 1px solid var(--primary-200);
  border-radius: 12px;
  padding: 28px 24px;
}

.definition-diagram svg {
  width: 100%;
  height: auto;
}

/* ─── Benefits ──────────────────────────────────────────────────── */
#benefits {
  background: var(--bg-subtle);
}

#benefits h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}

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

@media (max-width: 900px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .benefits-grid { grid-template-columns: 1fr; }
}

.benefit-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.benefit-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 16px rgba(37,99,235,0.08);
}

.benefit-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--primary);
}

.benefit-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ─── Learning Journey ──────────────────────────────────────────── */
#learn {
  background: #0f172a;
  padding: 48px 0;
}

#learn .section-label {
  color: var(--primary-400);
}

#learn h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.journey-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 44px;
}

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

@media (max-width: 860px) {
  .journey-grid { grid-template-columns: 1fr; }
}

.journey-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 28px;
  transition: background 0.2s, border-color 0.2s;
}

.journey-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.journey-stage {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-400);
  margin-bottom: 4px;
}

.journey-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.journey-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 20px;
}

.journey-links {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
}

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

.journey-links a {
  font-size: 13px;
  color: var(--primary-300);
  text-decoration: none;
  transition: color 0.15s;
}

.journey-links a:hover {
  color: var(--primary-200);
  text-decoration: underline;
}

.journey-cta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Stage number badge */
.journey-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ─── Key Concepts (Accordion) ──────────────────────────────────── */
#concepts {
  background: #fff;
}

#concepts h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.concepts-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}

.accordion-btn:hover {
  background: var(--bg-subtle);
}

.accordion-btn[aria-expanded="true"] {
  color: var(--primary);
  background: var(--primary-light);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.accordion-btn[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.accordion-body {
  display: none;
  padding: 4px 22px 20px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.72;
}

.accordion-body.open {
  display: block;
}

/* ─── Topics Grid ───────────────────────────────────────────────── */
#topics {
  background: var(--bg-subtle);
}

#topics h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.topics-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.topics-grid {
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1000px) {
  .topics-grid {
  padding-top: 12px; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .topics-grid {
  padding-top: 12px; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .topics-grid {
  padding-top: 12px; grid-template-columns: 1fr; }
}

.topic-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.topic-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,99,235,0.1);
  text-decoration: none;
}

.topic-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.topic-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.topic-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ─── Tractian CTA Block ────────────────────────────────────────── */
#cta {
  background: #fff;
  padding: 48px 0;
}

.tractian-cta {
  background: var(--primary);
  color: #fff;
  padding: 52px 48px;
  border-radius: 16px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.tractian-cta h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.tractian-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.tractian-cta a {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 13px 30px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.tractian-cta a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  text-decoration: none;
}

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
  padding: 24px 32px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

footer strong {
  color: rgba(255,255,255,0.9);
}

footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

footer a:hover {
  color: #fff;
}

/* ─── Utility ───────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ─── Mobile Nav ────────────────────────────────────────────────── */
@media (max-width: 700px) {
  nav { padding: 0 20px; }
  .nav-links { gap: 12px; }
  .nav-links li:nth-child(3), .nav-links li:nth-child(4) { display: none; }
  .section-inner { padding: 0 20px; }
  section { padding: 52px 0; }
  .hero { padding: 60px 20px 0; }
  .tractian-cta { padding: 36px 24px; }
  footer { padding: 20px; }
}

/* Lucide icon size constraint */
svg[data-lucide], i[data-lucide] { width:24px; height:24px; flex-shrink:0; display:inline-block; }
.card-icon svg[data-lucide], .card-icon i[data-lucide] { width:32px; height:32px; }
.topic-card svg[data-lucide], .topic-card i[data-lucide] { width:28px; height:28px; }

/* Featured topic cards */
.topic-card--featured {
  border-color: var(--primary);
  position: relative;
}
.topic-card--featured::before {
  content: 'Start here';
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}

/* Details/Summary Accordion */
details { border-bottom: 1px solid var(--border); }
summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--text); }
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
.summary-content { display: flex; align-items: center; gap: 10px; }
.summary-title { font-size: 15px; font-weight: 600; }
.summary-chevron { width: 20px !important; height: 20px !important; flex-shrink: 0; transition: transform 0.2s; color: var(--text-muted); }
details[open] .summary-chevron { transform: rotate(180deg); }
.concept-body { padding: 0 4px 20px; color: var(--text-secondary); line-height: 1.75; font-size: 15px; }
.concept-abbr { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; min-width: 36px; text-align: center; }
.concepts-list { margin-top: 32px; }

