/* BindCut public site. One stylesheet, no scripts, no webfonts, nothing third
   party. A privacy page that fetches a font from another company in order to
   say it collects nothing is a page that hands the reader's address to that
   company. So: system fonts only, and everything here is served from Pages. */

:root {
  --ivory:      #fbf6ec;
  --ivory-warm: #f4ebda;
  --card:       #fffdf8;
  --teal:       #0f4c50;
  --teal-deep:  #093437;
  --teal-soft:  #3d7a7d;
  --terracotta: #b04f2c;
  --terracotta-soft: #c9764f;
  --ink:        #1e1b17;
  --muted:      #6d6355;
  --rule:       #e3d9c6;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --page: 46rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 17px/1.7 var(--sans);
  color: var(--ink);
  background: var(--ivory);
  /* A single soft wash rather than a gradient wall. */
  background-image: radial-gradient(120% 60% at 50% 0%, var(--ivory-warm) 0%, var(--ivory) 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

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

header.site {
  padding: 1.75rem 0 0;
}
header.site .wrap {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.word {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--teal-deep);
  text-decoration: none;
}
.word:hover { color: var(--terracotta); }
/* flex: none so the nav wraps to its own line on a narrow phone instead of
   shrinking below its content and clipping the last link. */
nav.site { margin-left: auto; display: flex; flex-wrap: wrap; gap: 1.25rem; flex: none; }
nav.site a {
  font-size: .95rem;
  text-decoration: none;
  color: var(--teal);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
nav.site a:hover { border-bottom-color: var(--terracotta); }
nav.site a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--terracotta);
}

/* ---------- type ---------- */

main { padding: 2.5rem 0 1rem; }

h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--teal-deep);
  margin: 0 0 .75rem;
  text-wrap: balance;
}
h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--teal-deep);
  margin: 3rem 0 .6rem;
  text-wrap: balance;
}
h3 {
  font-size: 1.02rem;
  margin: 1.9rem 0 .35rem;
  color: var(--teal-deep);
}
h2 + h3 { margin-top: 1.1rem; }

p { margin: 0 0 1.05rem; }

.lede {
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.6rem;
  max-width: 34rem;
}

a { color: var(--terracotta); text-underline-offset: 3px; }
a:hover { color: var(--teal); }

strong { color: var(--teal-deep); }

ul, ol { padding-left: 1.2rem; margin: 0 0 1.05rem; }
li { margin: .4rem 0; }
li::marker { color: var(--terracotta-soft); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3.25rem 0;
}

/* ---------- status pill ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  background: rgba(15, 76, 80, .07);
  border: 1px solid rgba(15, 76, 80, .18);
  border-radius: 999px;
  padding: .4rem .85rem;
  margin-bottom: 1.4rem;
}
.status .dot {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--terracotta);
  flex: none;
}

/* ---------- cards and panels ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
}
.panel h2, .panel h3 { margin-top: 0; }
.panel :last-child { margin-bottom: 0; }

.panel.accent {
  border-left: 4px solid var(--terracotta);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.grid li {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.05rem 1.15rem;
}
.grid li h3 { margin: 0 0 .3rem; font-size: .98rem; }
.grid li p { margin: 0; font-size: .95rem; color: var(--muted); line-height: 1.6; }

/* ---------- worked example figures ---------- */

.figures {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.5rem;
  margin: 1.25rem 0 1.4rem;
  padding: 0;
  list-style: none;
}
.figures div { margin: 0; }
.figures dt, .figures .label {
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .15rem;
}
.figures dd, .figures .value {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}
.figures .value .unit {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--muted);
  letter-spacing: .01em;
  margin-left: .15rem;
}

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

figure.diagram {
  margin: 1.75rem 0;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}
figure.diagram svg { display: block; width: 100%; height: auto; color: var(--teal-deep); }
figure.diagram figcaption {
  margin-top: .9rem;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- inline definition list ---------- */

dl.terms { margin: 1.25rem 0; }
dl.terms dt {
  font-weight: 600;
  color: var(--teal-deep);
  margin-top: 1.2rem;
}
dl.terms dd { margin: .2rem 0 0; color: inherit; }

/* ---------- contact block ---------- */

.contact {
  font-size: 1.1rem;
}
.contact a {
  font-weight: 600;
  word-break: break-word;
}

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

footer.site {
  margin-top: 4rem;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .92rem;
}
footer.site .wrap > p { margin: 0 0 .5rem; }
footer.site a { color: var(--teal); }
footer.site nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: .75rem; }

.meta { color: var(--muted); font-size: .92rem; }

/* ---------- accessibility ---------- */

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  z-index: 10;
  background: var(--card);
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: .6rem .9rem;
  text-decoration: none;
}

/* ---------- dark ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --ivory:      #14120e;
    --ivory-warm: #1c1913;
    --card:       #1c1a15;
    --teal-deep:  #7fc4c4;
    --teal:       #6fb4b5;
    --terracotta: #e09266;
    --terracotta-soft: #c9764f;
    --ink:        #ece6da;
    --muted:      #a49a89;
    --rule:       #322d24;
  }
  .status {
    color: var(--teal);
    background: rgba(127, 196, 196, .08);
    border-color: rgba(127, 196, 196, .22);
  }
  footer.site a { color: var(--teal); }
}

@media print {
  body { background: #fff; color: #000; }
  header.site nav, footer.site nav, .skip { display: none; }
  .panel, .grid li, figure.diagram { border-color: #bbb; break-inside: avoid; }
  a { color: #000; }
}
