/* ==========================================================================
   PhxTech 24-7 — Commercial Security & Low-Voltage Infrastructure
   Brand Typography: Montserrat | Palette: Slate Navy, Cyan, Phoenix Amber
   ========================================================================== */

:root {
  --bg-dark: #0b1220;
  --bg-darker: #060a12;
  --bg-surface: #111b2e;
  --bg-surface-alt: #16233b;
  --bg-light: #f4f7fb;
  --white: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #e2e8f0;
  --text-light-muted: #94a3b8;
  --accent-amber: #f59e0b;
  --accent-amber-hover: #d97706;
  --accent-orange: #f97316;
  --accent-cyan: #0ea5e9;
  --accent-cyan-soft: rgba(14, 165, 233, 0.14);
  --border-dark: rgba(148, 163, 184, 0.18);
  --border-light: #dbe3ee;
  --success: #10b981;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 12px 32px rgba(6, 10, 18, 0.08);
  --shadow-dark: 0 18px 40px rgba(0, 0, 0, 0.35);
  --container-max: 1220px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--bg-darker);
  color: var(--text-light-muted);
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-dark);
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-tagline {
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top-bar-contacts {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-contacts a {
  color: var(--text-light);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.top-bar-contacts a:hover {
  color: var(--accent-amber);
}

/* Main Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  flex-shrink: 0;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(249, 115, 22, 0.25));
}

.brand-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-name span {
  color: var(--accent-amber);
}

.brand-sub {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-light-muted);
  font-weight: 600;
}

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

.nav-links li {
  flex-shrink: 0;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
  display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-amber);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-amber);
  border-radius: 2px;
}

.nav-cta {
  background: var(--accent-amber);
  color: #0b1220 !important;
  padding: 10px 16px !important;
  border-radius: var(--radius-sm);
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.nav-cta:hover {
  background: var(--accent-amber-hover);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-dark);
  color: var(--white);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: var(--accent-amber);
  color: #0b1220;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  background: var(--accent-amber-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--white);
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at 80% 20%, #172744 0%, var(--bg-dark) 55%, var(--bg-darker) 100%);
  color: var(--white);
  padding: 80px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-grid > div {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-cyan-soft);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent-amber);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 620px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-micro {
  font-size: 0.84rem;
  color: var(--text-light-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.hero-micro span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-dark);
  min-width: 0;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.status-pill {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hero-spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-spec-list li {
  background: var(--bg-surface-alt);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-cyan);
}

.hero-spec-list li strong {
  display: block;
  font-size: 0.92rem;
  color: var(--white);
  margin-bottom: 2px;
}

.hero-spec-list li span {
  font-size: 0.83rem;
  color: var(--text-light-muted);
}

/* Proof / Metrics Strip */
.proof-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  padding: 28px 0;
  color: var(--white);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.proof-item .metric {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent-amber);
  line-height: 1.1;
  margin-bottom: 4px;
}

.proof-item .label {
  font-size: 0.82rem;
  color: var(--text-light-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Generic Sections */
.section {
  padding: 80px 0;
}

.section-light {
  background: var(--bg-light);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--white);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-header .eyebrow {
  margin-bottom: 12px;
}

.section-light .eyebrow,
.section .eyebrow {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}

.section-dark .eyebrow {
  background: var(--accent-cyan-soft);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.02rem;
  color: var(--text-muted);
}

.section-dark .section-header p {
  color: var(--text-light-muted);
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(6, 10, 18, 0.12);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.card-list {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-list li {
  font-size: 0.88rem;
  color: var(--text-main);
  padding-left: 20px;
  position: relative;
}

.card-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 800;
}

.card-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link:hover {
  color: var(--accent-amber-hover);
}

/* Comparison Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  background: var(--white);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 680px;
}

.compare-table th,
.compare-table td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.93rem;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--bg-dark);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}

.compare-table thead th.phx-col {
  background: #0284c7;
  color: var(--white);
}

.compare-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.compare-table td.feature-col {
  font-weight: 700;
  color: var(--text-main);
  width: 22%;
}

.compare-table td.competitor-col {
  color: var(--text-muted);
  width: 38%;
}

.compare-table td.phx-col {
  background: rgba(14, 165, 233, 0.05);
  color: var(--text-main);
  font-weight: 600;
  width: 40%;
}

.table-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

/* C2P Stage Timeline */
.stage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  min-width: 0;
}

.stage-badge {
  display: inline-block;
  background: var(--accent-amber);
  color: #0b1220;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.stage-card h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--white);
}

.stage-card p {
  font-size: 0.92rem;
  color: var(--text-light-muted);
  margin-bottom: 14px;
}

.stage-outcome {
  background: var(--bg-surface-alt);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: #38bdf8;
  font-weight: 600;
}

/* Interactive Savings Calculator */
.calc-box {
  background: var(--white);
  border: 2px solid #0284c7;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  margin-top: 48px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.calc-controls label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.calc-controls input[type="range"] {
  width: 100%;
  margin-bottom: 20px;
  accent-color: #0284c7;
}

.calc-results {
  background: var(--bg-dark);
  color: var(--white);
  padding: 28px;
  border-radius: var(--radius-md);
}

.calc-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.92rem;
}

.calc-row.highlight {
  border-bottom: none;
  padding-top: 16px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-amber);
}

/* Form Section */
.survey-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: start;
}

.survey-info h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.survey-info p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card-item {
  background: var(--white);
  border: 1px solid var(--border-light);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.contact-card-item span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.contact-card-item a,
.contact-card-item strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bg-dark);
  margin-top: 2px;
}

