/* ==========================================================================
   STEMX — Bauhaus block layer

   Loaded after style.css and fx.css. Everything here is the geometric
   vocabulary the base sheet does not have: square / circle / quarter-round
   ornaments, hard block strips, and the purple accents that mark structure.

   Rule of the palette: black and white do the reading, purple does the
   pointing. Purple never carries body copy — only edges, markers and hovers.
   ========================================================================== */

/* ==========================================================================
   Eyebrow — every section label gets a block in front of it
   ========================================================================== */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--purple);
}

/* the CTA band is centre-aligned, so the block has to centre with the text */
.cta-band .eyebrow { justify-content: center; }

/* ==========================================================================
   Block strip — an alternating white / purple rule set between sections
   ========================================================================== */
.blockstrip {
  height: 12px;
  border: 0;
  margin: 0;
  background:
    repeating-linear-gradient(
      90deg,
      var(--white)   0    36px,
      transparent    36px 60px,
      var(--purple)  60px 96px,
      transparent    96px 120px
    );
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.9;
}

/* ==========================================================================
   Ornament cluster — square, circle, quarter-round, bar
   Decorative only; every instance is aria-hidden in the markup.
   ========================================================================== */
.bau {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.bau i {
  position: absolute;
  display: block;
}

.bau .o {                                   /* outlined circle */
  border: var(--edge) solid var(--white);
  border-radius: 50%;
  opacity: 0.5;
}
.bau .oo {                                  /* filled purple circle */
  background: var(--purple);
  border-radius: 50%;
}
.bau .sq {                                  /* square outline */
  border: var(--edge) solid var(--white);
  opacity: 0.45;
}
.bau .sqf {                                 /* filled purple square, tipped */
  background: var(--purple);
  transform: rotate(45deg);
}
.bau .qr {                                  /* quarter round — the signature */
  border: var(--edge) solid var(--purple-lit);
  border-radius: 100% 0 0 0;
  border-right: 0;
  border-bottom: 0;
}
.bau .bar {                                 /* plain bar */
  background: var(--white);
  opacity: 0.35;
}

/* the hero cluster, parked in the dead space right of the headline */
.bau--hero { top: 15vh; right: 5vw; width: 330px; height: 330px; }
.bau--hero .o   { width: 150px; height: 150px; top: 0;     right: 0; }
.bau--hero .qr  { width: 96px;  height: 96px;  top: 120px; right: 130px; }
.bau--hero .sqf { width: 34px;  height: 34px;  top: 198px; right: 46px; }
.bau--hero .bar { width: 4px;   height: 118px; top: 8px;   right: 198px; }
.bau--hero .oo  { width: 18px;  height: 18px;  top: 266px; right: 180px; }

@media (max-width: 1180px) { .bau--hero { display: none; } }

/* a smaller cluster for interior page heroes */
.bau--page { top: 34%; right: 6vw; width: 210px; height: 190px; }
.bau--page .o   { width: 104px; height: 104px; top: 0;    right: 0; }
.bau--page .sqf { width: 26px;  height: 26px;  top: 84px; right: 118px; }
.bau--page .bar { width: 4px;   height: 80px;  top: 46px; right: 168px; }

@media (max-width: 980px) { .bau--page { display: none; } }

/* ==========================================================================
   Chips — the blocky tag list used for topics covered
   ========================================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips li {
  padding: 10px 16px;
  border: var(--edge) solid var(--hairline-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--ash);
  transition:
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    background 0.3s var(--ease),
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.chips li:hover {
  border-color: var(--purple-lit);
  background: var(--purple);
  color: var(--white);
  transform: translate(-2px, -2px);
  box-shadow: var(--block-sm) var(--block-sm) 0 var(--purple-deep);
}

/* ==========================================================================
   Milestone cards — the block grid on the journey page
   ========================================================================== */
.milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 30px);
}

