:root {
  color-scheme: light dark;
  /* GPF Uniform Light: surface, text, link and border roles. */
  --background: #edf0f3;
  --surface: #fff;
  --text: #323b47;
  --muted: #586371;
  --heading: #1c344b;
  --link: #004c97;
  --border: #bfc6cf;
  --focus: #004c97;
  --blueprint: #23384e;
  --blueprint-heading: #f2fafc;
  --blueprint-text: #dbe6ee;
  --blueprint-accent: #a7d1d9;
  font: 100%/1.6 system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Uniform Dark text and link roles on ToolTech's blue-grey surfaces. */
    --background: #172635;
    --surface: #1e2d3d;
    --text: #e1e6e9;
    --muted: #bfc6cf;
    --heading: #f2fafc;
    --link: #47a5f1;
    --border: #46596b;
    --focus: #a7d1d9;
  }

  .brand img { filter: invert(.95) hue-rotate(180deg) brightness(1.4) saturate(.7); }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
.shell { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem 2rem;
  padding-block: .8rem;
}

.brand { display: block; width: 11rem; }
.brand img { display: block; width: 100%; height: auto; }
nav { display: flex; flex-wrap: wrap; gap: 0 clamp(.75rem, 2vw, 1.65rem); }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--text); text-decoration: none; }
a { color: var(--link); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .13em; }
nav a:hover { text-decoration-line: underline; }
:focus-visible { outline: .15rem solid var(--focus); outline-offset: .25rem; }

.skip-link {
  position: absolute;
  z-index: 2;
  inset: .5rem auto auto .5rem;
  padding: .65rem 1rem;
  background: var(--surface);
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus { transform: none; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--heading); line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: clamp(1.85rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
p + p { margin-top: .65rem; }

.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: clamp(30rem, 73svh, 47rem);
  padding: 4.5rem 1.25rem;
  border-radius: .6rem;
  background: var(--blueprint);
  color: var(--blueprint-text);
  text-align: center;
}

.intro::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(145deg, transparent 69%, #91b6cb36 69.15%, transparent 69.3%),
    linear-gradient(90deg, #91b6cb1b 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(#91b6cb1b 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse at 79% 22%, #3b5870, transparent 60%);
  mask-image: radial-gradient(ellipse at center, transparent 24%, #000 79%);
}

.intro-content { max-width: 48rem; }
.intro h1 {
  color: var(--blueprint-heading);
  font-size: clamp(2.1rem, 5.5vw, 4.65rem);
  font-weight: 680;
  text-wrap: balance;
}

.intro p {
  max-width: 40ch;
  margin: 1.15rem auto 0;
  font-size: clamp(1rem, 2vw, 1.23rem);
  text-wrap: balance;
}

.intro-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  margin-top: .9rem;
  color: var(--blueprint-accent);
  font-weight: 650;
}

.intro-link:focus-visible { outline-color: var(--blueprint-accent); }

.header-motifs {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 66% 56% at 50% 50%, transparent 47%, #000 100%);
}

.header-network {
  position: absolute;
  width: min(65%, 47rem);
  height: 56%;
  inset: -4% auto auto 1%;
  opacity: .52;
  mask-image: linear-gradient(90deg, #000 25%, transparent 100%);
}

.header-motif {
  position: absolute;
  width: clamp(12rem, 36vw, 29rem);
  height: clamp(8rem, 19vw, 15rem);
  background: url("images/gizmo-header-reference.png") no-repeat;
  background-size: auto 100%;
  filter: saturate(.6);
  mask-image: radial-gradient(ellipse, #000 32%, transparent 73%);
}

.header-motif.eye { top: 3%; right: 1%; background-position: 42% center; opacity: .65; }
.header-motif.jeep { bottom: 1%; right: 0; background-position: 6% center; opacity: .57; }
.header-motif.forest {
  bottom: 5%;
  left: 2%;
  width: clamp(14rem, 39vw, 31rem);
  background: #39536e url("images/birch-grove.jpg") 42% center / cover no-repeat;
  background-blend-mode: soft-light;
  filter: saturate(.65) contrast(.78);
  opacity: .62;
}

.section { padding-block: clamp(2.6rem, 6vw, 5rem); scroll-margin-top: 1rem; }
.intro + .section { padding-top: clamp(1.9rem, 4vw, 3.5rem); }
.section + .section { border-top: 1px solid var(--border); }
.section-split { display: grid; grid-template-columns: minmax(11rem, 1fr) 1.6fr; gap: 1.25rem 3rem; }
.section-split p { max-width: 58ch; color: var(--muted); }
.section-split h2 + p { margin-top: .65rem; }
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.product {
  min-width: 0;
  scroll-margin-top: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: var(--surface);
}

.featured-product {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  padding: 0;
}

.product-copy { padding: clamp(1.35rem, 4vw, 3rem); }
.gizmo-visual {
  background:
    linear-gradient(90deg, var(--blueprint), transparent 40%),
    var(--blueprint) url("images/gizmo-header-reference.png") left center / auto 135% no-repeat;
  min-height: 10rem;
}

.product-heading { display: flex; align-items: center; gap: .6rem; }
.product-heading img { width: 2.35rem; height: auto; border-radius: .45rem; }
.product p { max-width: 54ch; color: var(--muted); }
.product .product-summary { margin-top: .45rem; color: var(--text); font-weight: 650; }
.product-links { display: flex; flex-wrap: wrap; gap: .15rem 1.2rem; margin-top: .55rem; }
.product-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }

.steps { display: grid; gap: 1.1rem; margin: 0; }
.steps dt { font-weight: 680; color: var(--heading); }
.steps dd { margin: .2rem 0 0; color: var(--muted); }
.footer { border-top: 1px solid var(--border); padding-block: 1.4rem; color: var(--muted); }

.guide { padding-block: clamp(2rem, 7vw, 4rem); border-top: 1px solid var(--border); }
.guide h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
.guide h2 { margin: 1.8rem 0 .65rem; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.guide h3 { margin: 1.25rem 0 .45rem; }
.guide p { max-width: 70ch; margin-block: .75rem; }
.guide figure { width: min(15rem, 100%); margin: 1rem 0; }
.guide img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: .65rem; }
.guide figcaption { margin-top: .5rem; color: var(--muted); font-size: .875rem; text-align: center; }

@media (max-width: 45rem) {
  .intro { min-height: clamp(28rem, 70svh, 39rem); }
  .header-network { inset: -6% auto auto 0; width: 82%; opacity: .42; }
  .header-motif.eye { right: -4%; top: 1%; opacity: .5; }
  .header-motif.jeep { right: -7%; bottom: 1%; opacity: .42; }
  .header-motif.forest { left: 0; bottom: 3%; opacity: .49; }
  .section-split, .products, .featured-product { grid-template-columns: minmax(0, 1fr); }
  .gizmo-visual { height: 10rem; background-position: left 54%; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: var(--reveal-progress, 1);
    translate: 0 calc((1 - var(--reveal-progress, 1)) * 1.25rem);
  }

  [data-reveal]:focus-within {
    opacity: 1;
    translate: none;
  }

  .header-network, .header-motif.forest { translate: 0 var(--slow-travel, 0px); }
  .header-motif.eye, .header-motif.jeep { translate: 0 var(--fast-travel, 0px); }
}

/* Approved wordmark variants already have the intended light/dark colours. */
.brand .brand-wordmark { filter:none; }