.contact-card-item a:hover {
  color: #0284c7;
}

.survey-form {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: inherit;
  font-size: 0.94rem;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--text-main);
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0284c7;
  background: var(--white);
}

.hp-field {
  display: none !important;
}

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.14);
  color: #065f46;
  border: 1px solid #10b981;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Page Sub-Hero */
.page-hero {
  background: linear-gradient(135deg, var(--bg-darker) 0%, #13213c 100%);
  color: var(--white);
  padding: 64px 0;
  border-bottom: 1px solid var(--border-dark);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.15;
}

.page-hero p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 720px;
}

/* Footer */
.site-footer {
  background: var(--bg-darker);
  color: var(--text-light-muted);
  padding: 64px 0 32px;
  border-top: 1px solid var(--border-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border-dark);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--accent-amber);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
}

/* Responsive Breakpoints (1080px prevents mid-width navbar wrapping on split screens/tablets) */
@media (max-width: 1080px) {
  .nav-wrapper {
    gap: 12px;
  }

  .brand-logo {
    min-width: 0;
    flex: 1 1 auto;
    flex-shrink: 1;
  }

  .brand-text {
    min-width: 0;
    overflow: hidden;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: var(--white);
    padding: 9px 14px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 24px;
    gap: 10px;
    border-bottom: 1px solid var(--border-dark);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 1001;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 10px 4px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-cta {
    text-align: center;
    margin-top: 6px;
    padding: 12px 16px !important;
  }

  .hero-grid,
  .survey-wrapper,
  .calc-grid {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 18px;
  }

  .top-bar-tagline {
    display: none;
  }

  .top-bar-contacts {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.74rem;
  }

  .nav-wrapper {
    height: 72px;
    gap: 10px;
  }

  .nav-links {
    top: 72px;
    max-height: calc(100vh - 72px);
  }

  .brand-logo {
    gap: 10px;
  }

  .brand-logo-img {
    height: 40px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  .brand-sub {
    font-size: 0.56rem;
    letter-spacing: 0.04em;
    white-space: normal;
    line-height: 1.2;
  }

  .grid-2,
  .grid-4,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid {
    grid-template-columns: 1fr 1fr;
  }

  .survey-form,
  .calc-box {
    padding: 24px;
  }
}
