/* ==========================================================================
   Deadhead Chemist — the page title band
   ------------------------------------------------------------------------
   Every interior page opens on the same lockup: a violet full-bleed band
   carrying a sticker-cut title, with a line of the site's own mono beneath it
   as secondary text. The sticker is built from four stacked layers of the same
   glyphs, in painting order:

     1. the element itself   black fill + heavy black stroke, and two drops
                             (black, then hot pink) cast off the stroked shape
     2. ::before             the mint-to-blue gradient, clipped to the text
     3. ::after              a top-edge highlight over a halftone dot screen,
                             both clipped to the text

   The pseudo-elements copy their glyphs from data-t, so anything that rewrites
   a title at runtime — the shop's category headings — has to write textContent
   and data-t together. DHUI.setSticker() does both; use it.

   Loads after light.css.
   ========================================================================== */

:root {
  --band:      #7F47DC;
  --band-deep: #5E2FAE;
  --st-ink:    #08080A;
  --st-drop:   #FF2D77;
  --st-fill:   linear-gradient(177deg, #7DF3C8 0%, #45E1AA 20%, #46C9EA 60%, #2A9BE2 100%);
}

/* ── the band ──────────────────────────────────────────────────────────── */
.dh-titleband {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--band);
  border-bottom: 2px solid var(--st-ink);
  padding: clamp(20px, 2.9vw, 40px) var(--gutter) clamp(22px, 3.1vw, 44px);
  text-align: center;
}

/* a dot screen and a soft violet bloom, so the flat band has some depth */
.dh-titleband::before {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .13) 1px, rgba(255, 255, 255, 0) 1.6px);
  background-size: 13px 13px;
  opacity: .85;
}
.dh-titleband::after {
  content: '';
  position: absolute; inset: -40% -10% auto; height: 190%; z-index: -1;
  background: radial-gradient(ellipse at 50% 32%, rgba(205, 183, 255, .20) 0%, rgba(127, 71, 220, 0) 58%);
  pointer-events: none;
}

.dh-titleband .in {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(9px, 1vw, 14px);
}

/* secondary line — the site's own mono, not the sticker face */
.dh-titleband .sub {
  margin: 0;
  max-width: 76ch;
  font: 500 clamp(10px, 1.05vw, 11.5px)/1.6 var(--font-mono);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #F4F0FF;
  text-wrap: balance;
}
.dh-titleband .sub em {
  font-style: normal;
  font-weight: 600;
  color: #B9FAEE;
}

/* the rule under the title, echoing the reference lockup */
.dh-titleband .rule {
  display: block; width: min(180px, 42vw); height: 2px;
  background: linear-gradient(90deg, rgba(8, 8, 10, 0), var(--st-ink) 22%, var(--st-ink) 78%, rgba(8, 8, 10, 0));
  opacity: .55;
}

/* ── the sticker ───────────────────────────────────────────────────────── */
.dh-sticker {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  font-family: "Anybody", var(--font-cta), var(--font-heading), sans-serif;
  font-weight: 900;
  font-style: italic;
  font-stretch: 94%;
  font-variation-settings: 'wdth' 94;
  font-size: clamp(29px, 6.4vw, 66px);
  line-height: 1.04;
  letter-spacing: .015em;
  text-transform: uppercase;
  text-wrap: balance;

  /* layer 1 — the black body, its heavy stroke, and the two drops */
  color: var(--st-ink);
  -webkit-text-stroke: .17em var(--st-ink);
  paint-order: stroke fill;
  text-shadow:
    .030em .036em 0 var(--st-ink),
    .062em .074em 0 var(--st-drop);
}

.dh-sticker::before,
.dh-sticker::after {
  content: attr(data-t);
  position: absolute;
  left: 0; top: 0; width: 100%;
  -webkit-text-stroke: 0;
  text-shadow: none;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
}

/* layer 2 — the mint-to-blue fill */
.dh-sticker::before { background-image: var(--st-fill); }

/* layer 3 — the highlight that catches the top of each letterform, over a
   halftone screen; one pseudo carries both so the DOM stays at two copies */
