/* Blackbird — public site.

   Black and silver, with antique gold used sparingly. Gold appears in exactly
   four places and nowhere else: small-caps labels, the ornamental rule, the
   primary button's border, and the active path in a diagram. The moment it
   starts filling surfaces it reads as yellow rather than metal.

   Five typefaces, each with one job and never two on a line:
     Cinzel             structure -- wordmark, nav, labels, buttons
     Playfair Display   headlines, always capitals
     Cinzel Decorative  drop caps only
     Bodoni Moda        numerals only
     EB Garamond        body prose

   Motion is decorative, never load-bearing: everything starts at its final
   position, so a browser with JS off or prefers-reduced-motion set gets the
   same page, just still. */

:root {
  --ink:      #06070A;
  --ink2:     #0B0C0F;
  --edge:     #1E2126;
  --edge2:    #141619;
  --silver:   #DDE1E6;
  --silver2:  #C3C9D2;
  --dim:      #858B95;
  --mute:     #575D66;
  --gold:     #B08D57;
  --gold-hi:  #D7BE8F;
  --measure:  38rem;
  --gutter:   clamp(1.25rem, 5vw, 3rem);

  --f-struct: 'Cinzel', 'Copperplate Gothic Light', Georgia, serif;
  --f-head:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-drop:   'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --f-num:    'Bodoni Moda', 'Bodoni MT', Didot, Georgia, serif;
  --f-body:   'EB Garamond', Garamond, Georgia, serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--silver);
  font: 400 17px/1.75 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure { max-width: var(--measure); }

/* Numerals get Bodoni wherever they stand alone -- version strings, sizes,
   step numbers. Inside running prose they stay in Garamond, because swapping
   face mid-sentence is worse than a slightly plainer digit. */
.num { font-family: var(--f-num); letter-spacing: .04em; }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 7, 10, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--edge2);
  background: rgba(6, 7, 10, .9);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}

.brand {
  font-family: var(--f-struct);
  font-size: .95rem;
  letter-spacing: .26em;
  text-decoration: none;
  color: var(--silver);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 2.5vw, 1.6rem);
  font-family: var(--f-struct);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  color: var(--dim);
  transition: color .18s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--silver); }

.site-nav .btn-sm {
  padding: .5rem 1.05rem;
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  border-radius: 2px;
}

.site-nav .btn-sm:hover { border-color: var(--gold-hi); color: var(--silver); }

@media (max-width: 42rem) { .site-nav .hide-sm { display: none; } }

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3.5rem, 12vh, 6.5rem) 0 clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}

/* A silver field and a faint rule grid, both drifting at different rates as
   the page scrolls. --p is written by site.js; with no JS it stays 0. */
.hero-layer {
  position: absolute;
  inset: -22% -12% auto -12%;
  height: 150%;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, calc(var(--p, 0) * var(--depth, 0) * 1px), 0);
}

.hero-field {
  --depth: 80;
  background:
    radial-gradient(102% 70% at 16% -12%, rgba(195, 201, 210, .085), transparent 62%),
    radial-gradient(72% 52% at 88% 6%,   rgba(195, 201, 210, .045), transparent 66%);
}

.hero-grid {
  --depth: 38;
  opacity: .55;
  background-image:
    linear-gradient(to right,  var(--edge2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--edge2) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: radial-gradient(72% 62% at 24% 0%, #000 12%, transparent 76%);
  -webkit-mask-image: radial-gradient(72% 62% at 24% 0%, #000 12%, transparent 76%);
}

.eyebrow {
  font-family: var(--f-struct);
  font-size: .63rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
}

h1 {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(1.7rem, 5.2vw, 3.125rem);
  line-height: 1.1;
  letter-spacing: .085em;
  text-transform: uppercase;
  margin: 0 0 1.4rem;
  max-width: 17ch;
}

.lede {
  font-size: clamp(1.02rem, 2.1vw, 1.16rem);
  color: var(--dim);
  margin: 0 0 2.4rem;
  max-width: var(--measure);
}

/* --------------------------------------------------------------- actions -- */

.actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--f-struct);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .82rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  background: linear-gradient(180deg, rgba(176, 141, 87, .14), rgba(176, 141, 87, .04));
  transition: border-color .18s ease, color .18s ease, transform .14s ease;
}

.btn:hover { border-color: var(--gold-hi); color: var(--silver); transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-ghost {
  border-color: var(--edge);
  color: var(--silver2);
  background: none;
}

.btn-ghost:hover { border-color: var(--dim); color: var(--silver); }

.btn-meta { font-family: var(--f-num); font-size: .85rem; color: var(--mute); letter-spacing: .05em; }

/* ------------------------------------------------------------ ornament ---- */

.orn { display: flex; align-items: center; gap: .8rem; }
.orn i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(176, 141, 87, .55), transparent); }
.orn b { width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold); flex: none; }

