/* ============================================================
   B Heroes — the shared layer.
   What every page has in common: the tokens, the reset, the type
   scale, the reveal, the navigation, the bands, the footer and the
   ground switch. Linked before each page's own sheet, so a page can
   still override anything here without editing this file.
   This exists because the same rules used to live in five copies,
   which is how one rule ended up written three slightly different
   ways. One file now. Change a token here and the site moves.
   ============================================================ */

/* ---------- tokens ----------
   Every colour, measure and weight the site uses. Nothing below this block
   states a value of its own: a rule asks for a token and gets whatever the
   ground it is standing on has declared. Change a number here and the site
   moves together — which is the whole reason this file exists. */
:root{
  --gnd:#0A0A0B; --raise:#141416; --raise2:#1B1B1E; --bone:#F2EFE9;
  --w:#F5F4F2; --ink:#131314;
  --soft:rgba(245,244,242,.68); --faint:rgba(245,244,242,.52); --hair:rgba(245,244,242,.14);
  /* The brand accent, and only this one. It used to darken to #C20F41 on
     every light ground, which kept the contrast up but meant the site had two
     magentas and neither of them was the brand's. One colour now, on every
     ground: it carries display-size words, where 3:1 is the threshold it has
     to clear and does. --magInk is kept as a name because rules still ask for
     it, and resolves to the same ink. */
  --mag:#F14C7A; --magInk:var(--mag); --sun:#FFF7CE;
  /* field palette, sampled by eye from the poster proofs. Declared and not
     in use: the page is back to a single ground until the identity is fixed. */
  /* The two fields that carry colour on this page, and the ink they take.
     Both are fixed: a band is the one thing on the site that does not invert
     with the ground, because the colour is the point of it. */
  --plum:#4B0E2E; --acid:#EFFFCE; --cream:#FFF7CE; --sky:#C7E3F8; --hot:#F1476F;

  --boneSoft:rgba(19,19,20,.73); --boneFaint:rgba(19,19,20,.60); --boneHair:rgba(19,19,20,.14);
  /* the page runs edge to edge: --maxw caps nothing, --pad is the only
     margin, and it grows with the screen so the content never touches glass.
     Lines of text are capped in characters, one block at a time, because a
     paragraph 200 characters wide is unreadable however wide the screen is. */
  --maxw:none; --pad:clamp(14px,3.2vw,56px);
  /* One radius for the whole site. Not three — a pill for the buttons, a
     32px card for the surfaces and a hairline for the photographs was three
     different claims about what kind of object a thing is, and the pill was
     the loudest of them: a fully rounded button reads as an app control, and
     nothing else on these pages is an app control. Everything now takes the
     same barely-there corner, so the shape stops being a signal and the page
     is carried by type, ground and photograph. --rx is the one number; --r,
     --rImg and --pill are kept as names so the rules read as what they are. */
  --rx:2px;
  /* One margin for the whole site, and --edge is its name where a rule is
     talking about the page's edge rather than about a column of text. It used
     to be a second, narrower value, which meant the display line and the
     navigation stood on one line and every ordinary section stood on another
     — two left edges on the same page, 36px apart, with nothing to explain
     the difference. Now the opening line, the bar under it, the navigation
     and every section below all start where the sections have always started.
     Change --pad and the whole page moves together. */
  --edge:var(--pad);
  /* Photographs are the exception: they are cut square. A corner radius on a
     picture is a frame the picture did not ask for, and at this size it reads
     as a widget. Surfaces and anything pressable keep the barely-there
     corner, which is what keeps them legible as objects. */
  --r:var(--rx); --rImg:0px; --pill:var(--rx);
  --sans:'IBM Plex Sans',ui-sans-serif,system-ui,-apple-system,sans-serif;
  --serif:'IBM Plex Serif',Georgia,'Times New Roman',serif;
  --mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  /* tracking: IBM Plex runs wide, so everything is pulled in a notch */
  --tr-display:-.056em; --tr-head:-.046em; --tr-mid:-.032em; --tr-body:-.011em;
  --navBg:rgba(10,10,11,.6);
  --tint:rgba(245,244,242,.08); --tintLine:rgba(245,244,242,.3);
  --cardShadow:0 20px 60px rgba(0,0,0,.55);
  /* titles are Light on the dark ground and Regular on the light one: the
     same weight that reads as composed on black looks washed out on #F5F5F5 */
  --wTitle:200; --wTitle3:300;
  --ease:cubic-bezier(.22,.61,.36,1);
  color-scheme:dark;
}

