/* ============================================================
   Codember design system
   One source of truth for every page on codember.co.
   Greyscale only: there is no hue anywhere in this file.
   ============================================================ */

:root{
  --ink:#000; --paper:#f0efed; --ash:#52514e; --smoke:#9d9d9d;
  --line:#d5d4d1; --line-dark:#262626; --fill:#e7e6e3;
  --ui:'Archivo',-apple-system,BlinkMacSystemFont,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,monospace;
}

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

/* ink, so anything the content does not cover shows the live field */
html{-webkit-text-size-adjust:100%}
body{background:var(--ink);color:var(--ink);font-family:var(--ui);font-size:17px;
  line-height:1.5;-webkit-font-smoothing:antialiased}

img,svg,video{max-width:100%;height:auto;display:block}

/* ---- type ---- */
.display{font-weight:800;font-stretch:118%;text-transform:uppercase;
  letter-spacing:-.03em;line-height:.95;font-size:clamp(2rem,5.6vw,4.4rem)}
.display.sm{font-size:clamp(1.55rem,3.6vw,2.7rem);margin-top:.8rem}
.dark .display,.phead .display{color:#fff}
.spec{font-family:var(--mono);font-size:.68rem;letter-spacing:.14em;color:var(--ash)}
.lede{color:var(--ash);font-size:1.12rem;max-width:62ch}
.dark .lede,.phead .lede{color:#b4b4b4}
.dark .spec,.phead .spec{color:var(--smoke)}
.head{margin-bottom:2.4rem}
h1,h2,h3,h4{font-weight:800;letter-spacing:-.02em;line-height:1.1}

/* ---- layout ---- */
.wrap{max-width:1180px;margin:0 auto;padding:0 1.5rem}
/* A 95% white plate, not solid paper. The field is white-on-black, so behind
   it the black reads as paper (242) and the code lines read as marks brighter
   than the paper (255). Texture on the blank areas, and black body text sits
   at 18.8:1, which is better than it was on flat paper. */
section{padding:6rem 0;position:relative;z-index:1;background:rgba(255,255,255,.95)}
/* 0.72 is the lightest scrim that still holds white text above 6:1 contrast
   when the brightest line in the field passes directly behind it */
.dark{background:rgba(0,0,0,.72);color:#fff}
.endcap{position:relative;z-index:1;background:rgba(255,255,255,.95)}
/* a menu deep link must land clear of the fixed bar, not under it */
[id]{scroll-margin-top:5.5rem}

/* ---- the code field, fixed behind the whole document ---- */
.field{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;
  background:var(--ink)}
.field canvas{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:100vw;height:100svh;display:block}

/* ---- buttons and links ---- */
.btn{display:inline-block;background:var(--ink);color:var(--paper);text-decoration:none;
  font-weight:500;font-size:1rem;padding:1rem 2rem;border:1px solid var(--ink);
  transition:opacity .18s ease}
.btn:hover{opacity:.84}
.dark .btn,.phead .btn{background:var(--paper);color:var(--ink);border-color:var(--paper)}
.btn.ghost{background:none;color:var(--ink)}
.dark .btn.ghost,.phead .btn.ghost{background:none;color:#fff;border-color:#fff}
a{color:inherit}
:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* ---- the bar ----
   Over a dark hero it floats and inverts against the field. Past that the page
   scrolls underneath, and a transparent bar lets body copy run straight through
   the wordmark, so it takes a plate. */
nav{position:fixed;top:0;left:0;right:0;z-index:60;mix-blend-mode:difference}
.navbar{position:relative;z-index:1;display:flex;align-items:center;gap:1.6rem;
  padding:1.1rem 1.5rem;color:#fff}
/* one line box for every item in the bar, so no item's own font metrics
   decide where its text sits */
.navbar a,.navbar button{color:#fff;text-decoration:none;font-size:.88rem;
  font-weight:500;background:none;border:0;padding:0;cursor:pointer;
  font-family:inherit;letter-spacing:inherit;line-height:1.25;
  display:inline-flex;align-items:center}
.navbar .mark{font-weight:800;font-stretch:118%;letter-spacing:-.02em;font-size:1.15rem;
  text-transform:uppercase;margin-right:auto;white-space:nowrap}
.navbar .mark b{font-weight:300}
/* The primary action should not look like the links next to it. It centres
   its own label in a box of known height: with padding and line-height:1 the
   label sits wherever the font's ascent and descent put it, which is lower
   than the plain links beside it in some faces. */
.navbar .cta{border:1px solid currentColor;padding:0 .95rem;min-height:2.3rem;
  justify-content:center}
nav.solid .navbar .cta,nav.open .navbar .cta{background:var(--ink);color:var(--paper);
  border-color:var(--ink)}
.navbar .quiet{opacity:.62}
.navbar .quiet:hover{opacity:1}
.trig{display:inline-flex;align-items:center;gap:.4rem}
.trig i{display:block;width:7px;height:7px;border-right:1.4px solid currentColor;
  border-bottom:1.4px solid currentColor;transform:translateY(-2px) rotate(45deg);
  transition:transform .24s ease}
nav.open .trig i{transform:translateY(1px) rotate(225deg)}
.burger{display:none}

nav.solid{mix-blend-mode:normal}
nav.solid .navbar{color:var(--ink);background:rgba(240,239,237,.86);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  box-shadow:0 1px 0 var(--line)}
nav.solid .navbar a,nav.solid .navbar button{color:var(--ink)}
@supports not (backdrop-filter:blur(2px)){
  nav.solid .navbar{background:var(--paper)}
}

/* ---- the menu sheet ---- */
.mega{position:absolute;left:0;right:0;top:100%;background:var(--paper);
  color:var(--ink);border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  opacity:0;visibility:hidden;transform:translateY(-8px);
  transition:opacity .24s ease,transform .24s ease,visibility .24s}
nav.open .mega{opacity:1;visibility:visible;transform:none}
nav.open{mix-blend-mode:normal}
nav.open .navbar{color:var(--ink);background:var(--paper)}
nav.open .navbar a,nav.open .navbar button{color:var(--ink)}
.mega-in{max-width:1180px;margin:0 auto;padding:2.4rem 1.5rem 2.2rem;
  display:grid;grid-template-columns:repeat(3,1fr);gap:1rem 2.5rem}
.mgroup{display:flex;flex-direction:column;gap:.1rem}
.mgroup .spec{padding-bottom:.7rem;margin-bottom:.5rem;border-bottom:1px solid var(--line)}
.mgroup a{color:var(--ink);text-decoration:none;font-size:1rem;font-weight:500;
  padding:.45rem 0;border-bottom:1px solid transparent;width:max-content;
  transition:border-color .18s ease}
.mgroup a:hover{border-bottom-color:var(--ink)}
.mega-foot{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;
  gap:.5rem 1.4rem;margin-top:1.4rem;padding-top:1.2rem;border-top:1px solid var(--line)}
.mega-foot .spec{margin-right:auto}
.mega-foot a{color:var(--ink);text-decoration:none;font-size:.92rem;font-weight:500;
  border-bottom:1px solid var(--line);padding-bottom:2px}
.mega-foot a:hover{border-bottom-color:var(--ink)}

@media(max-width:860px){
  .navbar .wide{display:none}
  .burger{display:inline-flex}
  .mega{position:fixed;top:0;left:0;right:0;bottom:0;transform:none;
    overflow-y:auto;border:0;padding-top:4.4rem}
  nav.open .mega{transform:none}
  .mega-in{grid-template-columns:1fr;gap:2rem;padding-bottom:3rem}
  .mega-foot{flex-direction:column;align-items:flex-start}
  .mega-foot .spec{margin-right:0}
}

/* ---- page header, for every page that is not the homepage ----
   Carries .dark as well, so it gets the same scrim: without one the field runs
   at full brightness straight behind the copy and nothing is readable. */
.phead{position:relative;z-index:1;color:#fff;
  padding:11rem 0 5rem;border-bottom:1px solid var(--line-dark)}
.phead .display{color:#fff;max-width:20ch}
.phead .lede{margin-top:1.4rem}
.phead .spec{margin-bottom:1.6rem;display:block}

/* ---- forms ---- */
label{display:block;font-weight:500;font-size:.95rem;margin-bottom:.45rem}
input,select,textarea{width:100%;font-family:inherit;font-size:1rem;color:var(--ink);
  background:#fff;border:1px solid var(--line);padding:.85rem 1rem;border-radius:0}
input:focus,select:focus,textarea:focus{outline:2px solid var(--ink);outline-offset:-1px;
  border-color:var(--ink)}
textarea{min-height:9rem;resize:vertical}
.field-row{margin-bottom:1.4rem}
.hint{font-size:.85rem;color:var(--ash);margin-top:.4rem}

/* ---- registration marks, borrowed from print ---- */
.reg{position:relative;border:1px solid var(--line)}
.reg:before,.reg:after,.reg>.m1,.reg>.m2{content:'';position:absolute;width:3px;height:3px;
  background:var(--ash);opacity:.45}
.reg:before{left:-1px;top:-1px} .reg:after{right:-1px;top:-1px}
.reg>.m1{left:-1px;bottom:-1px} .reg>.m2{right:-1px;bottom:-1px}

/* ---- the ticker ---- */
.ticker{background:rgba(0,0,0,.72);color:#fff;padding:1rem 0;overflow:hidden;
  position:relative;z-index:1}
.ttrack{display:flex;width:max-content;will-change:transform;
  font-family:var(--mono);font-size:.76rem;letter-spacing:.18em;text-transform:uppercase;
  color:#b4b4b4}
.ttrack i{font-style:normal;padding:0 1.6rem;border-right:1px solid var(--line-dark);
  white-space:nowrap}

/* ---- the sign off ---- */
.signoff{padding:4.5rem 0 1.25rem}
/* textLength pins the word to the full width of the box, so it fills the
   measure on any screen and never depends on which font actually loaded */
.signoff a{display:block;text-decoration:none}
.signoff svg{display:block;width:100%;height:auto;fill:var(--ink);
  transition:opacity .2s ease}
.signoff a:hover svg{opacity:.84}
.signoff text{font-family:var(--ui);font-weight:800;font-size:150px}

footer{border-top:1px solid var(--line);padding:2.5rem 0;display:flex;gap:1.4rem;
  flex-wrap:wrap;align-items:center;font-size:.9rem;color:var(--ash)}
footer .right{margin-left:auto;display:flex;gap:1.4rem}
footer a{color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
footer a:hover{border-bottom-color:var(--ink)}

/* ---- reveals ---- */
.rev{opacity:0;transform:translateY(18px);
  transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1)}
.rev.in{opacity:1;transform:none}

@media(prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
  .rev{opacity:1;transform:none}
}
