:root {
  --bg: #0a0d10;
  --bg-soft: #10161c;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
  --surface-dark: #16202a;
  --text: #14202b;
  --text-light: #f8fbff;
  --muted: #627182;
  --line: #dde5ed;
  --line-strong: #bfd0e2;
  --accent: #9db7cf;
  --accent-strong: #b9d1e8;
  --accent-deep: #6f8eab;
  --shadow: 0 16px 40px rgba(8, 17, 27, 0.12);
  --shadow-strong: 0 22px 52px rgba(8, 17, 27, 0.22);
  --focus: 0 0 0 3px rgba(185, 209, 232, 0.32);
  --radius: 22px;
  --radius-sm: 14px;
  --max-width: 1180px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #fff;
  color: var(--text);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.js-ready.no-scroll {
  overflow: hidden;
}

body::selection,
body *::selection {
  background: rgba(157, 183, 207, 0.3);
  color: #08111b;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 3000;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: #08111b;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.noscript-banner {
  padding: 0.8rem 1rem;
  text-align: center;
  font-weight: 600;
  background: #fff6db;
  color: #4d3b00;
  border-bottom: 1px solid #e8d08a;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 2000;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-deep));
  box-shadow: 0 0 18px rgba(157, 183, 207, 0.55);
  transition: width 0.12s linear;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 13, 16, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
}

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #dbe7f4, #839fba);
  color: #08111b;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 10px 30px rgba(131, 159, 186, 0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong {
  font-size: 0.98rem;
}

.logo-text small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  position: relative;
  color: #fff;
  font-weight: 500;
  padding: 0.3rem 0;
  transition: color var(--transition), opacity var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after,
.nav-links a[aria-current="true"]::after {
  transform: scaleX(1);
}

.nav-links a.is-active,
.nav-links a[aria-current="true"] {
  color: var(--accent-strong);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.4rem;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #08111b;
  font-weight: 700;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition), filter var(--transition);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  filter: brightness(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.btn-sm {
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
}

.hero {
  position: relative;
  color: var(--text-light);
  padding: 6rem 0 4.5rem;
  background:
    linear-gradient(rgba(6, 10, 14, 0.62), rgba(6, 10, 14, 0.9)),
    url("image4(1).png") center/cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 85%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  top: -160px;
  background: radial-gradient(circle, rgba(157, 183, 207, 0.18), transparent 62%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 12, 18, 0.9) 0%, rgba(7, 12, 18, 0.62) 48%, rgba(7, 12, 18, 0.78) 100%);
}

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

.hero-content,
.hero-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.hero h1,
.section-heading h2,
.split-grid h2,
.contact-card h2,
.about-grid h2 {
  line-height: 1.06;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  max-width: 12ch;
}

.hero-text {
  max-width: 680px;
  color: rgba(248, 251, 255, 0.88);
  font-size: 1.05rem;
}

.hero-actions,
.hero-points,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-actions {
  margin: 1.8rem 0;
}

.hero-points span,
.pill-list span {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
  backdrop-filter: blur(6px);
}

.card,
.service-card,
.owner-card,
.contact-form,
.contact-card,
.image-panel,
.gallery-item,
.about-grid > div:first-child,
.dark-card {
  border-radius: var(--radius);
}

.card,
.service-card,
.owner-card,
.contact-form,
.contact-card,
.image-panel,
.gallery-item {
  position: relative;
  overflow: hidden;
}

.card::before,
.service-card::before,
.owner-card::before,
.contact-form::before,
.contact-card::before,
.image-panel::before,
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(185, 209, 232, 0.12), transparent 30%, transparent 70%, rgba(185, 209, 232, 0.08));
  opacity: 0.9;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1.7rem;
  box-shadow: var(--shadow);
}

.card-title,
.card h3,
.service-card h3,
.contact-form h3,
.owner-copy h3 {
  margin-top: 0;
}

.card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.88);
}

.section {
  position: relative;
  padding: 5rem 0;
}

.section-dark {
  background: linear-gradient(180deg, #10161c 0%, #0d1218 100%);
  color: var(--text-light);
}

.alt-section {
  background: var(--surface-soft);
}

.stats-bar {
  padding: 1.25rem 0;
  background:
    linear-gradient(180deg, #0c1116 0%, #0a0e12 100%);
  color: #eef5fb;
}

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

.stats-grid div {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stats-grid strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.stats-grid span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.93rem;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 2.2rem;
}

.section-heading.narrow {
  max-width: 740px;
}

.section-heading h2,
.split-grid h2,
.contact-card h2,
.about-grid h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.95rem, 3vw, 3rem);
}

