/* Homepage composition.
 *
 * The first screen is the bench: a real gearmotor taken apart, annotated the
 * way a teardown record is annotated, with the offer standing in the scene as
 * a working control rather than a marketing stack laid on top of a picture.
 */

.home-hero {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 100svh;
  padding: 0;
  isolation: isolate;
  overflow: hidden;
}

/* -------------------------------------------------------------- the scene */

.home-scene {
  position: absolute;
  z-index: -1;
  /* The frame hangs below the hero so the parts band lands under the copy
   * rather than through it. The overhang is hidden by the hero's own clip. */
  inset: 0 0 -6% 0;
}

.home-scene-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* The photograph is a dark bench, so the offer sits on a real ground. A long,
 * finely stepped fade carries the top and the bottom of the image into the
 * page surface, so there is no line where the photograph stops and no bright
 * bench under the navigation. */
.home-scene-feather {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      180deg,
      rgba(9, 11, 8, 0.86) 0%,
      rgba(9, 11, 8, 0.62) 9%,
      rgba(9, 11, 8, 0.34) 18%,
      rgba(9, 11, 8, 0.14) 27%,
      rgba(9, 11, 8, 0.05) 35%,
      rgba(9, 11, 8, 0) 44%,
      rgba(13, 15, 12, 0) 66%,
      rgba(13, 15, 12, 0.2) 74%,
      rgba(14, 17, 13, 0.45) 80%,
      rgba(15, 18, 13, 0.68) 85%,
      rgba(15, 18, 13, 0.85) 90%,
      rgba(16, 19, 14, 0.94) 95%,
      #11130f 100%
    ),
    linear-gradient(
      90deg,
      rgba(9, 11, 8, 0.82) 0%,
      rgba(9, 11, 8, 0.74) 14%,
      rgba(9, 11, 8, 0.52) 28%,
      rgba(9, 11, 8, 0.3) 40%,
      rgba(9, 11, 8, 0.13) 50%,
      rgba(9, 11, 8, 0.04) 60%,
      rgba(9, 11, 8, 0) 70%
    );
}

/* ------------------------------------------------------------- callouts */

.scene-leader,
.scene-node {
  fill: none;
  stroke: rgba(226, 224, 212, 0.72);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.scene-node {
  fill: none;
}

/* A dark pass behind the light one, the way ink survives over a photograph.
 * It is an offset-free outline, not a glow. */
.scene-leader-shadow,
.scene-node-shadow {
  fill: none;
  stroke: rgba(6, 8, 6, 0.55);
  stroke-width: 4.4;
  vector-effect: non-scaling-stroke;
}

.scene-label,
.scene-label-shadow {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.01em;
}

.scene-label {
  fill: rgba(232, 230, 218, 0.9);
}

.scene-label-shadow {
  fill: none;
  stroke: rgba(6, 8, 6, 0.62);
  stroke-width: 4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.scene-callout {
  cursor: pointer;
}

.scene-callout .scene-leader,
.scene-callout .scene-node,
.scene-callout .scene-label {
  transition: stroke 0.18s ease, fill 0.18s ease;
}

.scene-callout:hover .scene-leader,
.scene-callout:focus-visible .scene-leader,
.scene-callout:hover .scene-node,
.scene-callout:focus-visible .scene-node {
  stroke: var(--copper);
}

.scene-callout:hover .scene-node,
.scene-callout:focus-visible .scene-node {
  fill: var(--copper);
}

.scene-callout:hover .scene-label,
.scene-callout:focus-visible .scene-label {
  fill: #f2efe2;
}

.scene-callout:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- content */

.home-hero-inner {
  display: grid;
  align-content: space-between;
  gap: clamp(2rem, 5vh, 4rem);
  height: 100%;
  min-height: 100svh;
  padding: calc(78px + clamp(1.5rem, 5vh, 4.5rem)) var(--gutter) clamp(1.6rem, 3.5vh, 2.6rem);
}

.home-offer {
  max-width: min(66rem, 100%);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 6.2vw, 6.2rem);
  line-height: 0.86;
  letter-spacing: -0.032em;
  color: #eae7d9;
  text-shadow: 0 2px 22px rgba(6, 8, 6, 0.55);
}

.home-intake {
  max-width: 48rem;
  margin-top: clamp(1.6rem, 3.2vh, 2.6rem);
}

.home-intake label {
  display: block;
  max-width: 66ch;
  margin-bottom: 1rem;
  color: #d6d4c7;
  font-size: 0.95rem;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(6, 8, 6, 0.75);
}

.home-intake-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  background: rgba(16, 20, 15, 0.82);
  box-shadow: inset 0 0 0 1px var(--edge-strong), inset 0 1px 0 var(--edge-light);
  clip-path: polygon(
    0 0,
    calc(100% - var(--chamfer)) 0,
    100% var(--chamfer),
    100% 100%,
    var(--chamfer) 100%,
    0 calc(100% - var(--chamfer))
  );
}