.milestone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(26px, 3vw, 40px);
  background: var(--black);
  border: var(--edge) solid var(--hairline-soft);
  box-shadow: var(--block) var(--block) 0 rgba(255, 255, 255, 0.07);
  transition:
    border-color 0.35s var(--ease),
    background 0.35s var(--ease),
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
/* lifts up-left, dropping a deeper purple block behind it */
.milestone:hover {
  border-color: var(--purple-lit);
  background: #060309;
  transform: translate(calc(var(--block) * -1), calc(var(--block) * -1));
  box-shadow: calc(var(--block) * 2) calc(var(--block) * 2) 0 var(--purple);
}

/* the numeral sits in the corner as a block, filling on hover */
.milestone .m-num {
  position: absolute;
  top: calc(var(--edge) * -1);
  right: calc(var(--edge) * -1);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: var(--edge) solid var(--hairline-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--slate);
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.milestone:hover .m-num {
  background: var(--purple);
  border-color: var(--purple-lit);
  color: var(--white);
}

.milestone .m-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--purple-lit);
  padding-right: 52px;          /* clears the corner numeral */
}
.milestone h3 { font-size: clamp(1rem, 1.4vw, 1.2rem); letter-spacing: var(--track-mid); }
.milestone p { color: var(--ash); font-size: 0.9rem; line-height: 1.8; }

@media (max-width: 980px) { .milestones { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .milestones { grid-template-columns: 1fr; } }

/* ==========================================================================
   Plate — a large number presented as a Bauhaus panel
   ========================================================================== */
.plate {
  position: relative;
  padding: clamp(34px, 5vw, 60px);
  border: var(--edge) solid var(--white);
  box-shadow: var(--block) var(--block) 0 var(--purple);
  overflow: hidden;
}
.plate .plate-num {
  font-size: clamp(4rem, 11vw, 8.5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.plate .plate-label {
  margin-top: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--ash);
}
.plate .plate-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--slate);
  max-width: 34ch;
}
/* a circle arc riding out of the bottom-right corner */
.plate::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  border: var(--edge) solid var(--purple-lit);
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
}

/* ==========================================================================
   Purple accents on the existing furniture
   ========================================================================== */
.section--panel { border-top: var(--edge) solid var(--hairline-soft); }
.page-hero      { border-bottom: var(--edge) solid var(--hairline-soft); }
.site-footer    { border-top: var(--edge) solid var(--hairline-soft); }

.marquee { border-block: var(--edge) solid var(--hairline-soft); }
.marquee-track > span::after { border-radius: 0; background: var(--purple); }

.bento-cell:hover { background: #060309; }

.footer-col h4 { display: flex; align-items: center; gap: 10px; }
.footer-col h4::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--purple);
}
.footer-col a:hover { opacity: 1; color: var(--purple-lit); }

.nav-drawer li { border-bottom: var(--edge) solid var(--hairline-soft); }
.nav-drawer a:hover { padding-left: 14px; color: var(--purple-lit); }

/* map pins pick up the accent */
.tx-dot  { fill: var(--purple-lit); }
.tx-halo { stroke: var(--purple-lit); }
.tx-pin:hover .tx-label,
.tx-pin.is-active .tx-label { fill: var(--purple-lit); }

/* keyboard focus is visible everywhere, in the accent colour */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: var(--edge) solid var(--purple-lit);
  outline-offset: 3px;
}

/* ==========================================================================
   Panel media — the technical plate beside each track's copy
   ========================================================================== */
.panel-media {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.panel-figure {
  position: relative;
  margin: 0;
  padding: clamp(18px, 2.2vw, 30px);
  border: var(--edge) solid var(--hairline-soft);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: var(--block) var(--block) 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.panel:hover .panel-figure {
  border-color: var(--purple-lit);
  box-shadow: var(--block) var(--block) 0 var(--purple);
}
.panel-figure svg { width: 100%; height: auto; display: block; }

/* a caption strip reading like a drawing's title block */
.panel-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--slate);
}
.panel-figure figcaption b { color: var(--purple-lit); font-weight: 600; }

