/* ============================================================
   ZININ LOGOMARKS — HTML/CSS widgets, scale via font-size on parent.
   Three concepts, multiple variants each. No SVG paths — real type.
============================================================ */

/* Shared */
.zmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--font-display);
  color: currentColor;
  line-height: 1;
  user-select: none;
}
.zmark.center { align-items: center; }
.zmark .row { display: flex; align-items: center; gap: 0.25em; line-height: 1; }

/* ====================================================
   A · BLOCK — Archivo Black, masthead style
   Brutalist publication ID.  ZININ.AI on a thick rule + mono descriptor.
==================================================== */
.zmark-block {
  font-family: "Archivo Black", "Archivo", system-ui, sans-serif;
}
.zmark-block .word {
  display: inline-flex;
  align-items: baseline;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-weight: 900;
  white-space: nowrap;
}
.zmark-block .word .main {
  font-size: 1em;
  line-height: 0.86;
}
.zmark-block .word .dot {
  color: var(--red);
  font-size: 1em;
  line-height: 0.86;
}
.zmark-block .word .tld {
  font-size: 1em;
  line-height: 0.86;
  letter-spacing: -0.045em;
}
.zmark-block.alarm .word .dot { color: inherit; }
.zmark-block .rule {
  width: 100%;
  height: 0.075em;
  background: currentColor;
  margin-top: 0.18em;
}
.zmark-block .desc {
  margin-top: 0.12em;
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 1em;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.16em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Striped sub-variant — hairline rules across the wordmark band */
.zmark-block.striped .word {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 0.08em,
    color-mix(in srgb, currentColor 12%, transparent) 0.08em,
    color-mix(in srgb, currentColor 12%, transparent) 0.09em
  );
  padding: 0.04em 0;
}

/* ====================================================
   B · MONOLITH — heavy black plaque, knocked-out wordmark
   Black-dominant brutalist label.
==================================================== */
.zmark-monolith {
  font-family: "Archivo Black", "Archivo", system-ui, sans-serif;
  display: inline-flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  padding: 0.32em 0.42em 0.28em;
  position: relative;
  line-height: 1;
}
.zmark-monolith.alarm { background: var(--paper); color: var(--ink); }
.zmark-monolith .word {
  font-size: 1em;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 0.86;
  font-weight: 900;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
}
.zmark-monolith .word .dot { color: var(--red); }
.zmark-monolith.alarm .word .dot { color: inherit; }
.zmark-monolith .corner {
  position: absolute; top: 0; right: 0;
  width: 0.42em; height: 0.16em;
  background: var(--red);
}
.zmark-monolith.alarm .corner { background: var(--ink); }
.zmark-monolith .corner-bl {
  position: absolute; bottom: 0; left: 0;
  width: 0.18em; height: 0.16em;
  background: var(--red);
}
.zmark-monolith.alarm .corner-bl { background: var(--ink); }
.zmark-monolith .desc {
  margin-top: 0.12em;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.14em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  z-index: 2;
  position: relative;
  border-top: 0.07em solid currentColor;
  padding-top: 0.4em;
}
/* striped overlay variant — hairline rules across the plaque */
.zmark-monolith.striped::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 0.085em,
    rgba(255, 255, 255, 0.09) 0.085em,
    rgba(255, 255, 255, 0.09) 0.095em
  );
  z-index: 1;
  pointer-events: none;
}
.zmark-monolith.striped.alarm::before {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 0.085em,
    rgba(0, 0, 0, 0.09) 0.085em,
    rgba(0, 0, 0, 0.09) 0.095em
  );
}