/* The ground switch. One attribute on <html> and the whole page turns over:
   every surface, rule and accent is a token, so nothing here repaints — it
   restates. The accent does not change: it is the one colour the brand owns. */
:root[data-theme="light"]{
  --gnd:#F5F5F5; --raise:#EAEAE7; --raise2:#E3E3E0;
  --w:#131314;
  --soft:rgba(19,19,20,.70); --faint:rgba(19,19,20,.55); --hair:rgba(19,19,20,.16);
  --mag:#F14C7A; --sun:#7A6100; --wTitle:300; --wTitle3:400;
  --navBg:rgba(245,245,245,.72);
  --tint:rgba(19,19,20,.07); --tintLine:rgba(19,19,20,.32);
  --cardShadow:0 18px 50px rgba(0,0,0,.14);
  color-scheme:light;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;background:var(--gnd);color:var(--w);
  font-family:var(--sans);
  font-size:16px;line-height:1.55;font-weight:400;letter-spacing:var(--tr-body);
  -webkit-font-smoothing:antialiased;text-wrap:pretty;overflow-x:hidden;
}

img{display:block;max-width:100%}

a{color:inherit;text-decoration:none;transition:background .2s var(--ease),color .2s var(--ease),border-color .2s var(--ease)}

:focus-visible{outline:2px solid var(--mag);outline-offset:3px;border-radius:2px}

p{margin:0 0 1em}

p:last-child{margin:0}

.wrap{width:100%;max-width:var(--maxw);margin:0 auto;padding-inline:var(--pad)}

h1,h2,h3{margin:0;font-weight:var(--wTitle);letter-spacing:var(--tr-display);text-wrap:balance}

/* A weight is not a style, it is a style at a size. ExtraLight is composed at
   90px and broken at 29, where the stems go to nothing and the line starts to
   disappear against the ground — so everything below the display keeps a step
   more than the display does. Section titles and subheads run from 29px to
   72px and sit here; only the two display lines, the one that opens the page
   and the one that closes it, are set in the lightest cut. */
h2,h3{font-weight:var(--wTitle3)}

.end h2{font-weight:var(--wTitle)}

/* highlight voice: Plex Serif Light. Everything else is Plex Sans Regular. */
.it{font-family:var(--serif);font-weight:var(--wTitle);font-style:normal;color:var(--mag);
  letter-spacing:-.046em;line-height:1.12;padding-bottom:.04em}

.hero h1 .it,.end h2 .it{letter-spacing:-.05em}

.head h2 .it,.ev h2 .it{letter-spacing:-.042em}

/* ---------- reveal ---------- */
.anim [data-reveal]{opacity:0;transform:translateY(20px);
  transition:opacity .7s var(--ease),transform .7s var(--ease);transition-delay:var(--d,0ms)}

.anim [data-reveal].in{opacity:1;transform:none}

.anim .w{opacity:.18;filter:blur(7px);
  transition:opacity .7s var(--ease),filter .7s var(--ease);
  transition-delay:calc(var(--i) * 36ms)}

.anim .sent.in .w{opacity:1;filter:blur(0)}

/* ---------- nav ---------- */
.nav{position:fixed;inset:0 0 auto 0;z-index:60;background:var(--navBg);backdrop-filter:blur(16px)}

.nav .in{display:flex;align-items:center;gap:20px;height:68px}

.nav img{width:104px;height:auto}

/* inline nav takes the same voice as the buttons: mono, caps, opened up.
   no text-indent here: the trailing letter-space just widens the gap,
   it does not throw a label off-centre the way it does inside a pill. */
.menu{display:none;gap:clamp(20px,2.6vw,34px);margin-left:auto;
  font-family:var(--mono);font-size:12.5px;font-weight:500;
  letter-spacing:.11em;text-transform:uppercase;color:var(--soft)}

.menu a{min-height:24px;display:inline-flex;align-items:center}

.menu a:hover{color:var(--w)}

@media (min-width:860px){.menu{display:flex}}

/* Apply is a link, not a button. It is the same action the closing line and
   the footer already ask for, and a filled pill parked in the corner of every
   screen turns a standing invitation into a thing being pushed at you. It
   keeps its place at the end of the row, in the same voice as the rest. */

/* ---------- the menu on a phone ----------
   Below the breakpoint the row folds behind a two-line button. Open, the bar
   becomes a sheet of the same glass: the links stand where the logo was, set
   in the nav's own voice, and the mark closes the sheet at the width of the
   screen, the way it closes every page in the footer. */
