/* ==========================================================================
   COMPONENTS · the six Sediment primitives, plus site chrome.
   ========================================================================== */

/* --------------------------------------------------------------------------
   01 · METADATA STRIP
   label— + value pairs, gutter-separated, anchored by a hairline below.
   -------------------------------------------------------------------------- */

.meta-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--gutter);
  padding-bottom: 0.9rem;
  border-bottom: var(--rule) solid var(--c-rule);
}

.meta-strip__cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.meta-strip__value {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--c-type);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   02 · DIVIDER
   A hairline + a label sitting just above it.
   -------------------------------------------------------------------------- */

.divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gutter);
  padding-bottom: 0.75rem;
  border-bottom: var(--rule) solid var(--c-rule);
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.divider--double {
  border-bottom-width: 3px;
  border-bottom-style: double;
  border-bottom-color: var(--c-signal-dim);
}

.divider--arrow::after {
  content: "↘";
  font-family: var(--font-headline);
  font-size: var(--fs-h3);
  line-height: 1;
  color: var(--c-signal);
  transform: translateY(0.1em);
}

/* --------------------------------------------------------------------------
   03 · WAYFINDING
   Directional arrows as glyphs. Anton, headline size, coral. They point.
   -------------------------------------------------------------------------- */

.arrow {
  display: inline-block;
  font-family: var(--font-headline);
  color: var(--c-signal);
  line-height: 1;
  transition: transform var(--dur-mid) var(--ease-signature);
}

.arrow--lg {
  font-size: var(--fs-h2);
}

a:hover > .arrow--ne,
button:hover > .arrow--ne {
  transform: translate(0.2em, -0.2em);
}

a:hover > .arrow--se,
button:hover > .arrow--se {
  transform: translate(0.2em, 0.2em);
}

/* --------------------------------------------------------------------------
   04 · DUOTONE
   --ink multiply kills shadows into green; --coral screen lifts highlights.
   Reserved for photography. Never applied to the client's own artwork —
   that work is the product and must render true.
   -------------------------------------------------------------------------- */

.duotone {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.duotone > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
}

.duotone::before,
.duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.duotone::before {
  background: var(--ink);
  mix-blend-mode: multiply;
}

/* Raw pigment, not --c-signal: the duotone is a fixed two-pass recipe so every
   image looks like one press run. Inside .invert the signal flips to forest,
   which would put ink over ink and kill the highlight lift. */
.duotone::after {
  background: var(--coral);
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   05 · IDENTIFIER
   Two-digit numeral + role label. Corner anchor.
   -------------------------------------------------------------------------- */

.identifier {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1;
}

.identifier__num {
  font-family: var(--font-headline);
  font-size: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  color: var(--c-signal);
  line-height: 0.8;
}

.identifier__role {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-mono);
  text-transform: uppercase;
  color: var(--c-type-dim);
}

/* --------------------------------------------------------------------------
   06 · BARCODE
   Pure CSS. Decorative print-callout — never a scannable code.
   -------------------------------------------------------------------------- */

.barcode {
  width: 100%;
  max-width: 180px;
  height: 44px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--c-type) 0 1px,
    transparent 1px 3px,
    var(--c-type) 3px 5px,
    transparent 5px 6px,
    var(--c-type) 6px 9px,
    transparent 9px 12px,
    var(--c-type) 12px 13px,
    transparent 13px 16px
  );
  opacity: 0.7;
}

.barcode-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

/* ==========================================================================
   SITE CHROME
   ========================================================================== */

/* --- Nav ------------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding: 1rem var(--gutter);
  transition:
    transform var(--dur-mid) var(--ease-smooth),
    color var(--dur-mid) var(--ease-smooth);
}

/* Not mix-blend-mode: difference — differencing bone against the Drift
   gradient produces cyan, which is nowhere in the palette. The nav instead
   flips to ink type while it's over a Drift section (hero, contact). */
.nav--on-light {
  --c-type: #081912;
  --c-type-dim: rgba(8, 25, 18, 0.66);
  --c-signal: #0e2a21;
}

.nav.is-hidden {
  transform: translateY(-110%);
}

.nav__mark {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  letter-spacing: var(--tr-headline);
  color: var(--c-type);
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: clamp(1rem, 0.5rem + 1.5vw, 2.25rem);
}

.nav__link {
  position: relative;
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--c-type);
  padding-block: 0.35rem;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--rule);
  background: var(--c-signal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-mid) var(--ease-signature);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__index {
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-mono);
  color: var(--c-type-dim);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }
}

/* --- Cursor · desktop pointer only ---------------------------------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  width: 34px;
  height: 34px;
  border: var(--rule) solid var(--c-signal);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  display: grid;
  place-items: center;
  will-change: transform;
}

.cursor__label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--char);
  opacity: 0;
  white-space: nowrap;
}

.cursor.is-hovering {
  background: var(--c-signal);
}

.cursor.is-hovering .cursor__label {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .cursor {
    display: none;
  }
}

/* --- Preloader ------------------------------------------------------------ */

.preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  background: var(--char);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--gutter);
}

.preloader__center {
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.5rem;
}

.preloader__word {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.5rem, 1.5rem + 6vw, 6rem);
  color: var(--c-type);
  letter-spacing: var(--tr-display);
  line-height: 1;
}

.preloader__bar {
  position: relative;
  width: 100%;
  height: var(--rule);
  background: var(--c-rule);
  overflow: hidden;
}

.preloader__fill {
  position: absolute;
  inset: 0;
  background: var(--c-signal);
  transform: scaleX(0);
  transform-origin: left;
}

.preloader__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--gutter);
  padding-top: 0.75rem;
}

.preloader__count {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 1rem + 4vw, 3.5rem);
  color: var(--c-signal);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.preloader.is-done {
  pointer-events: none;
}

/* --- Marquee -------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  border-block: var(--rule) solid var(--c-rule);
  background: var(--char);
  display: flex;
}

.marquee__track {
  display: flex;
  flex-shrink: 0;
  gap: 2.5rem;
  padding-right: 2.5rem;
  align-items: center;
  animation: marquee-scroll 38s var(--ease-loop) infinite;
}

.marquee__item {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-family: var(--font-headline);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  text-transform: uppercase;
  letter-spacing: var(--tr-headline);
  color: var(--c-type);
  white-space: nowrap;
}

.marquee__item::after {
  content: "✳";
  font-size: 0.5em;
  color: var(--c-signal);
}

@keyframes marquee-scroll {
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
  /* Second copy is decorative padding for the loop — drop it when static. */
  .marquee__track[aria-hidden="true"] {
    display: none;
  }
}

/* --- Buttons / links ------------------------------------------------------ */

.link-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fs-mono);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--c-type);
  padding-bottom: 0.3rem;
  border-bottom: var(--rule) solid var(--c-type-dim);
  transition: border-color var(--dur-mid) var(--ease-smooth);
}

.link-line:hover {
  border-color: var(--c-signal);
}

.link-big {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  font-family: var(--font-headline);
  font-size: var(--fs-h2);
  text-transform: uppercase;
  letter-spacing: var(--tr-headline);
  color: var(--c-type);
  line-height: 1;
  transition: color var(--dur-mid) var(--ease-smooth);
  overflow-wrap: anywhere;
}

.link-big:hover {
  color: var(--c-signal);
}