/* ====================================================
   C · OPUS — serif wordmark with constructivist stripe ornament
   Stripes / rhythmic horizontal bars behind the word.
==================================================== */
.zmark-opus {
  font-family: "DM Serif Display", "Times New Roman", serif;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.zmark-opus .stripes-top, .zmark-opus .stripes-bot {
  display: flex;
  flex-direction: column;
  gap: 0.04em;
  width: 100%;
  align-items: flex-start;
}
.zmark-opus .stripes-top { margin-bottom: 0.18em; }
.zmark-opus .stripes-bot { margin-top: 0.18em; align-items: flex-end; }
.zmark-opus .s {
  height: 0.06em;
  background: currentColor;
  border: 0;
  margin: 0;
}
.zmark-opus .s.red  { background: var(--red); }
.zmark-opus .s.w100 { width: 100%; }
.zmark-opus .s.w70  { width: 70%; }
.zmark-opus .s.w55  { width: 55%; }
.zmark-opus .s.w40  { width: 40%; }
.zmark-opus .s.w25  { width: 25%; }
.zmark-opus.alarm .s.red { background: currentColor; }
.zmark-opus .word {
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.92;
  white-space: nowrap;
  position: relative;
  padding: 0 0.06em;
}
.zmark-opus .word .dot { color: var(--red); font-style: italic; }
.zmark-opus.alarm .word .dot { color: currentColor; }
.zmark-opus .desc {
  margin-top: 0.18em;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-style: normal;
  font-size: 0.13em;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1;
}

/* ============================================================
   COMPACT BRANDMARK — TWO-LETTER "ZN" (replaces Z-only)
==================================================== */
.zmark-compact {
  display: inline-grid;
  place-items: center;
  width: 1.4em; height: 1em;
  font-size: 64px;
  line-height: 1;
  font-family: "Archivo Black", "Archivo", sans-serif;
  background: var(--red);
  color: var(--paper);
  position: relative;
  letter-spacing: -0.08em;
  padding: 0.05em 0.1em;
}
.zmark-compact::after {
  content: "ZN";
  font-size: 0.86em;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.zmark-compact .bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 0.12em;
  width: 35%;
  background: var(--ink);
}
.zmark-compact.ink { background: var(--ink); color: var(--paper); }
.zmark-compact.ink .bar { background: var(--red); }
.zmark-compact.red { background: var(--red); color: var(--paper); }
.zmark-compact.red .bar { background: var(--ink); }
.zmark-compact.outline { background: transparent; color: currentColor; border: 0.04em solid currentColor; }
.zmark-compact.outline .bar { background: currentColor; }

/* Sizing helpers — set --m to mark height in px. Outer sets font-size. */
.mark-xs { font-size: 28px; }
.mark-sm { font-size: 44px; }
.mark-md { font-size: 64px; }
.mark-lg { font-size: 88px; }
.mark-xl { font-size: 128px; }
.mark-xxl { font-size: 168px; }

/* Concept slot — toggles which variant displays.
   Body data-concept attribute drives visibility. */
.logo-slot { display: contents; }
.logo-slot .v-block,
.logo-slot .v-monolith,
.logo-slot .v-opus { display: none !important; }
[data-concept="block"]    .logo-slot .v-block    { display: inline-flex !important; }
[data-concept="monolith"] .logo-slot .v-monolith { display: inline-flex !important; }
[data-concept="opus"]     .logo-slot .v-opus     { display: inline-flex !important; }

/* ============================================================
   RED-SURFACE OVERRIDES — when the mark sits on a red bg,
   the red accent dot flips to currentColor so it stays visible.
============================================================ */
[data-palette="alarm"] .zmark-block .word .dot,
.page.red .zmark-block .word .dot,
.box.red .zmark-block .word .dot,
.lab-cell.red .zmark-block .word .dot,
.concept-stage.red .zmark-block .word .dot,
.slide.red .zmark-block .word .dot,
.bizcard.red .zmark-block .word .dot,
.avatar.red .zmark-block .word .dot,
.cert.red .zmark-block .word .dot,
.partner-card.red .zmark-block .word .dot,
.app-card.red .zmark-block .word .dot { color: inherit; }

[data-palette="alarm"] .zmark-monolith,
.page.red .zmark-monolith,
.lab-cell.red .zmark-monolith,
.concept-stage.red .zmark-monolith,
.slide.red .zmark-monolith,
.bizcard.red .zmark-monolith,
.avatar.red .zmark-monolith,
.cert.red .zmark-monolith,
.partner-card.red .zmark-monolith { background: var(--ink); color: var(--paper); }

[data-palette="alarm"] .zmark-monolith .word .dot,
.page.red .zmark-monolith .word .dot,
.lab-cell.red .zmark-monolith .word .dot,
.concept-stage.red .zmark-monolith .word .dot,
.slide.red .zmark-monolith .word .dot,
.bizcard.red .zmark-monolith .word .dot,
.cert.red .zmark-monolith .word .dot,
.partner-card.red .zmark-monolith .word .dot { color: var(--red); }

[data-palette="alarm"] .zmark-monolith .corner,
[data-palette="alarm"] .zmark-monolith .corner-bl,
.page.red .zmark-monolith .corner,
.page.red .zmark-monolith .corner-bl,
.lab-cell.red .zmark-monolith .corner,
.lab-cell.red .zmark-monolith .corner-bl,
.concept-stage.red .zmark-monolith .corner,
.concept-stage.red .zmark-monolith .corner-bl,
.slide.red .zmark-monolith .corner,
.slide.red .zmark-monolith .corner-bl { background: var(--red); }

[data-palette="alarm"] .zmark-opus .word .dot,
.page.red .zmark-opus .word .dot,
.lab-cell.red .zmark-opus .word .dot,
.concept-stage.red .zmark-opus .word .dot,
.slide.red .zmark-opus .word .dot,
.bizcard.red .zmark-opus .word .dot,
.cert.red .zmark-opus .word .dot,
.partner-card.red .zmark-opus .word .dot { color: currentColor; }

[data-palette="alarm"] .zmark-opus .s.red,
.page.red .zmark-opus .s.red,
.lab-cell.red .zmark-opus .s.red,
.concept-stage.red .zmark-opus .s.red,
.slide.red .zmark-opus .s.red,
.bizcard.red .zmark-opus .s.red,
.cert.red .zmark-opus .s.red,
.partner-card.red .zmark-opus .s.red { background: currentColor; }

/* Compact ZN-brandmark on red surface */
[data-palette="alarm"] .zmark-compact:not(.outline):not(.red) { background: var(--ink); color: var(--paper); }
[data-palette="alarm"] .zmark-compact:not(.outline):not(.red) .bar { background: var(--paper); }
[data-palette="alarm"] .zmark-compact.red { background: var(--ink); color: var(--paper); }
[data-palette="alarm"] .zmark-compact.red .bar { background: var(--paper); }