.burger{display:none}
.menu-in{display:contents}
.menu .menu-mark{display:none}  /* it is a link now: outranks .menu a */
@media (max-width:859px){
  .nav .in{position:relative;flex-wrap:wrap;height:auto;min-height:68px}
  .burger{display:grid;place-items:center;margin-left:auto;margin-right:-10px;
    width:44px;height:44px;padding:0;border:0;background:none;color:var(--w);cursor:pointer;
    position:relative;z-index:2}
  .burger i{position:relative;display:block;width:22px;height:1.5px;background:currentColor}
  .burger i::before,.burger i::after{content:'';position:absolute;left:0;width:22px;height:1.5px;
    background:currentColor;transition:transform .35s var(--ease)}
  .burger i::before{transform:translateY(-4px)}
  .burger i::after{transform:translateY(4px)}
  .nav.open .burger{position:absolute;top:12px;right:var(--edge)}
  .nav.open .burger i{background:transparent}
  .nav.open .burger i::before{transform:rotate(45deg)}
  .nav.open .burger i::after{transform:rotate(-45deg)}
  .nav.open .in > a:first-child{display:none}
  /* the sheet is opened by the script: the bar is unclipped downwards while
     the mark travels from the logo's place to the foot of the sheet */
  .menu{display:none;flex-basis:100%;margin:0;font-size:13.5px;color:var(--w)}
  .nav.open .menu{display:block}
  .menu .menu-in{display:flex;flex-direction:column;align-items:flex-start}
  .menu-mark{transform-origin:0 0;will-change:transform}
  .menu a{min-height:36px;padding-block:0}
  .menu a:first-child{margin-top:16px}
  .nav .menu .nav-apply{margin-right:0}
  .menu .menu-mark{display:block;width:84%;min-height:0;background:none;margin:clamp(70px,14vh,120px) 0 clamp(22px,4vh,34px) -1%}
  .nav .menu-mark img{width:100%;height:auto}
  .nav.open{border-bottom:1px solid var(--hair)}
}
@media (max-width:859px) and (prefers-reduced-motion:reduce){
  .burger i::before,.burger i::after{transition:none}
}

/* buttons: Plex Mono, uppercase, opened up. text-indent offsets the
   trailing letter-space so the label stays optically centred. */
.pill{border-radius:var(--pill);padding:12px 24px;
  font-family:var(--mono);font-size:12.5px;font-weight:500;
  letter-spacing:.11em;text-transform:uppercase;text-indent:.11em;
  min-height:24px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;
  background:var(--w);color:var(--gnd)}

.pill:hover{background:var(--mag);color:var(--gnd)}

.pill:active{transform:translateY(1px)}

.pill--line{background:none;color:var(--w);border:1px solid var(--hair)}

button.pill{cursor:pointer}

.pill--line:hover{background:var(--w);color:var(--gnd);border-color:var(--w)}

.nav .pill{margin-left:auto}

.mark--dark{display:none}
/* on the light ground the white mark would vanish: every page swaps it */
:root[data-theme="light"] .mark--light{display:none}
:root[data-theme="light"] .mark--dark{display:block}

@media (min-width:860px){.nav .pill{margin-left:0}}

/* the navigation stands on the outer margin, not on the text margin */
.nav .in{padding-inline:var(--edge)}

/* and the row ends on the ink: the last link carries a trailing letter-space
   that would otherwise hold it a notch short of the margin */
.menu .nav-apply{margin-right:-.11em}

/* ---------- footer ---------- */
footer{border-top:1px solid var(--hair);padding-block:clamp(36px,5vw,64px) 64px;
  font-family:var(--mono);font-size:13px;letter-spacing:0;color:var(--faint)}

/* The mark, once, at the size of the page. It is the only place on the site
   where the logo is allowed to be large, and it is set a long way down in the
   ink so that it reads as a watermark on the paper rather than as a sign over
   a shop: the footer's job is to be found, not to be looked at. Width is the
   page and the height follows the artwork, so it is the same gesture at every
   screen size. */
.footmark{display:block;width:100%;margin-bottom:clamp(34px,5vw,70px)}

.footmark img{width:100%;height:auto;opacity:.13}

.footmark .m-dark{display:none}

:root[data-theme="light"] .footmark .m-light{display:none}

:root[data-theme="light"] .footmark .m-dark{display:block}

/* the whole footer speaks in the mono: it is the voice the site uses for
   labels and records, and a footer is nothing but labels and records. The
   headings are told apart by weight and by case, not by a second typeface. */
.fcols{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:40px 28px;align-items:stretch}

.fcols a,.fcols span{font-family:var(--mono);font-weight:400;font-size:13px;
  letter-spacing:0;line-height:1.7}

.fcols a{display:flex;width:fit-content;min-height:24px;align-items:center}

