/* =================================================================
   ELECTRIC SPORRAN · Shared chrome — used on every page.
   Foundations, top-bar, ink-strip, reg-marks, footer, reduced-motion.
   Page-specific styles go in each page's own <style> block.
   ================================================================= */
:root {
  --ink-1:        #E83D8A;
  --ink-1-deep:   #B82A6E;
  --ink-2:        #00B7C4;
  --ink-2-deep:   #0A8A94;
  --ink-black:    #1A1814;
  --paper-cream:  #ECE3CE;
  --paper-warm:   #DCD0B5;
  --paper-aged:   #C9B996;
  --paper-bright: #F4ECD6;
  --font-display: 'Abril Fatface', Georgia, serif;
  --font-stencil: 'Stardos Stencil', Impact, sans-serif;
  --font-bold:    'Anton', 'Arial Narrow', sans-serif;
  --font-body:    'EB Garamond', Georgia, serif;
  --font-type:    'Special Elite', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body {
  background: var(--paper-cream);
  color: var(--ink-black);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.13 0 0 0 0 0.07 0 0 0 0.14 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
}

/* Re-print settle animation */
@keyframes reprint-settle-magenta {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-6px, 2px); }
  50%  { transform: translate(3px, -1px); }
  80%  { transform: translate(-1px, 1px); }
  100% { transform: translate(0,0); }
}
@keyframes reprint-settle-cyan {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(4px, -2px); }
  50%  { transform: translate(-2px, 2px); }
  80%  { transform: translate(1px, -1px); }
  100% { transform: translate(0,0); }
}
body[data-reprinting="true"] .ink1-layer { animation: reprint-settle-magenta 0.85s cubic-bezier(.3,.7,.3,1) both; }
body[data-reprinting="true"] .ink2-layer { animation: reprint-settle-cyan 0.85s cubic-bezier(.3,.7,.3,1) both; }

/* =================================================================
   TOP BAR — expanded at top, shrinks on scroll, hover restores text
   ================================================================= */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 76px;
  background: var(--ink-black);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 3px solid var(--ink-1);
  box-shadow: 0 2px 0 var(--ink-2), 0 8px 24px rgba(0,0,0,0.22);
  transition: height 0.4s cubic-bezier(.2,.8,.2,1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.top-bar[data-scrolled="true"] {
  height: 56px;
  box-shadow: 0 2px 0 var(--ink-2), 0 4px 14px rgba(0,0,0,0.32);
}
.top-bar__brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; height: 100%; padding: 0 6px;
}
.top-bar__graphic {
  height: 52px; width: auto; display: block;
  transition: height 0.4s cubic-bezier(.2,.8,.2,1), filter 0.4s ease;
}
.top-bar[data-scrolled="true"] .top-bar__graphic { height: 38px; }
.top-bar__brand:hover .top-bar__graphic { filter: brightness(1.12) saturate(1.15); }
.top-bar__text-wrap {
  overflow: hidden;
  max-width: 340px;
  transition: max-width 0.55s cubic-bezier(.2,.8,.2,1);
  display: flex; align-items: center;
}
.top-bar[data-scrolled="true"] .top-bar__text-wrap { max-width: 0; }
.top-bar[data-scrolled="true"] .top-bar__brand:hover .top-bar__text-wrap { max-width: 340px; }
.top-bar__text {
  height: 40px; width: auto; display: block;
  transform: translateX(0); opacity: 1;
  transition: transform 0.55s cubic-bezier(.2,.8,.2,1), opacity 0.4s ease, height 0.4s cubic-bezier(.2,.8,.2,1);
}
.top-bar[data-scrolled="true"] .top-bar__text { height: 32px; transform: translateX(-90px); opacity: 0; }
.top-bar[data-scrolled="true"] .top-bar__brand:hover .top-bar__text { transform: translateX(0); opacity: 1; }

.top-bar__nav {
  display: flex; gap: 28px; align-items: center;
}
.top-bar__nav a {
  font-family: var(--font-type);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-cream);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.top-bar__nav a + a::before {
  content: '·';
  position: absolute;
  left: -18px;
  width: 8px;
  text-align: center;
  color: var(--ink-1);
  pointer-events: none;
}
.top-bar__nav a:hover { color: var(--ink-1); }
.top-bar__nav a[aria-current="page"] {
  color: var(--ink-1);
}
.top-bar__nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 3px;
  background: var(--ink-1);
}

/* =================================================================
   INK STRIP — same as home page
   ================================================================= */
.ink-strip {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 10px;
  background: var(--ink-black);
  border-right: 2px solid var(--ink-1);
  box-shadow: 4px 0 0 var(--ink-2), 8px 0 16px rgba(0,0,0,0.18);
}
.ink-strip__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-type);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-cream);
  opacity: 0.7;
  margin-bottom: 4px;
}
.ink-strip__chip {
  position: relative;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
}
.ink-strip__chip::before {
  content: '';
  width: 22px;
  height: 22px;
  background: var(--chip-1);
  box-shadow: 6px 0 0 -1px var(--chip-2);
  transition: width 0.3s, box-shadow 0.3s;
}
.ink-strip__chip:hover { transform: translateX(6px); }
.ink-strip__chip:hover::before { width: 28px; box-shadow: 8px 0 0 -1px var(--chip-2); }
.ink-strip__chip[aria-pressed="true"] { transform: translateX(12px); }
.ink-strip__chip[aria-pressed="true"]::before {
  width: 30px;
  box-shadow: 10px 0 0 -1px var(--chip-2);
}
.ink-strip__chip-name {
  position: absolute;
  left: 100%;
  margin-left: 14px;
  white-space: nowrap;
  font-family: var(--font-type);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-black);
  background: var(--paper-bright);
  padding: 4px 8px;
  border: 1px solid var(--ink-black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ink-strip__chip:hover .ink-strip__chip-name { opacity: 1; }
.ink-strip__footer {
  margin-top: 10px;
  padding: 6px 4px;
  font-family: var(--font-type);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-cream);
  opacity: 0.7;
  text-align: center;
  border-top: 1px dashed var(--paper-aged);
  line-height: 1.3;
}