/* -------------------------------------------------------------- sections -- */

section { padding: clamp(3rem, 8vh, 5.5rem) 0; }

.kicker {
  font-family: var(--f-struct);
  font-size: .63rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}

h2 {
  font-family: var(--f-head);
  font-weight: 400;
  font-size: clamp(1.35rem, 3.3vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: .055em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
}

h3 {
  font-family: var(--f-struct);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--silver2);
  margin: 0 0 .55rem;
}

p { margin: 0 0 1.15rem; color: var(--dim); }
p:last-child { margin-bottom: 0; }
p strong { color: var(--silver); font-weight: 400; }

/* An initial that belongs to Cinzel Decorative and nothing else. */
.drop::first-letter {
  float: left;
  font-family: var(--f-drop);
  font-weight: 700;
  font-size: 3.4em;
  line-height: .8;
  color: var(--gold);
  margin: .1em .12em 0 0;
}

/* ------------------------------------------------------------------ grid -- */

.cols {
  display: grid;
  gap: 1px;
  background: var(--edge2);
  border: 1px solid var(--edge2);
  border-radius: 10px;
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2.4rem;
}

.cols > div { background: var(--ink2); padding: 1.5rem 1.4rem; }
.cols p { font-size: .95rem; margin: 0; }

/* --------------------------------------------------------------- diagram -- */

.dia {
  margin-top: 2.4rem;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--ink2);
  padding: 1.4rem 1.2rem .9rem;
  overflow-x: auto;
}

.dia svg { width: 100%; min-width: 30rem; height: auto; display: block; }

.dia figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--f-struct);
  font-size: .56rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: .9rem;
}

/* The active path draws itself once its diagram scrolls into view. */
.dia .draw { stroke-dasharray: 620; stroke-dashoffset: 620; }
.js-reveal .dia.is-in .draw { animation: draw 2.4s ease-out .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ----------------------------------------------------------------- steps -- */

ol.steps { max-width: var(--measure); margin: 2.2rem 0 0; padding: 0; list-style: none; counter-reset: s; }

ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 1.7rem 3.2rem;
  color: var(--dim);
}

ol.steps li:last-child { padding-bottom: 0; }

ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -.15em;
  font-family: var(--f-num);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}

/* ------------------------------------------------------------------- faq -- */

.faq { max-width: var(--measure); margin-top: 1.8rem; }

.faq details { border-bottom: 1px solid var(--edge2); padding: 1.1rem 0; }

.faq summary {
  cursor: pointer;
  list-style: none;
  color: var(--silver);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform .2s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .85rem 0 0; font-size: .97rem; }

/* ------------------------------------------------------------------- doc -- */

.doc { padding: clamp(2.5rem, 7vh, 4rem) 0 6rem; max-width: var(--measure); }

.doc h1 {
  font-size: clamp(1.55rem, 4.2vw, 2.3rem);
  margin-bottom: .7rem;
  max-width: none;
  letter-spacing: .07em;
}

.doc .updated { font-family: var(--f-num); font-size: .82rem; color: var(--mute); margin: 0 0 3rem; }

.doc h2 {
  font-family: var(--f-struct);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--silver2);
  margin: 2.8rem 0 .9rem;
}

.doc ul { padding-left: 1.15rem; margin: 0 0 1.15rem; color: var(--dim); }
.doc li { margin-bottom: .55rem; }

.doc a, section p a, .faq a {
  color: var(--silver);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--mute);
}

.doc a:hover, section p a:hover, .faq a:hover { text-decoration-color: var(--gold); }

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--edge2);
  padding: 2.4rem 0 3.4rem;
  font-family: var(--f-struct);
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-footer a { color: var(--mute); text-decoration: none; }
.site-footer a:hover { color: var(--silver2); }

/* ---------------------------------------------------------------- reveal -- */

.js-reveal .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .7s cubic-bezier(.2, .7, .3, 1),
              transform .7s cubic-bezier(.2, .7, .3, 1);
}

.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* Spacing utilities. Classes rather than inline style attributes because the
   site's CSP sets style-src 'self', which blocks inline styles -- a policy only
   worth having if nothing on the site needs an exception to it. */
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 3rem; }
.mt-2xl { margin-top: 3.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-layer { transform: none !important; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .js-reveal .dia.is-in .draw { animation: none; stroke-dashoffset: 0; }
}

/* ----------------------------------------------------------------- focus -- */

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: .7rem 1.2rem;
  z-index: 100;
}

.skip:focus { left: 0; }
