/* PreFabControl — Clean Industrial Aesthetic */
:root {
  --navy: #00005d;
  --navy-light: #0c0c7a;
  --slate: #2c3450;
  --steel: #4a5a74;
  --silver: #8f98b3;
  --light: #eaecf4;
  --white: #f8f9fb;
  --accent: #2865ff;
  --accent-dark: #1a4fcc;
  --accent-light: #5a8cff;
  --red: #ff3a3d;
  --green: #22c55e;
  --orange: #f59e0b;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { color: var(--slate); font-size: 1.05rem; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 800px; }

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 249, 251, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 2rem;
  color: var(--navy);
  text-decoration: none;
}
.logo-icon {
  width: 81px;
  height: 81px;
  object-fit: contain;
}
.nav-links { display: flex; align-items: center; gap: .2rem; list-style: none; }
.nav-links a {
  padding: .5rem .85rem;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--slate);
  transition: background .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.active { background: rgba(40,101,255,.08); color: var(--accent); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: .55rem 1.3rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--accent-dark) !important; }

/* Nav Dropdowns */
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a::after {
  content: ' \25BE';
  font-size: .7em;
  opacity: .5;
  margin-left: .15rem;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.10);
  border: 1px solid rgba(0,0,0,.06);
  padding: .5rem 0;
  list-style: none;
  z-index: 110;
}
.nav-has-dropdown:hover > .nav-dropdown,
.nav-has-dropdown:focus-within > .nav-dropdown {
  display: block;
}
.nav-dropdown a {
  display: block;
  padding: .5rem 1.2rem !important;
  white-space: nowrap;
  border-radius: 0 !important;
}
.nav-dropdown a:hover {
  background: rgba(40,101,255,.06) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: .5rem;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; padding: .8rem 1rem; }
  .nav-has-dropdown > a::after { content: ''; }
  .nav-dropdown {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 1.2rem;
    min-width: 0;
  }
  .nav-dropdown a { font-size: 1rem !important; padding: .5rem 1rem !important; }
}

/* ─── Hero ─── */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(170deg, var(--white) 0%, #e3e6f7 100%);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(40,101,255,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { margin-bottom: 1.2rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; color: var(--steel); max-width: 600px; }
.hero-badge {
  display: inline-block;
  padding: .35rem 1rem;
  background: rgba(40,101,255,.1);
  color: var(--accent);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(40,101,255,.3); }
.btn-secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-secondary:hover { background: rgba(40,101,255,.06); color: var(--accent); }
.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { background: var(--light); color: var(--accent); transform: translateY(-1px); }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Sections ─── */
section { padding: 5rem 0; }
section:nth-child(even) { background: var(--light); }
.section-label {
  display: inline-block;
  padding: .3rem .9rem;
  background: rgba(40,101,255,.08);
  color: var(--accent);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .8rem;
}
.section-title { margin-bottom: .8rem; }
.section-subtitle { max-width: 600px; margin-bottom: 2.5rem; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ─── Cards ─── */
.card {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.card-icon {
  width: 52px;
  height: 52px;
  background: rgba(40,101,255,.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--accent);
}
.card h3 { margin-bottom: .6rem; }
.card p { font-size: .95rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.8rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.8rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

/* ─── Feature Split ─── */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.feature-split.reverse { direction: rtl; }
.feature-split.reverse > * { direction: ltr; }
.feature-visual {
  background: linear-gradient(135deg, #e3e6f7, #d0d4f0);
  border-radius: 16px;
  padding: 2.5rem;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.feature-visual img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

@media (max-width: 768px) {
  .feature-split { grid-template-columns: 1fr; gap: 2rem; }
  .feature-split.reverse { direction: ltr; }
}

/* ─── Steps / How It Works ─── */
.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
}
.step-number {
  counter-increment: step;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

/* ─── Stats ─── */
.stats { display: flex; gap: 3rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: .9rem; color: var(--steel); margin-top: .2rem; }

/* ─── CTA Band ─── */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 4rem 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: .8rem; }
.cta-band p { color: var(--silver); margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ─── Footer ─── */
.site-footer {
  background: var(--navy);
  color: var(--silver);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { font-size: .9rem; margin-top: .8rem; line-height: 1.6; color: #c8cde0; }
.footer-col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--silver); font-size: .9rem; padding: .25rem 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Article / Long Content ─── */
.article-hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(170deg, var(--white) 0%, #e3e6f7 100%);
}
.article-body {
  padding: 3rem 0 5rem;
}
.article-body h2 { margin-top: 2.5rem; margin-bottom: .8rem; }
.article-body h3 { margin-top: 2rem; margin-bottom: .6rem; }
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.article-body li { margin-bottom: .4rem; color: var(--slate); }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(40,101,255,.04);
  border-radius: 0 8px 8px 0;
}

/* ─── Blog Cards ─── */
.blog-card { padding: 0; overflow: hidden; }
.blog-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, #e3e6f7, #d0d4f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 2rem;
}
.blog-card-body { padding: 1.5rem; }
.blog-card-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}
.blog-card-body h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.blog-card-body p { font-size: .9rem; }

/* ─── Form ─── */
.form-group { margin-bottom: 1.3rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--navy);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid rgba(0,0,0,.12);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40,101,255,.12);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ─── Checklist ─── */
.checklist { list-style: none; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: .7rem;
  color: var(--slate);
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ─── Dashboard Mock ─── */
.dashboard-mock {
  background: var(--navy);
  border-radius: 12px;
  padding: 1.5rem;
  color: #fff;
}
.dashboard-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dashboard-metric {
  flex: 1;
  background: var(--navy-light);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}
.dashboard-metric .value { font-size: 1.6rem; font-weight: 800; color: var(--accent-light); }
.dashboard-metric .label { font-size: .75rem; color: var(--silver); margin-top: .2rem; }
.dashboard-chart {
  background: var(--navy-light);
  border-radius: 8px;
  padding: 1.5rem;
  min-height: 140px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.chart-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  transition: height .3s;
}

/* ─── Utilities ─── */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-accent { color: var(--accent); }
.text-steel { color: var(--steel); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Language Switcher ─── */
.nav-row { display: flex; align-items: center; gap: .5rem; }
.lang-switch {
  font-weight: 600;
  font-size: .82rem;
  padding: .3rem .7rem;
  border: 1.5px solid var(--silver);
  border-radius: 6px;
  text-decoration: none;
  color: var(--slate);
  transition: all .2s;
  white-space: nowrap;
}
.lang-switch:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
@media (max-width: 900px) {
  .lang-switch { order: -1; }
}
