/* madefromfile — pre-launch holding page
 *
 * The page is an engineering drawing: hairline frame, corner ticks, spec
 * table, title block along the bottom. Everything is ink on drafting film;
 * the one colour on the page is the material being extruded.
 *
 * Deliberately single-theme. This is a website, not a themeable document, so
 * every colour is painted explicitly rather than inherited from the host.
 */

:root {
  /* Drafting film and ink. The neutrals carry a slight green bias so they
     read as film stock rather than as an unconsidered grey. */
  --film:     #E7E8E2;
  --film-2:   #F3F4EF;
  --ink:      #10161A;
  --ink-mid:  #5A645E;
  --rule:     #C6C9C0;

  /* Machinist layout blue — the only colour, spent on the live layer, the
     status LED and the primary action. Nothing else gets to be coloured. */
  --live:     #1B44D8;
  --live-ink: #12309A;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono:    "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gap:   clamp(1.5rem, 4vw, 2.75rem);
  --inset: clamp(0.75rem, 2.2vw, 1.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--film);

  /* 8 mm drafting grid, well under the threshold of notice. */
  background-image:
    linear-gradient(to right,  rgba(16,22,26,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16,22,26,.045) 1px, transparent 1px);
  background-size: 32px 32px;

  color: var(--ink);
  font-family: var(--display);
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#plot {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- the sheet ---------- */

.sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--inset) * 2);
  margin: var(--inset);
  padding: var(--gap);
  border: 1px solid var(--rule);
}

/* Corner ticks — the registration marks a drawing frame carries. */
.tick {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 0 solid var(--ink);
  opacity: .55;
}
.tick--tl { top: -1px;    left: -1px;  border-top-width: 2px;    border-left-width: 2px;  }
.tick--tr { top: -1px;    right: -1px; border-top-width: 2px;    border-right-width: 2px; }
.tick--bl { bottom: -1px; left: -1px;  border-bottom-width: 2px; border-left-width: 2px;  }
.tick--br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.mark { width: 26px; height: 26px; flex: none; color: var(--ink); }

.wordmark {
  font-size: 1.0625rem;
  font-weight: 620;
  font-stretch: 108%;
  letter-spacing: -.015em;
}

.wordmark__mid { color: var(--ink-mid); }

.rev {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

/* ---------- body ---------- */

.body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: clamp(2.5rem, 7vh, 4.5rem) 0;
  max-width: 33rem;   /* keeps the lede near 65 characters */
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  align-self: flex-start;
  margin: 0;
  font-family: var(--mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.status__led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--live);
  animation: blink 2.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 45%, 100% { opacity: 1; }
  60%,  85%     { opacity: .25; }
}

.headline {
  margin: 0;
  font-size: clamp(3rem, 10.5vw, 5.25rem);
  font-weight: 640;
  font-stretch: 115%;
  line-height: .96;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.lede {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.0625rem);
  color: var(--ink-mid);
}

/* ---------- spec table ---------- */

.specs {
  margin: .25rem 0 0;
  border-top: 1px solid var(--rule);
}

.specs__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
}

.specs dt {
  font-family: var(--mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding-top: .2rem;
}

.specs dd {
  margin: 0;
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- actions ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  margin-top: .5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6875rem 1.25rem;
  border: 1px solid var(--ink);
  font-size: .875rem;
  font-weight: 560;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.btn--solid {
  background: var(--live);
  border-color: var(--live);
  color: var(--film-2);
}
.btn--solid:hover { background: var(--live-ink); border-color: var(--live-ink); }

.btn--line {
  background: transparent;
  color: var(--ink);
}
.btn--line:hover { border-color: var(--live); color: var(--live-ink); }

.btn:focus-visible,
.field__val a:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 2px;
}

/* ---------- title block ---------- */

.titleblock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  background: var(--film-2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: .1875rem;
  padding: .625rem .875rem;
  border-right: 1px solid var(--rule);
  min-width: 0;
}

.field--last { border-right: 0; }

.field__key {
  font-family: var(--mono);
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.field__val {
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field__val a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.field__val a:hover { color: var(--live-ink); border-bottom-color: currentColor; }

/* ---------- responsive ---------- */

@media (max-width: 46rem) {
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .field:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .field:nth-child(2n)   { border-right: 0; }
  .specs__row { grid-template-columns: 7rem 1fr; }
}

@media (max-width: 30rem) {
  .actions .btn { flex: 1 1 100%; }
  .specs__row   { grid-template-columns: 1fr; gap: .125rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  #plot { display: none; }
}
