/* Shared layout and colours */
:root {
  color-scheme: light;
  --ink: #10233b;
  --muted: #50647a;
  --blue: #135ca9;
  --blue-dark: #0d477f;
  --sky: #eef5fc;
  --surface: #fff;
  --paper: #f5f8fb;
  --line: #d9e4ee;
  --radius: 18px;
  --gutter: clamp(18px, 4vw, 56px);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
p, h1, h2, figure, dl, dd { margin: 0; }
h1, h2 { line-height: 1.1; letter-spacing: -.035em; }
h1 { font-size: clamp(2.25rem, 4.7vw, 4rem); overflow-wrap: anywhere; }
h2 { font-size: clamp(1.35rem, 2.4vw, 2.1rem); }
:focus-visible { outline: 3px solid #1683dc; outline-offset: 4px; }

.wrap {
  width: min(1160px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip {
  position: absolute;
  z-index: 10;
  inset: 12px auto auto var(--gutter);
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip:focus { transform: translateY(0); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav contact";
  gap: clamp(14px, 4vw, 48px);
  align-items: center;
  min-height: 77px;
}
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  text-decoration: none;
}
.brand img { width: 48px; border: 1px solid var(--line); border-radius: 12px; }
.brand-text { display: grid; line-height: 1.25; }
.brand-text strong { font-size: 1.16rem; letter-spacing: .02em; }
.brand-text > span { color: var(--muted); font-size: .74rem; }
.site-nav {
  grid-area: nav;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.site-nav a {
  border-radius: 9px;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  background: var(--sky);
  color: var(--blue-dark);
}
.contact { grid-area: contact; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  width: fit-content;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 17px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: var(--blue-dark); }
.button-small { min-height: 42px; padding: 8px 13px; font-size: .92rem; }
.button-outline {
  border-color: #ffffff8a;
  background: #0e24376b;
}
.button-outline:hover { background: #234766; }

.site-footer { background: #11263d; color: #c9d8e9; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-block: 29px;
}
.footer-brand { color: #fff; font-size: 1.15rem; font-weight: 750; text-decoration: none; }
.site-footer p, .site-footer small { font-size: .86rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { text-underline-offset: .2em; }
.site-footer a:hover { color: #fff; }

/* Home */
.eyebrow {
  color: var(--blue-dark);
  font-size: .77rem;
  font-weight: 750;
  letter-spacing: .085em;
  line-height: 1.45;
  text-transform: uppercase;
}
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 552px;
  padding-block: clamp(65px, 8.5vw, 132px);
  overflow: hidden;
  color: #fff;
  background: #142b42;
}
.hero-photo, .hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-photo { z-index: -2; object-fit: cover; object-position: 58% 60%; }
.hero::after {
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, #091d32f7 3%, #0a2135d1 34%, #0a223772 67%, #132c4147 100%),
    linear-gradient(0deg, #0b203695 0%, transparent 62%);
}
.hero .eyebrow { display: flex; align-items: center; gap: .65rem; color: #d7edff; }
.signal-dot {
  width: .58rem;
  height: .58rem;
  border-radius: 50%;
  background: #83cbff;
  box-shadow: 0 0 0 4px #83cbff2c;
}
.hero h1 { max-width: 835px; margin-top: 15px; text-wrap: balance; }
.hero-description {
  max-width: 615px;
  margin-top: 19px;
  color: #e5f0fb;
  font-size: clamp(1rem, 2vw, 1.18rem);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.product-section {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding-block: clamp(42px, 7vw, 86px);
}
.product-picture {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.product-picture img { width: 100%; }
.product-copy h2 { margin-block: 8px 14px; }
.product-copy > p:not(.eyebrow) { color: var(--muted); max-width: 46ch; }
.product-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}
.product-specs > div { padding: 10px 12px; background: var(--sky); border-radius: 10px; }
.product-specs dt { color: var(--muted); font-size: .78rem; }
.product-specs dd { font-size: 1rem; font-weight: 750; white-space: nowrap; }

/* Connection and setup */
.guide { padding-block: clamp(34px, 6vw, 75px) clamp(38px, 6vw, 70px); }
.page-intro { max-width: 860px; margin-bottom: clamp(22px, 4vw, 42px); }
.page-intro h1 { margin-top: 8px; text-wrap: balance; }
.lede { margin-top: 13px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }
.wiring {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.wiring-link { display: block; background: #292d30; }
.wiring-link:focus-visible { outline-offset: -4px; }
.wiring img { width: 100%; max-width: 960px; margin-inline: auto; }
.wiring figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 5px 20px;
  padding: 12px 18px;
  color: var(--muted);
  font-size: .94rem;
}
.text-link { color: var(--blue-dark); font-weight: 700; text-underline-offset: .2em; }
.wiring-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 17px;
}
.card {
  padding: clamp(17px, 3vw, 25px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card h2 { font-size: clamp(1.21rem, 2.1vw, 1.55rem); }
.card > .eyebrow + h2 { margin-top: 5px; }
.card > h2 + p, .card > p + p { margin-top: 10px; }
.card p:not(.eyebrow), .wire-list dd { color: var(--muted); }
.wire-list { margin-top: 14px; }
.wire-list > div + div { margin-top: 10px; }
.wire-list dt { display: flex; align-items: center; gap: .5rem; font-weight: 730; }
.wire-list dd { margin-left: 1.22rem; }
.wire { width: .72rem; height: .72rem; flex: 0 0 auto; border-radius: 50%; }
.brown { background: #8a522e; }
.blue { background: #2869c5; }
.yellow { background: #e7ac13; }
.white { border: 1px solid #8395a8; background: #fff; }
.green { background: #29784e; }
.card .note {
  margin-top: 13px;
  padding: 9px 11px;
  border-left: 3px solid #72a6d6;
  border-radius: 0 8px 8px 0;
  color: var(--ink);
  background: var(--sky);
  font-size: .94rem;
}
.next-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sky);
}
.next-section p { font-weight: 680; }

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.steps {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step { counter-increment: step; }
.step h2 { display: flex; align-items: center; gap: .65rem; }
.step h2::before {
  display: grid;
  flex: 0 0 2rem;
  place-items: center;
  height: 2rem;
  border-radius: 9px;
  background: var(--sky);
  color: var(--blue-dark);
  content: counter(step);
  font-size: .9rem;
  font-weight: 760;
}
code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--sky);
  color: var(--ink);
  font-size: .98em;
  font-weight: 650;
  white-space: nowrap;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink);
  font-size: .81rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101820;
  object-fit: cover;
  object-position: top;
}
.gallery-item:hover { color: var(--blue-dark); text-decoration: underline; }

.lightbox {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
}
.lightbox::backdrop { background: #0a182ad9; }
.lightbox-inner { padding: 12px 16px; }
.lightbox-toolbar, .lightbox-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.lightbox-toolbar h2 { font-size: 1.12rem; }
.lightbox figure { margin: 10px 0; }
.lightbox img {
  width: auto;
  height: auto;
  max-height: 64vh;
  max-height: 64dvh;
  margin-inline: auto;
  object-fit: contain;
}
.lightbox figcaption { padding-top: 7px; text-align: center; font-size: .9rem; }
.lightbox-controls button { min-width: 96px; }

/* Narrow screens */
@media (max-width: 800px) {
  .product-section, .setup-layout { grid-template-columns: 1fr; }
  .product-picture { max-width: 580px; }
  .wiring-details { grid-template-columns: 1fr; }
  .hero::after {
    background: linear-gradient(90deg, #091d32f0 0%, #0c243ad9 48%, #142e4288 100%);
  }
}
@media (max-width: 600px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand contact" "nav nav";
    gap: 6px 10px;
    padding-block: 8px;
  }
  .site-nav { justify-content: flex-start; gap: 4px; }
  .site-nav a { padding: 6px 10px; font-size: .94rem; }
  .brand img { width: 40px; }
  .brand { gap: 7px; }
  .brand-text > span { font-size: .68rem; }
  .hero { min-height: 0; padding-block: 62px; }
  .hero h1 { font-size: clamp(1.85rem, 8vw, 2.5rem); }
  .hero-photo { object-position: 67% center; }
  .hero::after { background: linear-gradient(90deg, #091d32ef 0%, #0c243abf 100%); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
