/* feebunker. One printed poster of the bunker field.
   Built to his design picture (art/ref/design-reference.jpg): flat graphic, four inks, scattered
   windows with gold title strips, 1-bit dithered pictures, hairline doodles in the gaps.
   The blue field is his bunker green and the lemon is his vault gold (see NOTE.md > Reference). */

@font-face { font-family: Tanker;   src: url(/fonts/tanker.woff2) format("woff2");        font-display: swap; }
@font-face { font-family: Technor;  src: url(/fonts/technor-black.woff2) format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: Departure;src: url(/fonts/departure.woff2) format("woff2");     font-display: swap; }

:root {
  --field:      #0A7C17;
  --field-deep: #06500D;
  --field-lit:  #0FA322;
  --ink:        #0B1206;
  --paper:      #F4F3EC;
  --gold:       #FFC32A;
  --gold-deep:  #D99A0C;

  --f-display: Tanker, "Arial Narrow", sans-serif;
  --f-geo:     Technor, Arial, sans-serif;
  --f-mono:    Departure, ui-monospace, monospace;

  --gut: 34px;            /* the poster's own gutter between windows */
  --edge: 3px;            /* the keyline of every window and key */
  --drop: 10px;           /* the hard offset shadow, no blur, as the poster prints it */
  --pad: 32px;            /* window body inset */
  --bar-pad: 28px;        /* title strip side inset */
}

* { box-sizing: border-box; }
/* the browser's own heading and paragraph margins would open a gap above every window's title
   strip and under every label: every block here sets the margin it actually wants */
h1, h2, h3, h4, p, dl, dd, figure, fieldset { margin: 0; }
/* a class that sets display beats the browser's [hidden] rule, and a "hidden" key stays on screen */
[hidden] { display: none !important; }
html { background: var(--field); scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--field);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 22px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--ink); }

/* ---- the field: the printed ground the whole poster sits on ------------- */
#field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 1.6px 1.6px, rgba(0,0,0,.30) 1.5px, transparent 1.6px) 0 0 / 11px 11px,
    var(--field);
}
#field::before {            /* the conduits that run behind everything, drifting on their own clock */
  content: ""; position: absolute; inset: -12% -6%;
  background: url(/img/conduits.png) 0 0 / 34% auto repeat;
  opacity: .17;
  animation: drift 64s linear infinite alternate;
  will-change: transform;
}
#field::after {             /* press grain over the whole sheet */
  content: ""; position: absolute; inset: 0;
  background: url(/img/grain.png) 0 0 / 180px 180px repeat;
  opacity: .16; mix-blend-mode: multiply;
  animation: grain 1.6s steps(3) infinite;
}
@keyframes drift { from { transform: translate3d(-1.4%, 0, 0) } to { transform: translate3d(1.4%, -1.2%, 0) } }
@keyframes grain { 0% { transform: translate3d(0,0,0) } 33% { transform: translate3d(-6px,4px,0) } 66% { transform: translate3d(5px,-5px,0) } }

main { position: relative; z-index: 1; }

/* ---- the sheet --------------------------------------------------------- */
.sheet { max-width: 1680px; margin: 0 auto; padding: clamp(20px, 2vw, 34px) clamp(20px, 2.6vw, 48px) 110px; }

/* ---- masthead ---------------------------------------------------------- */
.mast { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(16px, 2vw, 44px); align-items: end; }
.mast__name {
  font-family: var(--f-geo); font-weight: 900;
  font-size: clamp(52px, 9.2vw, 164px);
  line-height: .78;
  letter-spacing: -.028em;
  color: var(--paper);
  margin: 0;
  text-transform: lowercase;
}
.mast__mid { min-width: 0; }
.mast__sub {
  font-family: var(--f-display);
  font-size: clamp(20px, 1.72vw, 32px);
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: .005em;
  margin: 0 0 clamp(8px, .9vw, 18px);
  max-width: 22ch;
}
.mast__meter { text-align: right; justify-self: end; min-width: 0; }
.mast__big {
  font-family: var(--f-geo); font-weight: 900;
  font-size: clamp(46px, 5.8vw, 102px);
  line-height: .86;
  color: transparent;
  -webkit-text-stroke: 3px var(--gold);
  text-shadow: 0 0 26px rgba(255,195,42,.34);
  display: block;
  font-variant-numeric: tabular-nums;
}
.mast__meterlab { font-size: 22px; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; display: block; margin-top: 6px; }
.mast__count { font-size: 22px; color: rgba(244,243,236,.72); display: block; margin-top: 4px; }