.home-intake-row input {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 54px;
  padding: 0 1.05rem;
  border: 0;
  background: transparent;
  color: var(--metal);
  font-size: 0.98rem;
}

.home-intake-row input::placeholder {
  color: var(--metal-4);
}

.home-intake-row input:focus {
  outline: 0;
  background: rgba(214, 213, 202, 0.06);
}

.home-intake-row .action-primary {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 0 1.3rem;
  font-size: 0.87rem;
}

.home-intake-note {
  max-width: 52ch;
  margin-top: 0.95rem;
  color: #b6bbb1;
  font-size: 0.81rem;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(6, 8, 6, 0.95), 0 2px 14px rgba(6, 8, 6, 0.85);
}

.home-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 0;
  color: #d6d9cf;
  font-size: 0.9rem;
}

.home-hero-links a {
  color: #f0c19a;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.home-hero-links a:hover {
  color: #fff2df;
}

/* ------------------------------------------------------------ datum rule */

.home-datum {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2.4vw, 2.6rem);
  margin: 0;
  padding-top: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(226, 224, 212, 0.22);
}

.home-datum-item {
  position: relative;
  min-width: 0;
  padding-top: 0.5rem;
}

/* The tick belongs to the rule: a real graduation, not an ornament beside a
 * label. Each item marks its own division on the line above it. */
.home-datum-item::before {
  content: "";
  position: absolute;
  top: -1.15rem;
  left: 0;
  width: 1px;
  height: 0.6rem;
  background: rgba(226, 224, 212, 0.5);
}

.home-datum dt {
  color: #e6e3d5;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(6, 8, 6, 0.7);
}

.home-datum dd {
  max-width: 24ch;
  margin: 0.55rem 0 0;
  color: #9aa197;
  font-size: 0.74rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(6, 8, 6, 0.7);
}

@media (max-width: 1100px) {
  .home-datum {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem clamp(1rem, 3vw, 2.5rem);
  }
}

@media (max-width: 900px) {
  .home-hero-inner {
    padding-top: calc(70px + 2.5rem);
  }

  .home-hero h1 {
    font-size: clamp(2.9rem, 13vw, 5rem);
  }
}

@media (max-width: 620px) {
  /* Two columns, not one: a single column pushes the last two facts off the
   * first screen and the hero stops owning it. */
  .home-datum {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.2rem;
  }

  .home-datum dt {
    font-size: 1.05rem;
    white-space: normal;
  }

  .home-datum dd {
    font-size: 0.7rem;
  }

  .home-intake-row .action-primary {
    flex: 1 1 100%;
    justify-content: center;
  }

  .home-intake label {
    font-size: 0.88rem;
  }

  .home-intake-note {
    font-size: 0.76rem;
  }

  /* The 2:1 photograph crops to its middle on a tall screen, so the parts land
   * exactly where the rule sits. Carry the ground further up to keep the
   * numbers on a dark surface. */
  .home-scene-feather {
    background-image: linear-gradient(
        180deg,
        rgba(9, 11, 8, 0.9) 0%,
        rgba(9, 11, 8, 0.74) 12%,
        rgba(9, 11, 8, 0.56) 26%,
        rgba(9, 11, 8, 0.5) 40%,
        rgba(9, 11, 8, 0.6) 50%,
        rgba(10, 12, 9, 0.75) 58%,
        rgba(11, 13, 10, 0.85) 66%,
        rgba(13, 15, 12, 0.91) 76%,
        rgba(15, 18, 13, 0.95) 86%,
        rgba(16, 19, 14, 0.98) 94%,
        #11130f 100%
      ),
      linear-gradient(90deg, rgba(9, 11, 8, 0.45) 0%, rgba(9, 11, 8, 0.18) 60%, rgba(9, 11, 8, 0) 100%);
  }

  .home-intake-note {
    color: #c2c7bd;
  }

  .home-datum dd {
    color: #aab0a6;
  }
}

