/*
  The Alchemy Group. Landing sheet ("Coming soon").

  The layout and the words are Pablo Ehlers' sheet of 2026-12-05: a label and an issue stamp
  at the top, the wordmark with "Coming soon." and the premise in the middle, and a ruled
  footer with the trade, the territory, the contact, a graphic scale and a registration mark.

  Every colour and every face is named once, in :root. Nothing below that block states a value.
  Colour schedule: brand guide p.20. Faces: p.21. Micrographics: p.23.
*/

/* The faces below are used only where the brand faces are not installed. See --sans / --mono.
   A device that already carries one of them uses its own copy. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300;
  font-display: fallback;
  src: local("Roboto Light"), local("Roboto-Light"), url("/assets/fonts/roboto-latin-300.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: local("Roboto Bold"), local("Roboto-Bold"), url("/assets/fonts/roboto-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "DejaVu Sans Mono";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: local("DejaVu Sans Mono"), url("/assets/fonts/dejavu-sans-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "DejaVu Sans Mono";
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: local("DejaVu Sans Mono Bold"), local("DejaVuSansMono-Bold"), url("/assets/fonts/dejavu-sans-mono-latin-700.woff2") format("woff2");
}

:root {
  /* Colour schedule */
  --carbon: #1C1C1B;
  --graphite: #605F60;
  --limestone: #B1ADA5;
  --plaster: #EFEFEF;
  /* The guide sets the marks "in Carbon on Plaster or white" (p.26). */
  --white: #FFFFFF;

  /* Roles, for the white sheet (Gaudi Castro, 2026-12-05). The Carbon sheet is below. */
  --field: var(--white);
  --ink: var(--carbon);
  --ink-quiet: var(--graphite);
  --rule: var(--limestone);

  /* Faces. Helvetica Neue and Menlo are the brand faces and ship with Apple devices, where
     they are used as installed. Everywhere else Roboto and DejaVu Sans Mono stand in: Roboto
     sets within a hair of Helvetica Neue, and Menlo was drawn from DejaVu Sans Mono. "Bold
     carries headlines. Light carries running text" (p.21). No visitor falls through to a
     browser default. */
  --sans: "Helvetica Neue", "Roboto", Arial, sans-serif;
  --mono: Menlo, "DejaVu Sans Mono", monospace;

  /* Sheet margins. */
  --gutter-x: clamp(24px, 4.6vw, 96px);
  --gutter-y: clamp(24px, min(4.6vw, 6vh), 88px);

  /* The primary wordmark never sets under 300px (responsive logo system, p.17). It takes a
     little over half the sheet's width, and it is the piece that gives way when the window is
     short: everything else on the sheet needs about --sheet-fixed plus 29% of the height,
     and the type under the mark is cut to the mark's own width (see .status and .premise). */
  --sheet-fixed: 340px;
  --mark-w: max(300px, min(clamp(300px, 53vw, max(680px, 40vw)), calc(128vh - var(--sheet-fixed))));

  /* The drawing-sheet lettering. Its sizes are rem steps, never a share of the window, so
     they follow a visitor's own text size exactly. */
  --label: 0.6875rem;
  --micro: 0.5625rem;
  --track: 0.14em;
}

/* Narrow sheets: the label and the stamp have to share one line, so the lettering closes up. */
@media (max-width: 399.98px) {
  :root {
    --track: 0.09em;
  }
}
@media (max-width: 359.98px) {
  :root {
    --label: 0.625rem;
    --track: 0.06em;
  }
}

/* Wide sheets: the lettering steps up with the sheet, and takes a little more of the height. */
@media (min-width: 1024px) {
  :root {
    --label: 0.75rem;
  }
}
@media (min-width: 1536px) {
  :root {
    --label: 0.8125rem;
    --micro: 0.625rem;
    --sheet-fixed: 352px;
  }
}
@media (min-width: 2048px) {
  :root {
    --label: 0.9375rem;
    --micro: 0.6875rem;
    --sheet-fixed: 372px;
  }
}

/* The same sheet on Carbon, as it was first drawn. */
.sheet--dark {
  --field: var(--carbon);
  --ink: var(--plaster);
  --ink-quiet: var(--limestone);
  --rule: var(--graphite);
  color-scheme: dark;
}

@media (prefers-contrast: more) {
  :root,
  .sheet--dark {
    --ink-quiet: var(--ink);
    --rule: var(--ink);
  }
}

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

html {
  background: var(--field);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  padding:
    max(var(--gutter-y), env(safe-area-inset-top))
    max(var(--gutter-x), env(safe-area-inset-right))
    max(var(--gutter-y), env(safe-area-inset-bottom))
    max(var(--gutter-x), env(safe-area-inset-left));
  background: var(--field);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.2;
  /* A missing bold must show up as a missing bold, never as a smeared regular. */
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--ink);
  color: var(--field);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Drawing-sheet lettering: the top and the foot of the sheet ───────────── */

.sheethead,
.sheetfoot {
  min-width: 0;
  font-family: var(--mono);
  font-size: var(--label);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink-quiet);
}

/* ── Top: the sheet label and the issue stamp ─────────────────────────────── */

.sheethead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 12px;
}

.sheethead__id,
.stamp {
  min-width: 0;
  margin: 0;
}

.sheethead__id {
  line-height: 1.4;
}

.sheethead__name,
.sheethead__no,
.stamp__sheet,
.stamp__status {
  display: block;
}

