:root {
  --navy: #0d3148;
  --gold: #c0972d;
  --ink: #122432;
  --muted: #5d6b75;
  --line: #d9e1e6;
  --soft: #f4f7f8;
  --white: #ffffff;
  --green: #1f7a5b;
  --red: #b94b55;
  --shadow: 0 18px 50px rgba(13, 49, 72, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand img { width: min(260px, 52vw); height: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; font-weight: 700; color: var(--navy); }
.site-nav a { min-height: 42px; display: inline-flex; align-items: center; }
.nav-cta { color: var(--white) !important; background: var(--navy); padding: 0 18px; border-radius: 6px; }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--white); border-radius: 6px; padding: 8px 12px; color: var(--navy); font-weight: 800; }

.hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 86px);
  padding: clamp(38px, 6vw, 86px) clamp(18px, 5vw, 72px);
  background: linear-gradient(100deg, #f8fbfc 0%, #ffffff 58%, #f3f0e7 100%);
}
.hero h1, .page-hero h1 {
  margin: 12px 0 18px;
  max-width: 820px;
  color: var(--navy);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}
.hero p, .page-hero p { max-width: 720px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.eyebrow { color: var(--gold); font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0; }
.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 46px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  cursor: pointer;
}
.btn.primary { background: var(--gold); color: #1a211f; }
.btn.secondary { background: var(--navy); color: var(--white); }
.btn.ghost { border-color: var(--line); color: var(--navy); background: var(--white); }
.trust-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 860px; }
.trust-row span, .feature-list span {
  border-left: 3px solid var(--gold);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(13,49,72,0.06);
  padding: 12px;
  border-radius: 6px;
  font-weight: 750;
}
.hero-visual {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.hero-visual img { width: 100%; margin: 0 auto 28px; }
.metric-strip { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; }
.metric-strip strong { color: var(--navy); font-size: 44px; line-height: 1; }
.metric-strip span { color: var(--muted); font-weight: 800; }

.band { padding: clamp(48px, 7vw, 96px) clamp(18px, 5vw, 72px); }
.band.muted { background: var(--soft); }
.container { max-width: 1180px; margin: 0 auto; }
.container.narrow { max-width: 860px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 26px; }
h1, h2, h3 { color: var(--navy); line-height: 1.12; letter-spacing: 0; }
h2 { font-size: clamp(28px, 4vw, 46px); margin: 8px 0 16px; }
h3 { font-size: 22px; margin: 0 0 12px; }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card, .admin-panel, .metric-card, .login-card, .install-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(13,49,72,0.08);
}
.service-card { padding: 22px; min-height: 210px; }
.service-card p { color: var(--muted); }
.process, .split { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.steps { margin: 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 18px 18px 18px 58px; position: relative; font-weight: 850; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; color: #111; }

.page-hero { padding: clamp(54px, 8vw, 112px) clamp(18px, 5vw, 72px); background: linear-gradient(100deg, #f8fbfc, #fff7e6); border-bottom: 1px solid var(--line); }
.category-block { margin-bottom: 46px; }
.category-block h2 span { display: block; color: var(--muted); font-size: 18px; margin-top: 8px; }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-row { border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: grid; gap: 8px; background: var(--white); transition: 0.2s ease; min-height: 126px; }
.service-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.service-row span { color: var(--muted); font-size: 14px; }
.detail-stack { display: grid; gap: 22px; }
.detail-stack section, .sticky-panel { border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: var(--white); }
.sticky-panel { position: sticky; top: 104px; box-shadow: var(--shadow); }
details { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--white); }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 900; color: var(--navy); }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.lead-form { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; color: var(--navy); font-weight: 850; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
}
textarea { resize: vertical; }
.span-2 { grid-column: span 2; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-size: 14px; color: var(--muted); }
.checkbox input { width: auto; margin-top: 4px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.notice { margin: 14px auto; max-width: 1180px; padding: 12px 16px; border-radius: 6px; border: 1px solid var(--line); }
.notice.success { background: #edf8f3; border-color: #b7decf; color: var(--green); }
.notice.error { background: #fff0f1; border-color: #edbdc3; color: var(--red); }
.success-state { text-align: center; }

.site-footer { background: var(--navy); color: rgba(255,255,255,0.78); padding: 48px clamp(18px, 5vw, 72px) 24px; }
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-logo { width: 260px; background: var(--white); border-radius: 6px; padding: 10px; margin-bottom: 18px; }
.site-footer h3 { color: var(--white); }
.site-footer a, .site-footer span { display: block; margin: 7px 0; }
.footer-bottom { max-width: 1180px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.2); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.login-screen, .install-screen { min-height: 100vh; display: grid; place-items: center; background: var(--soft); padding: 20px; }
.login-card, .install-panel { width: min(520px, 100%); padding: 28px; }
.install-panel.wide { width: min(880px, 100%); }
.login-card img, .install-logo { width: 280px; margin-bottom: 18px; }
.info-list { display: grid; gap: 8px; margin: 18px 0; }
.small-muted { color: var(--muted); font-size: 13px; }
.installer-form h2 { font-size: 22px; margin-top: 24px; }
.installer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }

.admin-body { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; background: var(--soft); }
.admin-sidebar { background: var(--navy); color: var(--white); padding: 22px; position: sticky; top: 0; height: 100vh; }
.admin-sidebar img { background: var(--white); border-radius: 6px; padding: 10px; margin-bottom: 24px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { padding: 11px 12px; border-radius: 6px; color: rgba(255,255,255,0.82); font-weight: 850; }
.admin-sidebar a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-main { padding: clamp(18px, 3vw, 34px); min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.admin-top h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { padding: 18px; }
.metric-card span { color: var(--muted); font-weight: 800; }
.metric-card strong { display: block; color: var(--navy); font-size: 34px; }
.admin-panel { padding: 20px; margin-bottom: 18px; overflow: hidden; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; min-width: 760px; width: 100%; background: var(--white); }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--navy); background: #f7fafb; font-size: 13px; text-transform: uppercase; }
.status { display: inline-flex; background: #edf2f5; color: var(--navy); border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 900; }
.filters, .inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters input, .inline-form input, .inline-form select { width: auto; min-width: 160px; flex: 1 1 160px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 22px; }
.timeline-item { border-left: 3px solid var(--gold); padding: 8px 0 8px 14px; margin-bottom: 12px; }
.timeline-item span { display: block; color: var(--muted); font-size: 13px; }
.cms-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

@media (max-width: 980px) {
  .hero, .process, .split, .detail-grid { grid-template-columns: 1fr; }
  .pillar-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .service-list, .faq-grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .trust-row { grid-template-columns: 1fr; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; padding: 12px 18px 18px; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { justify-content: center; }
  .hero { min-height: auto; }
  .hero h1, .page-hero h1 { font-size: 38px; }
  .pillar-grid, .feature-list, .form-grid, .cms-form, .footer-grid, .installer-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .footer-bottom, .admin-top { display: grid; }
  .admin-sidebar nav { grid-template-columns: 1fr 1fr; }
}
