:root {
  --bg-main: #020617;
  --bg-surface: #050816;
  --bg-elevated: #0b1020;
  --bg-card: #111827;

  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --accent-strong: rgba(56, 189, 248, 0.75);

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;

  --border-subtle: rgba(148, 163, 184, 0.38);
  --border-strong: rgba(148, 163, 184, 0.55);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.9);
}

/* Light theme overrides */

html[data-theme="light"] {
  --bg-main: #f3f4f6;
  --bg-surface: #ffffff;
  --bg-elevated: #e5e7eb;
  --bg-card: #ffffff;

  --text-main: #111827;
  --text-muted: #4b5563;
  --text-soft: #6b7280;

  --border-subtle: rgba(148, 163, 184, 0.5);
  --border-strong: rgba(107, 114, 128, 0.8);
}

html[data-theme="light"],
html[data-theme="light"] body {
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(circle at bottom, rgba(129, 140, 248, 0.14), transparent 55%),
    var(--bg-main);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.35), transparent 60%),
    radial-gradient(circle at bottom, rgba(129, 140, 248, 0.2), transparent 55%),
    var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.25;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout */

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding: 2.5rem 0 2.75rem;
}

/* Header / nav */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 22, 0.96),
    rgba(5, 8, 22, 0.9),
    transparent
  );
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

html[data-theme="light"] header {
  background: linear-gradient(
    to bottom,
    rgba(243, 244, 246, 0.98),
    rgba(243, 244, 246, 0.96),
    transparent
  );
  border-bottom-color: rgba(148, 163, 184, 0.5);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.9), rgba(56, 189, 248, 0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.8);
  font-size: 0.85rem;
  font-weight: 600;
  color: #020617;
}

.brand-text {
  font-size: 0.96rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.nav-links a {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.is-current {
  border-color: var(--border-subtle);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.is-current {
  background: rgba(229, 231, 235, 0.96);
}

.nav-cta {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.9);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(56, 189, 248, 0.85));
  color: #020617;
  font-weight: 500;
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.8);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-soft);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
}

html[data-theme="light"] .theme-toggle {
  background: rgba(243, 244, 246, 0.95);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.92);
}

html[data-theme="light"] .hero-eyebrow {
  background: rgba(243, 244, 246, 0.96);
}

.hero-title {
  margin: 0.9rem 0 0.5rem;
  font-size: clamp(2rem, 2.2rem + 0.4vw, 2.6rem);
  letter-spacing: 0.02em;
}

.hero-title .highlight {
  background: linear-gradient(120deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}

.tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-soft);
}

html[data-theme="light"] .tag {
  background: rgba(243, 244, 246, 0.96);
}

.tag strong {
  color: var(--text-main);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.btn-primary {
  font-size: 0.85rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.9);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(56, 189, 248, 0.9));
  color: #020617;
  font-weight: 500;
  box-shadow: 0 0 32px rgba(56, 189, 248, 0.85);
}

.btn-secondary {
  font-size: 0.82rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.hero-right-card {
  border-radius: var(--radius-lg);
  background: rgba(11, 16, 32, 0.96);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem;
  font-size: 0.82rem;
}

html[data-theme="light"] .hero-right-card {
  background: rgba(255, 255, 255, 0.98);
}

.hero-right-title {
  font-size: 0.92rem;
  margin: 0 0 0.4rem;
}

.hero-right-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text-muted);
}

/* Sections / cards */

.section {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

.section-title {
  font-size: 1.4rem;
  margin: 0;
}

.section-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 30rem;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 0.96rem;
  color: var(--text-main);
}

.card p {
  margin: 0;
}

/* Contact */

.contact-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.2rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Certifications gallery */

.cert-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cert-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cert-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.96rem;
  color: var(--text-main);
}

.cert-card img {
  margin-top: 0.6rem;
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  display: block;
}

/* Footer */

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1.2rem 0 1.8rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

html[data-theme="light"] footer {
  border-top-color: rgba(148, 163, 184, 0.5);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 0.7rem;
}

/* Floating audio control */

.audio-floating {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 60;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-soft);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.6);
}

.audio-floating.on {
  color: var(--accent);
  border-color: var(--accent-strong);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.8);
}

/* Modal for estimate form */

body.no-scroll {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 50;
  overflow-y: auto;
  padding: 2rem 0;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  max-width: 640px;
  width: 100%;
  margin: auto 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.2rem 1rem;
  font-size: 0.84rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-form {
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.form-row-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.modal-form label {
  font-size: 0.78rem;
  color: var(--text-main);
}

.field-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-soft);
  font-weight: 400;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(5, 8, 22, 0.96);
  color: var(--text-main);
  outline: none;
}

html[data-theme="light"] .modal-form input,
html[data-theme="light"] .modal-form textarea,
html[data-theme="light"] .modal-form select {
  background: #f9fafb;
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.modal-form textarea {
  resize: vertical;
  min-height: 70px;
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-right-card {
    margin-top: 1rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cert-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  main {
    padding-top: 2rem;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row-inline {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-overlay {
    padding: 1.5rem 0.5rem;
  }

  .modal-content {
    margin: auto 0.75rem;
    max-height: 92vh;
  }
}