.stamp {
  padding: clamp(7px, 1.9vw, 14px) clamp(8px, 2.6vw, 18px);
  border: 1px solid var(--rule);
  line-height: 1.8;
  text-align: right;
}

.stamp__status {
  font-weight: 700;
  color: var(--ink);
}

/* ── Middle: the wordmark, the status and the premise ─────────────────────── */

.hero {
  align-self: center;
  min-width: 0;
  padding-block: clamp(20px, 4vh, 64px);
}

.mark {
  margin: 0;
  line-height: 0;
}

.mark__art {
  display: block;
  max-width: 100%;
  height: auto;
}

.mark__art--primary {
  width: var(--mark-w);
}

/* The next mark down, for a column narrower than the wordmark's 300px minimum. */
.mark__art--compact {
  display: none;
  width: min(100%, 300px);
}

@media (max-width: 347.98px) {
  .mark__art--primary {
    display: none;
  }
  .mark__art--compact {
    display: block;
  }

  /* That mark spells the name out in capitals, so the label above it keeps only its number. */
  .sheethead__name {
    display: none;
  }
}

/* The status and the premise are cut to the mark's width. The second term adds the same
   amount again as a visitor's own text size goes from 100% to 200% (1rem - 16px is nothing
   at the default size), so these two lines grow with that setting like the rest. */
.status {
  margin: clamp(22px, var(--mark-w) * 0.085, 88px) 0 0;
  font-size: clamp(1.75rem, var(--mark-w) * 0.078 + min(max(0px, (1rem - 16px) * 5), var(--mark-w) * 0.078), 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.premise {
  margin: clamp(10px, var(--mark-w) * 0.036, 38px) 0 0;
  font-size: clamp(1.0625rem, var(--mark-w) * 0.046 + min(max(0px, (1rem - 16px) * 2.75), var(--mark-w) * 0.046), 2.75rem);
  font-weight: 300;
  line-height: 1.35;
  color: var(--ink-quiet);
}

/* Each sentence holds together: when the line is too short for both, the second one
   drops to its own line whole. */
.premise__s {
  display: inline-block;
  max-width: 100%;
  text-wrap: balance;
}

/* ── Foot: the trade, the territory, the contact, and the micrographics ───── */

.sheetfoot {
  padding-top: clamp(16px, 3vh, 30px);
  border-top: 1px solid var(--rule);
}

.foot__line {
  margin: 0;
}

.foot__line + .foot__line {
  margin-top: clamp(3px, 0.9vh, 8px);
}

/* The one thing on the sheet to act on. Its box is its own line and no more, so the focus
   ring drawn around it stays clear of the line above. */
.contact {
  position: relative;
  display: inline-block;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}

.contact:hover {
  text-decoration-thickness: 2px;
}

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

.contact:active {
  color: var(--ink-quiet);
}

/* Its target reaches past the letters: a little with a mouse, so the lines around the
   address stay selectable, and to a full fingertip on a touch screen. There it grows
   downward, into the open ground under the address, and not up over the line above. */
.contact::after {
  content: "";
  position: absolute;
  inset: -5px 0;
}

@media (pointer: coarse) {
  .contact::after {
    inset: -4px -10px -26px;
  }
}

.foot__marks {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px clamp(24px, 4.4vw, 48px);
  margin-top: clamp(18px, 4vh, 40px);
}

/* Graphic scale, as the guide draws it (p.23): an open bar with the 4 to 8 division filled.
   The bar takes its colour from this box and not from a rule of its own, so it follows a
   forced palette (Windows high contrast) like the type around it. */
.scale {
  flex: none;
  width: clamp(164px, 27.5vw, max(216px, 12.5vw));
  margin: 0;
  color: var(--ink);
}

.scale__label,
.scale__ticks {
  display: block;
  font-size: var(--micro);
  color: var(--ink-quiet);
}

.scale__label {
  line-height: 1.2;
}

.scale__bar {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 6px;
  border: 1px solid currentColor;
}

.scale__ticks {
  position: relative;
  height: 1.3em;
  margin-top: 5px;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.scale__ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.scale__ticks span:nth-child(1) {
  left: 0;
  transform: none;
}
.scale__ticks span:nth-child(2) {
  left: 25%;
}
.scale__ticks span:nth-child(3) {
  left: 50%;
}
.scale__ticks span:nth-child(4) {
  left: 100%;
  transform: translateX(-100%);
}

/* Registration mark */
.reg {
  flex: none;
  width: clamp(38px, 5.4vw, max(46px, 2.4vw));
  height: auto;
  aspect-ratio: 1;
}

.legal {
  min-width: 0;
  margin: 0 0 0 auto;
  line-height: 1.4;
  text-align: right;
}

.legal span {
  display: block;
}

/* Line art, drawn in the ink colour so it follows the sheet in either colour */
.lineart {
  fill: none;
  stroke: currentColor;
  stroke-width: 1px;
}

.lineart circle,
.lineart path {
  vector-effect: non-scaling-stroke;
}

.lineart__solid {
  fill: currentColor;
  stroke: none;
}

/* ── A narrow sheet: the legal line takes its own row, on the left edge ───── */

@media (max-width: 559.98px) {
  .legal {
    flex-basis: 100%;
    margin-left: 0;
    text-align: left;
  }

  .legal span {
    display: inline;
  }
}