/* ---- the section strip, set as the poster sets its dates ---------------- */
.strip {
  margin: clamp(16px, 1.6vw, 26px) 0 0;
  padding: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px;
  font-size: 24px;
}
.strip::before { content: ""; flex: 0 0 100%; height: 0; border-top: var(--edge) solid rgba(244,243,236,.45); margin-bottom: 12px; }
.strip a {
  color: var(--paper); text-decoration: none; padding: 8px 2px 10px;
  text-transform: lowercase; letter-spacing: .02em; display: inline-block;
}
.strip a:hover { color: var(--gold); }
.strip a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-decoration-thickness: 5px; text-underline-offset: 7px; text-decoration-skip-ink: none; }
.strip .sl { color: var(--gold); opacity: .8; }

/* ---- the two shares, the poster's programme band ------------------------ */
.shares { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); margin-top: clamp(22px, 2.2vw, 36px); align-items: start; }
.share { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 22px; align-items: start; }
.share__mark {
  width: clamp(92px, 7.6vw, 118px); aspect-ratio: 1; flex: none;
  background: var(--gold); color: var(--ink);
  border-radius: 999px; display: grid; place-items: center;
  font-family: var(--f-geo); font-weight: 900; font-size: clamp(24px, 2vw, 34px);
  line-height: 1; letter-spacing: -.02em;
}
.share__num {
  font-family: var(--f-display); font-size: clamp(42px, 4.6vw, 82px); line-height: .9;
  text-transform: uppercase; margin: 0;
}
.share__num em { font-style: normal; color: var(--gold); }
.share__txt { font-family: var(--f-display); text-transform: uppercase; font-size: clamp(19px, 1.5vw, 26px); line-height: 1.16; margin: 12px 0 0; max-width: 34ch; }

/* ---- windows ----------------------------------------------------------- */
.field-grid {
  margin-top: clamp(24px, 2.4vw, 40px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gut);
  align-items: start;
}
.win {
  position: relative;
  background: var(--paper); color: var(--ink);
  border: var(--edge) solid var(--ink);
  box-shadow: var(--drop) var(--drop) 0 var(--ink);
  min-width: 0;
}
.col { min-width: 0; display: grid; align-content: start; gap: var(--gut); }
.col--span4  { grid-column: span 4; }
.col--span5  { grid-column: span 5; }
.col--span6  { grid-column: span 6; }
.col--span7  { grid-column: span 7; }
.col--span8  { grid-column: span 8; }
.col--span12 { grid-column: span 12; }
.col--pull   { margin-top: clamp(-104px, -5.4vw, -44px); }
.win--span4  { grid-column: span 4; }
.win--span5  { grid-column: span 5; }
.win--span6  { grid-column: span 6; }
.win--span7  { grid-column: span 7; }
.win--span8  { grid-column: span 8; }
.win--span12 { grid-column: span 12; }
.win--pull   { margin-top: clamp(-96px, -5vw, -40px); }  /* the poster's overlap, kept as a measured offset */

.win__bar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  background: var(--gold); color: var(--ink);
  border-bottom: var(--edge) solid var(--ink);
  min-height: 60px; padding: 13px var(--bar-pad);
  font-size: 22px; letter-spacing: .04em; text-transform: lowercase;
}
.win__ttl { min-width: 0; }
.win__ctl { flex: none; width: 96px; height: 24px; image-rendering: pixelated; }
.win__body { padding: var(--pad); }

.cells { display: grid; }
.cells > * { padding: var(--pad); min-width: 0; }
.cells--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cells--2 > * + * { border-left: var(--edge) solid var(--ink); }
.cells--pic { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); }
.cells--pic > * + * { border-left: var(--edge) solid var(--ink); padding: 0; }
.cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cells--3 > * + * { border-left: var(--edge) solid var(--ink); }
.cell-rule { border-top: var(--edge) solid var(--ink); }

.pic { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.pic--tall { aspect-ratio: 4 / 5; }
.pic--wide { aspect-ratio: 16 / 9; }
.pic--sq   { aspect-ratio: 1; }

/* type inside a window */
.w-ttl { font-family: var(--f-geo); font-weight: 900; font-size: clamp(26px, 2.9vw, 50px); line-height: .98; margin: 0 0 18px; letter-spacing: -.015em; }
.w-sub { font-family: var(--f-display); text-transform: uppercase; font-size: clamp(18px, 1.35vw, 23px); line-height: 1.2; margin: 0 0 20px; }
.w-txt { font-size: 20px; line-height: 1.62; margin: 0 0 18px; }
.w-txt:last-child { margin-bottom: 0; }
.w-lab { font-size: 22px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); opacity: .62; margin: 0 0 10px; }