/* the only link in the footer that leaves the site */
.fcols a.ext::after{content:"\2197";margin-left:6px;font-size:.9em;color:var(--faint)}

/* left: the record of who we are, the socials at its foot */
.f-who{display:flex;flex-direction:column;justify-content:space-between;gap:32px}

/* right: a small question on the left, the way in on the right */
.f-map{display:grid;grid-template-columns:minmax(0,190px) auto;gap:30px clamp(28px,5vw,72px);align-items:baseline}

.fcols b{display:block;font-family:var(--mono);font-weight:500;font-size:11px;line-height:1.5;
  letter-spacing:.1em;text-transform:uppercase;color:var(--soft);opacity:.7}

@media (max-width:720px){
  .fcols{grid-template-columns:1fr!important}
  .f-map{grid-template-columns:minmax(0,1fr) auto;gap:24px 20px}
}

.fin{margin-top:38px;padding-top:16px;border-top:1px solid var(--hair);display:flex;gap:24px;flex-wrap:wrap;
  align-items:center;font-family:var(--mono);font-size:13px;letter-spacing:0}

/* the ground switch: a real switch, in the footer, where site-wide settings
   belong. The knob slides, the track fills, and the label says the state. */
.sw-wrap{display:flex;align-items:center;gap:10px;margin-left:auto}

.sw-btn{width:46px;height:26px;padding:3px;border-radius:var(--pill);cursor:pointer;
  background:none;border:1px solid var(--hair);display:flex;align-items:center;
  transition:border-color .25s var(--ease),background .25s var(--ease)}

.sw-btn i{width:18px;height:18px;border-radius:calc(var(--rx) * .55);background:var(--faint);display:block;
  transition:transform .28s var(--ease),background .25s var(--ease)}

.sw-btn[aria-pressed="true"]{border-color:var(--tintLine);background:var(--tint)}

.sw-btn[aria-pressed="true"] i{transform:translateX(20px);background:var(--w)}

@media (hover:hover){.sw-btn:hover{border-color:var(--tintLine)}}

.sw-wrap span{font-family:var(--mono);font-size:12px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--faint)}

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

/* ---------- the link highlight ----------
   The brand's one moving mark: on hover a magenta bar runs under a link from
   left to right; the words keep their own colour. Used on the small mono links
   (profiles, sites, the way back) — never on display type, where a filled bar
   would be a block of colour rather than an underline that grew. The padding
   gives the bar some air and the negative margin gives it back, so nothing
   moves when it appears. */
.hl,.fcols a,.fin a,.facts a,.ppl a,.wm-link,.st-next .back,.st-lab a,.scroll,.more{
  background:linear-gradient(var(--mag),var(--mag)) no-repeat 0 0 / 0% 100%;
  padding:.18em .32em;margin:-.18em -.32em;
  transition:background-size .38s var(--ease),color .2s var(--ease)}
:is(.hl,.fcols a,.fin a,.facts a,.ppl a,.wm-link,.st-next .back,.st-lab a,.scroll,.more):hover,
:is(.hl,.fcols a,.fin a,.facts a,.ppl a,.wm-link,.st-next .back,.st-lab a,.scroll,.more):focus-visible{
  background-size:100% 100%;border-bottom-color:transparent}
@media (prefers-reduced-motion:reduce){
  .hl,.fcols a,.fin a,.facts a,.ppl a,.wm-link,.st-next .back,.st-lab a,.scroll,.more{transition:none}
}
/* the nav takes it too, on the desktop row only: in the phone sheet the links
   are full-width rows, where a bar would be a slab rather than a highlight */
@media (min-width:860px){
  .menu a{background:linear-gradient(var(--mag),var(--mag)) no-repeat 0 0 / 0% 100%;
    padding:.18em .32em;margin:-.18em -.32em;
    transition:background-size .38s var(--ease),color .2s var(--ease)}
  .menu a:hover,.menu a:focus-visible{background-size:100% 100%}
  .menu .nav-apply{margin-right:calc(-.32em - .11em)}
}
@media (min-width:860px) and (prefers-reduced-motion:reduce){.menu a{transition:none}}

/* ---------- "read" under a card ----------
   The card's photograph and title open the piece; this says so in words, in
   the voice of the nav and the footer, with the same square-cut arrow. */
.more{display:inline-flex;align-items:center;gap:.55em;align-self:flex-start;
  margin-top:clamp(14px,1.6vw,20px);font-family:var(--mono);font-size:11.5px;font-weight:500;
  letter-spacing:.11em;text-transform:uppercase;color:var(--w)}