/* --------------------------------------------------------- measure band */

.home-measure {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.home-plate {
  margin: 0;
}

.home-curve {
  width: 100%;
  height: auto;
}

.home-curve-frame path {
  fill: none;
  stroke: rgba(214, 213, 202, 0.35);
  stroke-width: 1.2;
}

.home-curve-tick text {
  fill: var(--metal-3);
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.home-curve-speed {
  fill: none;
  stroke: var(--metal);
  stroke-width: 2.4;
}

.home-curve-current {
  fill: none;
  stroke: var(--copper);
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.home-curve-point circle {
  fill: var(--metal);
  stroke: #101410;
  stroke-width: 2;
}

.home-curve-point path {
  fill: none;
  stroke: rgba(214, 213, 202, 0.4);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.home-curve-key text {
  fill: var(--metal-2);
  font-family: var(--body);
  font-size: 12.5px;
}

.home-curve-key text.is-current,
.home-curve-tick text.is-current {
  fill: var(--copper);
}

.home-plate figcaption {
  max-width: 60ch;
  margin-top: 1.1rem;
  color: var(--metal-3);
  font-size: 0.83rem;
  line-height: 1.6;
}

.home-plate figcaption a {
  color: var(--metal-2);
  font-family: var(--mono);
  font-size: 0.94em;
  box-shadow: inset 0 -1px 0 var(--copper-deep);
}

.home-plate figcaption a:hover {
  color: var(--metal);
  box-shadow: inset 0 -1px 0 var(--copper);
}

.home-measure-list h3 {
  margin-bottom: 0.4rem;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--metal);
}

.home-measure-list .action {
  margin-top: 1.8rem;
}

@media (max-width: 940px) {
  .home-measure {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------- packet band */

.home-packet {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2.5rem, 4.5vw, 3.5rem);
}

.home-packet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-packet-list li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.3rem clamp(1rem, 2vw, 2rem);
  align-items: baseline;
  padding: 0.95rem 0;
  box-shadow: inset 0 -1px 0 var(--paper-edge);
}

.home-packet-list li:first-child {
  box-shadow: inset 0 1px 0 rgba(20, 23, 15, 0.28), inset 0 -1px 0 var(--paper-edge);
}

.home-packet-list span {
  color: var(--copper-deep);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.home-packet-list b {
  color: var(--paper-ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.home-packet-list i {
  color: var(--paper-ink-3);
  font-size: 0.86rem;
  font-style: normal;
  line-height: 1.55;
}

.home-packet .note {
  margin-top: 0;
}

@media (max-width: 1000px) {
  .home-packet {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .home-packet-list li {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .home-packet-list i {
    grid-column: 2;
  }
}

/* ---------------------------------------------------- the teardown record */

.home-record-band {
  padding-bottom: clamp(2.5rem, 4vw, 4.5rem);
}

.home-record-band .band-inner {
  max-width: 1560px;
  margin: 0 auto;
}

.home-record {
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
}

.home-record-plate {
  width: 100%;
  height: auto;
}

.home-record figcaption {
  max-width: 62ch;
  margin-top: 1.4rem;
  color: var(--metal-3);
  font-size: 0.86rem;
  line-height: 1.62;
}

@media (max-width: 760px) {
  /* Below this width the labels would be smaller than the site's smallest
   * legible size, so the plate becomes the photograph and the parts are named
   * in the routes underneath it instead. */
  .home-record-callouts {
    display: none;
  }
}
.home-packet-band .open-inline,
.home-packet-band .open-inline .open-lead {
  text-align: center;
}

/* This band is the one centred composition on the page, so every part of it
 * is centred on the same axis and every measure is a fluid one: the display
 * line, the paragraph under it and the route out all share the column and
 * narrow with the viewport instead of stepping down at a breakpoint. */
.home-manufacturing-proof .band-inner {
  text-align: center;
}

.home-manufacturing-proof .open-statement {
  width: min(100%, 82rem);
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: center;
}

.home-manufacturing-proof .statement {
  max-width: min(100%, 26ch);
  margin-left: auto;
  margin-right: auto;
}

.home-manufacturing-proof .statement-lead {
  max-width: min(100%, 72ch);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.home-manufacturing-proof .action {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-top: clamp(1.6rem, 2.6vw, 2.6rem);
}

.home-research-band {
  border-top: 1px solid var(--edge-strong);
  border-bottom: 1px solid var(--edge);
}