.dh-sticker::after {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .74) 0%, rgba(255, 255, 255, .28) 13%, rgba(255, 255, 255, 0) 31%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .40) 0 26%, rgba(255, 255, 255, 0) 27%);
  background-size: 100% 100%, .082em .082em;
}

/* a sticker used inline on a dark ground drops the pink and lightens the ink,
   so it reads as art rather than as a misprint */
.dh-sticker--quiet {
  text-shadow: .03em .036em 0 var(--st-ink);
}

/* ── page-title variants ───────────────────────────────────────────────── */
/* the shop's category headings are set at runtime and can run long */
.dh-titleband--tight .dh-sticker { font-size: clamp(26px, 5.4vw, 54px); }

/* ── under the band ────────────────────────────────────────────────────── */
/* the framed hero used to carry the h1; now it opens on its eyebrow, so it
   needs a little less headroom */
.dh-titleband + nav[aria-label="Breadcrumb"] { padding-top: 16px; }

/* ── small screens ─────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .dh-titleband { padding-left: clamp(14px, 4vw, 20px); padding-right: clamp(14px, 4vw, 20px); }
  .dh-sticker {
    /* the stroke and drops scale with the em, so a phone-sized title keeps
       exactly the same proportions the desktop one has */
    font-size: clamp(26px, 8.4vw, 40px);
    letter-spacing: .01em;
  }
  .dh-titleband .sub { letter-spacing: .13em; font-size: 10px; }
  .dh-titleband .rule { width: min(140px, 50vw); }
}

@media (max-width: 400px) {
  .dh-sticker { font-size: clamp(23px, 8.2vw, 32px); }
}

/* Reduced motion changes nothing here — the sticker is static by design — but
   forced-colours mode has to drop the whole effect or the title disappears. */
@media (forced-colors: active) {
  .dh-sticker {
    color: CanvasText;
    -webkit-text-stroke: 0;
    text-shadow: none;
  }
  .dh-sticker::before,
  .dh-sticker::after { display: none; }
}

/* ── the homepage title ────────────────────────────────────────────────────
   The hero headline is the homepage's page title, so it takes the same sticker
   colouring. Its first line keeps the editorial Archivo/serif lockup and the
   two display lines become stickers, which gives the page a read-then-punch
   rhythm the interior bands do not need. */
.dh-hero h1 .dh-sticker--hero {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(38px, 5.6vw, 80px);
  line-height: 1.02;
  font-stretch: 88%;
  font-variation-settings: 'wdth' 88;
  letter-spacing: .006em;
}
@media (max-width: 760px) {
  .dh-hero h1 .dh-sticker--hero { font-size: clamp(30px, 8.6vw, 46px); }
}
@media (max-width: 400px) {
  .dh-hero h1 .dh-sticker--hero { font-size: clamp(26px, 8.4vw, 34px); }
}

/* ── the hero headline under the band ──────────────────────────────────────
   Each page's <h1> now lives in the band, so the framed hero's own headline is
   a paragraph. It keeps every bit of its old typography — only the tag
   changed, so that a page has exactly one H1 and it is the one people see
   first. */
.dh-herolede {
  margin: 0 0 18px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-stretch: 70%;
  font-variation-settings: 'wdth' 70;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: .94;
  letter-spacing: .006em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ivory);
}
.dh-herolede em { color: var(--teal); font-style: normal; }
body:not(.home) .dh-plp-hero .dh-herolede { color: var(--ivory); }
body:not(.home) .dh-plp-hero .dh-herolede em { color: var(--teal); }

/* on a light ground and outside a framed hero it takes the page's own ink */
body:not(.home) .dh-headbar > .dh-herolede,
body:not(.home) .dh-editorial .dh-herolede { color: var(--body-strong); }
body:not(.home) .dh-headbar > .dh-herolede em { color: var(--body-accent); }

/* the article headline is set in sentence case at reading width */
#dh-art-title {
  font-size: clamp(28px, 3.9vw, 50px);
  line-height: 1.04;
  text-transform: none;
  letter-spacing: .01em;
}