/* =================================================================
   REGISTRATION MARKS
   ================================================================= */
.reg-mark {
  position: fixed;
  width: 22px; height: 22px;
  z-index: 50;
  opacity: 0.3;
  pointer-events: none;
}
.reg-mark--tl { top: 86px; left: 12px; }
.reg-mark--tr { top: 86px; right: 12px; }
.reg-mark--bl { bottom: 12px; left: 56px; }
.reg-mark--br { bottom: 12px; right: 12px; }
.reg-mark-inline { width: 14px; height: 14px; display: inline-block; vertical-align: middle; margin-right: 6px; color: var(--ink-2); }

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
  padding: 28px 80px 28px 110px;
  background: var(--ink-black);
  color: var(--paper-cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-type);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 2px solid var(--ink-1);
}
.footer__location { opacity: 0.7; }

@media (max-width: 960px) {
  .footer { padding: 24px; flex-direction: column; gap: 10px; text-align: center; }
  .top-bar__nav { gap: 20px; }
  .top-bar__nav a { font-size: 0.65rem; }
  .top-bar__nav a + a::before { left: -14px; }
  .top-bar__text-wrap { display: none; }
  .reg-mark { display: none; }
  .ink-strip { display: none; }
}

/* =================================================================
   INK TOGGLE — mobile floating button + popover
   Visible only on mobile (≤960px). The desktop ink-strip is hidden
   at that breakpoint above; this replaces it with a compact corner
   widget that doesn't block any page content.
   ================================================================= */
.ink-toggle-btn {
  display: none; /* hidden on desktop */
}

@media (max-width: 960px) {
  /* The toggle trigger — small pill in the bottom-left corner */
  .ink-toggle-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    position: fixed;
    bottom: 18px;
    left: 14px;
    z-index: 200;
    background: var(--ink-black);
    border: none;
    padding: 7px 11px 7px 9px;
    cursor: pointer;
    font-family: var(--font-type);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-cream);
    box-shadow: 3px 3px 0 var(--ink-1);
    transition: box-shadow 0.2s, transform 0.2s;
  }
  .ink-toggle-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink-1);
  }
  /* Two small overlapping swatches showing current ink colours */
  .ink-toggle-btn__swatch {
    position: relative;
    width: 20px;
    height: 14px;
    flex-shrink: 0;
  }
  .ink-toggle-btn__swatch::before,
  .ink-toggle-btn__swatch::after {
    content: '';
    position: absolute;
    top: 0;
    width: 13px;
    height: 14px;
  }
  .ink-toggle-btn__swatch::before {
    left: 0;
    background: var(--ink-1);
  }
  .ink-toggle-btn__swatch::after {
    left: 7px;
    background: var(--ink-2);
    opacity: 0.85;
  }

  /* The popover panel — slides up from the button */
  .ink-popover {
    position: fixed;
    bottom: 56px;
    left: 14px;
    z-index: 199;
    background: var(--ink-black);
    border: 1.5px solid var(--ink-1);
    box-shadow: 4px 4px 0 var(--ink-2);
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Hidden state */
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(.2,.8,.2,1);
  }
  .ink-popover[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .ink-popover__label {
    font-family: var(--font-type);
    font-size: 0.56rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-cream);
    opacity: 0.65;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    padding-bottom: 8px;
  }
  .ink-popover__chips {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  /* Each chip in the popover */
  .ink-popover__chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    font-family: var(--font-type);
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--paper-cream);
    opacity: 0.75;
    transition: opacity 0.15s, transform 0.15s;
    text-align: left;
  }
  .ink-popover__chip:hover,
  .ink-popover__chip[aria-pressed="true"] {
    opacity: 1;
    transform: translateX(4px);
  }
  .ink-popover__chip[aria-pressed="true"] {
    color: var(--ink-1);
  }
  .ink-popover__chip-swatch {
    position: relative;
    width: 28px;
    height: 16px;
    flex-shrink: 0;
  }
  .ink-popover__chip-swatch::before,
  .ink-popover__chip-swatch::after {
    content: '';
    position: absolute;
    top: 0;
    width: 18px;
    height: 16px;
  }
  .ink-popover__chip-swatch::before {
    left: 0;
    background: var(--pop-chip-1);
  }
  .ink-popover__chip-swatch::after {
    left: 10px;
    background: var(--pop-chip-2);
    opacity: 0.85;
  }
}

/* =================================================================
   COMMON UTILITIES
   ================================================================= */
.kicker {
  font-family: var(--font-type);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-1);
  display: inline-block;
}

.back-link {
  font-family: var(--font-type);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-black);
  text-decoration: none;
  border-bottom: 2px solid var(--ink-1);
  padding-bottom: 3px;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.back-link:hover { color: var(--ink-1); transform: translateX(-3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