.section-heading p,
.service-card p,
.contact-form .form-note,
.contact-form .form-helper,
.owner-copy p,
.contact-details p,
.about-grid p {
  color: var(--muted);
}

.section-dark p,
.section-dark li {
  color: rgba(255, 255, 255, 0.8);
}

.services-grid,
.gallery-grid {
  display: grid;
  gap: 1.2rem;
}

.services-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.55rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--line-strong);
}

.split-grid,
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: center;
}

.image-panel {
  background: #fff;
  box-shadow: var(--shadow);
}

.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-panel.tall {
  min-height: 440px;
}

.tech-frame {
  border: 1px solid rgba(157, 183, 207, 0.18);
}

.check-list,
.about-list {
  display: grid;
  gap: 1rem;
}

.check-list div,
.about-list div {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.check-list.compact div {
  background: #fff;
  border: 1px solid var(--line);
}

.check-list.compact p,
.check-list.compact strong {
  color: var(--text);
}

.owner-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  max-width: 340px;
  justify-self: center;
}

.owner-photo {
  width: 100%;
  max-width: 180px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  margin: 1.25rem auto 0;
  border-radius: 18px;
}

.owner-copy {
  padding: 1.35rem;
}

.owner-copy ul {
  margin: 0;
  padding-left: 1.1rem;
}

.gallery-grid {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
  border: 2px solid transparent;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition), filter var(--transition);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  box-shadow: var(--shadow-strong);
  border-color: var(--accent);
  transform: translateY(-3px);
  filter: brightness(1.01);
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #f3f6f9;
}

.contact-section {
  background: linear-gradient(180deg, #eef4f9 0%, #ffffff 100%);
}

.contact-card,
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.dark-card {
  background: linear-gradient(160deg, #10161d 0%, #1a2633 100%);
  color: var(--text-light);
  border: none;
}

.dark-card p,
.dark-card a {
  color: rgba(255, 255, 255, 0.86);
}

.contact-details {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cfd9e3;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: #bccddd;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(157, 183, 207, 0.25);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.form-helper {
  margin: -0.2rem 0 0.4rem;
  font-size: 0.94rem;
}

.form-note {
  min-height: 24px;
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.site-footer {
  background: #080b0e;
  color: rgba(255, 255, 255, 0.7);
  padding: 1.2rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 6, 8, 0.96);
  z-index: 2000;
}

.lightbox.show {
  display: flex;
}

.lightbox-dialog {
  position: relative;
  width: min(1100px, 100%);
  min-height: min(80vh, 700px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.lightbox-figure {
  margin: 0;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.lightbox img {
  width: auto;
  height: auto;
  max-width: min(92vw, 920px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 18px;
  background: #111;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox figcaption {
  margin: 0;
  color: #fff;
  text-align: center;
  max-width: 90vw;
  font-weight: 500;
}

.lightbox-close,
.lightbox-nav,
.back-to-top {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(10px);
  transition: transform var(--transition), background-color var(--transition), opacity var(--transition);
}

.lightbox-close:hover,
.lightbox-nav:hover,
.back-to-top:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 2rem;
}

.lightbox-nav {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  font-size: 2rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  box-shadow: var(--shadow);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.contact-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.js-ready .reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.js-ready .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

/* Fix image5 section sizing on mobile */
#why-insulate .image-panel {
  background: transparent;
}

#why-insulate .image-panel img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 980px) {
  .hero-grid,
  .split-grid,
  .about-grid,
  .contact-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .owner-card {
    max-width: 320px;
  }

  .lightbox-dialog {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .lightbox-nav {
    order: 3;
  }

  .lightbox-prev {
    justify-self: start;
  }

  .lightbox-next {
    justify-self: end;
    margin-top: -4.5rem;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 82px;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    background: #10161c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.85rem;
  }

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

  .nav-links a {
    width: 100%;
  }

  .hero {
    padding-top: 5.2rem;
  }

  .hero h1 {
    max-width: 100%;
  }

  .services-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: auto;
    max-height: none;
  }

  .owner-card {
    max-width: 100%;
  }

  .owner-photo {
    max-width: 150px;
  }

  .footer-content {
    flex-direction: column;
  }

  .lightbox {
    padding: 0.75rem;
  }

  .lightbox-dialog {
    min-height: auto;
    padding: 2.9rem 0.25rem 0.25rem;
    gap: 0.8rem;
  }

  .lightbox img {
    max-width: 94vw;
    max-height: 72vh;
  }

  .lightbox-close {
    top: -0.1rem;
    right: 0;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }

  .lightbox-next {
    margin-top: 0;
  }

  #why-insulate .image-panel.tall {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js-ready .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}