/* ---- the drawing itself ---- */
.fig-grid line   { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.fig-line        { fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 2; }
.fig-key         { fill: none; stroke: var(--white); stroke-width: 2.5; stroke-linejoin: round; }
.fig-accent      { fill: none; stroke: var(--purple-lit); stroke-width: 2.5; stroke-linejoin: round; }
.fig-trace {
  fill: none;
  stroke: var(--purple-lit);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.fig-solid       { fill: var(--purple); }
.fig-dot         { fill: var(--white); }
.fig-dim         { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.5; }
.fig-label {
  fill: var(--slate);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* the pulse trace draws itself in when the panel scrolls into view */
.reveal .fig-trace,
.reveal.fig-trace {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}
.reveal.is-in .fig-trace {
  animation: figDraw 2.4s var(--ease) 0.25s forwards;
}
@keyframes figDraw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal .fig-trace { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ==========================================================================
   Entry notice — the one-time ManageBac modal (assets/js/notice.js)
   ========================================================================== */
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
  overflow-y: auto;
}
.notice-overlay.is-open { opacity: 1; }

.notice-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--black);
  border: var(--edge) solid var(--white);
  box-shadow: var(--block) var(--block) 0 var(--purple);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.42s var(--ease);
}
.notice-overlay.is-open .notice-card { transform: none; }

/* the alternating block strip, reused as a header rule */
.notice-strip {
  height: 10px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--white)   0    26px,
      transparent    26px 44px,
      var(--purple)  44px 70px,
      transparent    70px 88px
    );
}

.notice-body { padding: clamp(26px, 4vw, 40px); }

.notice-tag { margin-bottom: 18px; }

.notice-heading {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  text-wrap: balance;
}

.notice-intro {
  color: var(--ash);
  font-size: 0.94rem;
  line-height: 1.75;
  margin-bottom: 22px;
}

/* --- the group name --- */
.notice-name {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: var(--edge) solid var(--purple-lit);
  background: var(--purple-veil);
  margin-bottom: 22px;
}
.notice-name code {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(0.95rem, 2.4vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  /* the name must stay selectable and never be clipped */
  overflow-wrap: anywhere;
  user-select: all;
}
.notice-copy {
  flex: none;
  padding: 0 18px;
  border: 0;
  border-left: var(--edge) solid var(--purple-lit);
  background: transparent;
  color: var(--purple-lit);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.notice-copy:hover,
.notice-copy:focus-visible { background: var(--purple); color: var(--white); }
.notice-copy.is-done { background: var(--purple); color: var(--white); }

/* --- the warning --- */
.notice-warn {
  padding: 16px 18px;
  margin-bottom: 14px;
  border: var(--edge) solid rgba(255, 120, 120, 0.42);
  background: rgba(255, 90, 90, 0.07);
  color: var(--ash);
  font-size: 0.88rem;
  line-height: 1.7;
}
.notice-warn b { color: #ff9d9d; font-weight: 700; }

/* The tell for spotting the right group. Deliberately not styled as another
   warning — it is the reassuring half, so it takes the accent, not the red. */
.notice-confirm {
  display: flex;
  gap: 12px;
  padding: 0 18px;
  margin-bottom: 26px;
  color: var(--slate);
  font-size: 0.84rem;
  line-height: 1.7;
}
.notice-confirm::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--purple-lit);
}

/* --- acknowledge --- */
.notice-btn {
  width: 100%;
  justify-content: center;
  gap: 12px;
}
.notice-btn[disabled] {
  cursor: wait;
  opacity: 0.55;
  transform: none;
  background: transparent;
  color: var(--ash);
  border-color: var(--hairline);
  box-shadow: none;
}

/* the countdown digit, in its own block on the button */
.notice-count:empty { display: none; }
.notice-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border: 2px solid currentColor;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

@media (max-width: 480px) {
  .notice-name { flex-direction: column; }
  .notice-copy {
    border-left: 0;
    border-top: var(--edge) solid var(--purple-lit);
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notice-card { transform: none; }
}

/* ==========================================================================
   Narrow screens
   ========================================================================== */
@media (max-width: 900px) {
  /* Single column — a trailing link drops below the heading rather than
     squeezing the headline's track. */
  .section-head { grid-template-columns: 1fr; }
  .section-head .arrow-link {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }
}

/* ==========================================================================
   Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  /* The block press is purely a transform. With it removed the hover still
     reads through the colour change, so nothing needs to move. */
  .btn:hover,
  .pill--solid:hover,
  .milestone:hover,
  .chips li:hover { transform: none; }
}