.more::after{content:'';width:1em;height:1em;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M3 12h17M13 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpath d='M3 12h17M13 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat}
/* a photograph that opens something shows the hand */
a.shot{display:block;cursor:pointer}

/* ---------- the title token ----------
   One voice for every title on the site: IBM Plex Serif Light, tracked in by
   5%, set tight. Titles take the ink of the ground they sit on, so a dark
   band gets light copy; on the light ground that ink is softened to #282828.
   The home hero and the close are the exceptions: they keep their own Sans
   display and the magenta on "stay", and are the only places either appears.
   Everywhere else the old highlight is the same ink as the rest. Sizes stay with each section; the token is only the voice. The
   page stylesheets come after this one and set their own title rules, so the
   token wins by importance rather than by order; its exceptions sit in
   :where() so a page that marks its own title !important can still set it. The pillars label is an
   eyebrow, not a title, and keeps the mono. */
:is(h1,h2):where(:not(#pillars .big,#heroBig,.end h2)){font-family:var(--serif)!important;font-weight:300!important;font-style:normal!important;
  letter-spacing:-.05em!important;line-height:.95!important;color:inherit!important}
:root[data-theme="light"] :is(h1,h2):where(:not(#pillars .big,#heroBig,.end h2)){color:color-mix(in srgb,currentColor 91%,transparent)!important}
:is(h1,h2) .it{font-family:inherit!important;font-weight:inherit!important;color:inherit!important;
  letter-spacing:inherit!important;line-height:inherit!important;padding-bottom:0}
:is(h1,h2) .it--mag{color:var(--mag)!important}
/* "stay" is the one word that crosses from the sans of the hero and the
   outro into the serif of the titles, wherever it appears */
:is(h1,h2) .it--mag,#heroSmall .it{font-family:var(--serif)!important;font-weight:inherit!important;
  font-style:normal!important;letter-spacing:-.05em!important}
/* the footer is the one place every page shares, and it closes every page
   the same way: the acid field with the brand magenta for the mark and the
   words, all in capitals. On hover a link fills with the magenta, so its
   words turn to the field colour to stay legible. */
footer{background:#EDFFC6;--w:#F14C7A;--soft:#F14C7A;--faint:#F14C7A;
  --hair:rgba(241,76,122,.35);--tint:rgba(241,76,122,.1);--tintLine:rgba(241,76,122,.5);
  color-scheme:light;color:#F14C7A;border-top:0;text-transform:uppercase}
footer *{text-transform:uppercase}
footer .footmark{aspect-ratio:880/190;background:#F14C7A;
  -webkit-mask:url(../brand/logo-bheroes.svg) center/contain no-repeat;mask:url(../brand/logo-bheroes.svg) center/contain no-repeat}
footer .footmark img{display:none!important}
footer :is(.fcols,.fin) a:is(:hover,:focus-visible){color:#EDFFC6}
footer .fcols a.ext:is(:hover,:focus-visible)::after{color:#EDFFC6}
footer .f-in{opacity:0;filter:blur(8px);transform:translateY(18px);
  transition:opacity .9s var(--ease) var(--fd,0ms),filter .9s var(--ease) var(--fd,0ms),transform .9s var(--ease) var(--fd,0ms)}
footer .f-in.on{opacity:1;filter:none;transform:none}
/* the main buttons are cut close around the label the way the nav links are,
   with no fill and no line of their own: words in the page's ink, and on hover
   the magenta sweeps across under words that keep their ink. */
.pill,.pill--line{border:0;border-radius:0;padding:.18em .32em;margin:-.18em -.32em;min-height:24px;text-indent:0;
  background:linear-gradient(#F14C7A,#F14C7A) no-repeat 0 0 / 0% 100%;color:var(--w);
  transition:background-size .38s var(--ease),color .2s var(--ease)}
.pill:is(:hover,:focus-visible),.pill--line:is(:hover,:focus-visible){
  background:linear-gradient(#F14C7A,#F14C7A) no-repeat 0 0 / 100% 100%;color:var(--w)}
@media (prefers-reduced-motion:reduce){.pill,.pill--line{transition:none}}

/* on a phone the reveals keep their blur, but a lighter one: the cost of a
   blur grows with its radius, and on a small screen 3px reads the same as 7px
   on a large one */
@media (hover:none),(max-width:720px){
  /* Safari on a phone repaints an animated blur on every frame, word by word:
     there the words fade without it */
  .anim .w,.anim .sent.in .w{filter:none}
  .tn-say .tw:not(.on),.evx-say .tw:not(.on){filter:blur(3px)}
  footer .f-in{filter:blur(4px)}
}