/* data rows: label column fixed, value column fluid */
.rows { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; font-size: 20px; }
.rows dt { opacity: .62; text-transform: uppercase; letter-spacing: .05em; overflow-wrap: anywhere; }
.rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* the mint, on a sunken line */
.mint {
  font-size: 20px; line-height: 1.5; word-break: break-all; overflow-wrap: anywhere;
  background: #E3E1D6; border: var(--edge) solid var(--ink); padding: 16px 20px; margin: 0 0 18px;
  min-height: 72px; display: flex; align-items: center;
}
.mint--empty { color: rgba(11,18,6,.55); }

/* keys */
.keys { display: flex; flex-wrap: wrap; gap: 14px; }
.key {
  appearance: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 10px 26px;
  background: var(--paper); color: var(--ink);
  border: var(--edge) solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--f-mono); font-size: 22px; letter-spacing: .03em; text-transform: lowercase;
  transition: transform .06s linear, box-shadow .06s linear;
}
.key:hover { background: var(--gold); }
.key:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--ink); }
.key:focus-visible { outline: 4px solid var(--field-lit); outline-offset: 3px; }
.key--gold { background: var(--gold); }
.key--gold:hover { background: #FFD66B; }
.key--wide { width: 100%; }
.key[aria-disabled="true"], .key:disabled {
  cursor: not-allowed; background: #DBD9CE; color: rgba(11,18,6,.46);
  box-shadow: 6px 6px 0 rgba(11,18,6,.3);
}
.key[aria-disabled="true"]:hover { background: #DBD9CE; }
.key__mark { width: 22px; height: 22px; flex: none; }
.key__mark img, .key__mark svg { display: block; width: 100%; height: 100%; }

/* the four steps */
.cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cells--4 > * + * { border-left: var(--edge) solid var(--ink); }
.step__pic { height: auto; border-bottom: var(--edge) solid var(--ink); margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 20px; width: calc(100% + var(--pad) * 2); }
.step__n { font-family: var(--f-geo); font-weight: 900; font-size: 26px; line-height: 1; margin: 0 0 8px; color: var(--gold-deep); }
.step__t { font-family: var(--f-display); text-transform: uppercase; font-size: clamp(22px, 1.7vw, 30px); line-height: 1.04; margin: 0 0 12px; }

/* the coin list */
.coins { display: grid; gap: 14px; }
.coin {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 14px 18px; text-decoration: none; color: var(--ink);
  border: var(--edge) solid var(--ink); background: #EDEBE0;
}
.coin:hover { background: var(--gold); }
.coin__pic { width: 64px; height: 64px; image-rendering: pixelated; display: block; }
.coin__name { display: grid; min-width: 0; }
.coin__name strong { font-family: var(--f-geo); font-weight: 900; font-size: 24px; line-height: 1.1; }
.coin__name em { font-style: normal; font-size: 19px; opacity: .64; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin__sol { display: grid; text-align: right; font-variant-numeric: tabular-nums; font-size: 24px; line-height: 1.1; }
.coin__sol small { font-size: 17px; opacity: .6; text-transform: uppercase; letter-spacing: .04em; }

/* the risk line, in the field's own ink, not a footer bar */
.risk { max-width: 96ch; margin: clamp(34px, 3.4vw, 56px) 0 0; font-size: 19px; line-height: 1.6; color: rgba(244,243,236,.78); }
.risk a { color: var(--gold); }

/* the hairline doodles that fill the poster's gaps, each owned by the column it sits in */
.doodle { pointer-events: none; opacity: .8; height: auto; display: block; }
.doodle--mast { width: clamp(68px, 5.4vw, 104px); margin-top: clamp(12px, 1.4vw, 24px); }
.scribbles { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 6px clamp(6px, 1vw, 22px) 0; }
.scribbles--end { justify-content: flex-start; }
.scribbles .doodle { width: clamp(84px, 8vw, 150px); }

/* phone */
@media (max-width: 1100px) {
  .field-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .win--span4, .win--span5, .win--span6, .win--span7, .win--span8, .win--span12,
  .col--span4, .col--span5, .col--span6, .col--span7, .col--span8, .col--span12 { grid-column: span 6; }
  .win--pull, .col--pull { margin-top: 0; }
  .cells--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cells--4 > :nth-child(3) { border-left: 0; }
  .cells--4 > :nth-child(n + 3) { border-top: var(--edge) solid var(--ink); }
}
@media (max-width: 720px) {
  :root { --gut: 22px; --pad: 28px; --bar-pad: 26px; --drop: 7px; }
  /* the phone masthead: the name across the top, then the strapline and the live number side by side */
  .mast { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: end; }
  .mast__name { grid-column: 1 / -1; }
  .mast__sub { margin-bottom: 0; }
  .doodle--mast { display: none; }
  .mast__meter { justify-self: end; text-align: right; }
  .mast__big { font-size: 42px; }
  .mast__meterlab, .mast__count { font-size: 18px; }
  .strip { font-size: 20px; gap: 0 10px; }
  .strip a { padding: 6px 2px 8px; }
  .shares { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .cells--2, .cells--pic, .cells--3, .cells--4 { grid-template-columns: minmax(0, 1fr); }
  .cells--2 > * + *, .cells--pic > * + *, .cells--3 > * + *, .cells--4 > * + * { border-left: 0; border-top: var(--edge) solid var(--ink); }
  .coin { grid-template-columns: 52px minmax(0, 1fr); row-gap: 8px; }
  .coin__pic { width: 52px; height: 52px; }
  .coin__sol { grid-column: 2; text-align: left; }
  .scribbles { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #field::before, #field::after { animation: none; }
}

/* ---- forms, in the poster's own hand ----------------------------------- */
.field { display: grid; gap: 10px; margin: 0 0 20px; }
.field > label { font-size: 20px; letter-spacing: .05em; text-transform: uppercase; opacity: .66; }
.field > .hint { font-size: 18px; line-height: 1.5; opacity: .66; }
.input, .textarea, .select {
  font: 22px/1.4 var(--f-mono); color: var(--ink); background: #FFFEF8;
  border: var(--edge) solid var(--ink); padding: 14px 18px; min-height: 56px; width: 100%;
  appearance: none; border-radius: 0;
}
.textarea { min-height: 110px; resize: vertical; }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 4px solid var(--gold-deep); outline-offset: 2px; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { background: #FFE9E3; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.err { color: #9B1B07; font-size: 19px; line-height: 1.5; margin: 0 0 14px; }
.ok { color: #0C6A18; font-size: 19px; line-height: 1.5; margin: 0 0 14px; }

/* the twelve words, as the card they are meant to be copied onto */
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; margin: 0 0 20px; }
.word {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: baseline; gap: 8px;
  border: var(--edge) solid var(--ink); background: #FFFEF8; padding: 11px 13px; font-size: 20px;
}
.word b { font-weight: 400; opacity: .45; font-size: 16px; font-variant-numeric: tabular-nums; }
.word span { overflow-wrap: normal; white-space: nowrap; }

/* the heading beside its picture, inside one window body */
.cells--split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(140px, 17vw, 230px); gap: clamp(18px, 2vw, 32px); align-items: start; margin-bottom: 22px; }
.words-pic { border: var(--edge) solid var(--ink); aspect-ratio: 1; object-fit: cover; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.blurred .word span { filter: blur(7px); user-select: none; }

/* a plain plate for an address or a result, inside a window */
.plate {
  background: #E3E1D6; border: var(--edge) solid var(--ink); padding: 16px 20px; margin: 0 0 18px;
  font-size: 20px; line-height: 1.5; overflow-wrap: anywhere;
}
.plate b { display: block; font-weight: 400; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; opacity: .6; margin-bottom: 6px; }

/* the steps of a running flow */
.track { display: grid; gap: 10px; margin: 0 0 18px; font-size: 20px; }
.track div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.track i { font-style: normal; opacity: .5; }
.track .go i { opacity: 1; }
.track .done i { color: var(--gold-deep); }
.track .fail i { color: #9B1B07; }

.drop {
  border: var(--edge) dashed var(--ink); background: #FFFEF8; padding: 20px; text-align: center;
  font-size: 20px; cursor: pointer; display: grid; gap: 12px; justify-items: center;
}
.drop img { max-width: 160px; max-height: 160px; image-rendering: pixelated; border: var(--edge) solid var(--ink); }

@media (max-width: 720px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .cells--split { grid-template-columns: minmax(0, 1fr); }
  .words-pic { max-width: 220px; }
}

/* narrow screens: a window title wraps rather than being cut, and a label/value row stacks */
@media (max-width: 760px) {
  .rows { grid-template-columns: minmax(0, 1fr); gap: 4px 0; }
  .rows dt { opacity: .55; }
  .rows dd { text-align: left; margin-bottom: 12px; }
}

/* an address inside a sentence must break rather than push the line past its box */
.w-txt, .risk, .w-sub, .share__txt { overflow-wrap: anywhere; }
