/* ============================================================
   SPEKTR — technical specimen sheet
   Monochrome. Rounded grotesque display + technical mono micro-type.
   One fixed screen, no scroll.
   ============================================================ */

:root {
  --paper: #fbfbfa;
  --room: #e7e7e5;
  --ink: #111110;
  --ink-45: rgba(17, 17, 16, 0.45);
  --ink-30: rgba(17, 17, 16, 0.3);
  --hair: rgba(17, 17, 16, 0.22);

  --display: "M PLUS Rounded 1c", "Helvetica Neue", Arial, sans-serif;
  --micro: "Martian Mono", ui-monospace, "SFMono-Regular", monospace;

  --pad: clamp(1rem, 2.6vw + 0.6vh, 3rem);
  --micro-size: clamp(0.5rem, 0.42vw + 0.42vh, 0.6875rem);
  --track: 0.11em;
}

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

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

body {
  margin: 0;
  background: var(--room);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  overflow: hidden;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- micro type primitives ---------- */

.micro,
.slug {
  font-family: var(--micro);
  font-size: var(--micro-size);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: var(--track);
  text-transform: uppercase;
  margin: 0;
}

.slug {
  color: var(--ink-45);
}

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

.sheet {
  position: relative;
  height: 100svh;
  max-width: 78rem;
  margin: 0 auto;
  padding: var(--pad);
  background: var(--paper);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

/* safety valve: on very short or very narrow viewports let it scroll
   rather than clip the registry data a reviewer needs to read */
@media (max-height: 33rem), (max-width: 20rem) {
  body {
    overflow: auto;
  }
  .sheet {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }
}

/* paper grain */
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}

/* ---------- 1 · header strip ---------- */

.strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--ink);
}

.strip__brand {
  letter-spacing: 0.17em;
  color: var(--ink);
}

.strip__end {
  justify-self: end;
  font-family: var(--display);
  font-size: clamp(0.625rem, 0.5vw + 0.4vh, 0.8125rem);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 40em) {
  .strip {
    grid-template-columns: 1fr auto;
  }
  .strip > :nth-child(3) {
    display: none;
  }
}

/* ---------- 2 · headline + meta ---------- */

.headline {
  font-weight: 400;
  font-size: clamp(1.125rem, 2.2vw + 1.1vh, 2.5rem);
  line-height: 1.04;
  letter-spacing: -0.014em;
  text-transform: uppercase;
  margin: clamp(0.5rem, 1.4vh, 1rem) 0 clamp(0.45rem, 1.2vh, 0.85rem);
}

.subgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 1.25rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--ink);
}

@media (max-width: 40em) {
  .subgrid {
    grid-template-columns: 1fr 1fr;
  }
  .subgrid > :nth-child(3) {
    display: none;
  }
}

/* ---------- 3 · wordmark + legal entity (elastic) ---------- */

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.9rem, 3vh, 2.5rem);
  min-height: 0;
  padding: clamp(0.5rem, 2vh, 2rem) 0;
}

.mark {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0 clamp(0.4rem, 1.2vw, 1.25rem);
}

.mark__word {
  margin: 0;
  font-weight: 400;
  font-size: min(15.4vw, 25vh);
  line-height: 0.84;
  letter-spacing: -0.036em;
  text-indent: -0.02em;
}

.mark__stack {
  font-weight: 400;
  font-size: min(3.1vw, 4.8vh);
  line-height: 1.02;
  letter-spacing: -0.01em;
  padding-top: 0.16em;
  white-space: nowrap;
  margin: 0;
}

.entity {
  display: grid;
  gap: clamp(0.3rem, 0.9vh, 0.6rem);
}

.entity__labels {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
}

.entity__rule {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 0;
  width: min(58%, 34rem);
}

.entity__name {
  margin: 0;
  font-weight: 400;
  font-size: min(5vw, 6.8vh);
  line-height: 1.04;
  letter-spacing: -0.021em;
  text-transform: uppercase;
}

/* crosshair diagram, floated in the elastic area */

.diagram {
  position: absolute;
  right: 2.5%;
  bottom: 0;
  width: min(17vw, 22vh);
  color: var(--ink-30);
  pointer-events: none;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 52em) {
  .diagram {
    display: none;
  }
}

/* ---------- 4 · measure strip ---------- */

.measure {
  position: relative;
  height: clamp(0.7rem, 2vh, 1.4rem);
  margin-top: clamp(0.5rem, 1.6vh, 1.2rem);
  border-top: 1px solid var(--ink);
}

.measure::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.4rem;
  background-image: repeating-linear-gradient(
    to right,
    var(--hair) 0 1px,
    transparent 1px 0.55rem
  );
}

.measure::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.72rem;
  background-image: repeating-linear-gradient(
    to right,
    var(--ink-30) 0 1px,
    transparent 1px 2.75rem
  );
}

/* ---------- 5 · registry ---------- */

.registry {
  display: grid;
  /* short numeric fields stay narrow so the address gets the room it needs */
  grid-template-columns:
    minmax(0, 0.72fr) minmax(0, 0.72fr)
    minmax(0, 1.6fr) minmax(0, 1.24fr);
  gap: clamp(0.6rem, 1.6vw, 2rem);
  padding-top: clamp(0.4rem, 1.2vh, 0.9rem);
}

@media (max-width: 52em) {
  .registry {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.25rem;
  }
  /* address and contact are the long ones — give each a full row */
  .registry > :nth-child(3),
  .registry > :nth-child(4) {
    grid-column: 1 / -1;
  }
}

.param__key {
  color: var(--ink-45);
}

.param__val {
  font-weight: 400;
  font-size: clamp(0.8125rem, 0.62vw + 0.55vh, 1.0625rem);
  line-height: 1.32;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0 0;
}

.param__val--mono {
  font-family: var(--micro);
  font-size: clamp(0.75rem, 0.5vw + 0.5vh, 0.9375rem);
  letter-spacing: 0.015em;
}

.param__val a {
  border-bottom: 1px solid var(--hair);
}

.param__val a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- a11y ---------- */

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}
