/* Aachen Sans site: the posters' palette and layouts, set in the font itself. */
@font-face { font-family: "Aachen Sans"; src: url("fonts/webfonts/AachenSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Aachen Sans"; src: url("fonts/webfonts/AachenSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Aachen Sans"; src: url("fonts/webfonts/AachenSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Aachen Sans"; src: url("fonts/webfonts/AachenSans-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --tan: #EAE8D0;
  --blue: #7289DA;
  --ink: #141414;
  --white: #FFFFFF;
  --muted: #A9A68F;
  --line: #CFCCB2;
  --wrap: 1240px;
  --pad: clamp(16px, 4vw, 48px);
  --head: 60px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--tan);
  color: var(--ink);
  font-family: "Aachen Sans", Carlito, Calibri, sans-serif;
  font-size: 19px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  /* short pages keep the footer at the bottom of the window */
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.82em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.b { font-weight: 700; }
.i { font-style: italic; }
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.05; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; flex: none; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 10; background: var(--tan); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px clamp(16px, 3vw, 32px); min-height: var(--head); }
.mark { color: var(--blue); font-size: 26px; text-decoration: none; white-space: nowrap; transition: opacity .2s; margin-right: auto; }
/* home page: the name shows in the header only once the big title has scrolled away */
.js .home .mark { opacity: 0; pointer-events: none; }
.js .home.past-title .mark { opacity: 1; pointer-events: auto; }
.menu { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.menu a { text-decoration: none; font-size: 17px; }
.menu a:hover, .menu a[aria-current] { color: var(--blue); }
.gh { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--ink); }
.gh .ic { width: 24px; height: 24px; }
.gh:hover { color: var(--blue); }

/* feature tabs */
.subnav { border-bottom: 1px solid var(--line); background: var(--tan); }
.subnav .wrap { display: flex; gap: 6px clamp(18px, 3vw, 34px); overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; padding: 14px 0 11px; text-decoration: none; font-size: 17px; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.subnav a:hover { color: var(--blue); }
.subnav a[aria-current] { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--blue);
  background: var(--blue); color: var(--white); text-decoration: none; font: inherit; font-size: 18px;
  cursor: pointer; transition: background .15s, color .15s;
}
.btn .ic { margin-right: .5em; }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--tan); }
.btn.big { font-size: 22px; padding: 16px 34px; }

/* ---------------------------------------------------------------- page titles */
.page-title { color: var(--blue); font-size: clamp(44px, 6vw, 84px); }

/* ---------------------------------------------------------------- home (main poster) */
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 24px;
  padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(16px, 3vw, 32px);
}
.hero h1 { color: var(--blue); font-size: clamp(52px, 8vw, 104px); }
.pairs { font-size: clamp(38px, 5.6vw, 84px); margin: 14px 0 0; line-height: 1.15; }
.pairs + .pairs { margin-top: 0; }
.lede { max-width: 34em; font-size: 20px; margin: 22px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero-glyphs { color: var(--white); font-size: clamp(170px, 27vw, 380px); line-height: 1; text-align: right; }
.band { background: var(--blue); padding: clamp(24px, 4vw, 48px) 0; }
.alphabets { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 5vw, 72px); row-gap: 10px; }
.abc p, .digits {
  margin: 0; font-size: clamp(16px, 2.15vw, 34px); line-height: 1.55;
  text-align: justify; text-align-last: justify; white-space: nowrap;
}
.digits { grid-column: 1 / -1; color: var(--white); }

/* ---------------------------------------------------------------- preview */
.tester { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 112px); }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 28px 0 20px; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button {
  font: inherit; font-size: 16px; padding: 8px 16px; border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.seg button + button { border-left: 2px solid var(--ink); }
.seg button.on { background: var(--ink); color: var(--tan); }
.seg button[data-s="italic"] { font-style: italic; }
.seg button[data-w="700"] { font-weight: 700; }
.ctl { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.ctl select {
  font: inherit; font-size: 16px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--tan); color: var(--ink);
}
.ctl input[type=range] { accent-color: var(--blue); width: 180px; }
.ctl output { min-width: 4ch; font-variant-numeric: tabular-nums; }
.sample {
  min-height: 1.4em; padding: 24px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  font-size: 72px; line-height: 1.2; outline: none; overflow-wrap: anywhere;
}
.sample:focus { border-color: var(--blue); }

/* ---------------------------------------------------------------- pair panels (ß / ẞ and Ĳ posters) */
.panel .field { background: var(--blue); padding: clamp(36px, 5vw, 64px) 0; }
.panel .field.tan { background: var(--tan); }
.pair-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; }
.title { color: var(--tan); font-size: clamp(40px, 5.5vw, 76px); }
.title.blue { color: var(--blue); }
.note { color: var(--tan); font-size: clamp(15px, 1.6vw, 22px); margin: 14px 0 0; }
.note.ink { color: var(--ink); margin: 0; }
.words {
  display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: clamp(28px, 5vw, 72px);
  font-size: clamp(34px, 5vw, 76px); line-height: 1.38; margin-top: clamp(18px, 3vw, 36px);
}
.hero-pair { color: var(--white); font-size: clamp(170px, 25vw, 360px); line-height: 1; text-align: center; padding-bottom: .12em; }
.styles-band { background: var(--tan); padding: clamp(28px, 4vw, 48px) 0; }
.lines { display: grid; grid-template-columns: max-content 1fr; column-gap: clamp(16px, 4vw, 56px); row-gap: 6px; align-items: baseline; }
.lines p { margin: 0; font-size: clamp(20px, 2.6vw, 36px); }
.lab { color: var(--blue); font-size: 15px; margin: 0; }

/* ---------------------------------------------------------------- Bulgarian poster */
.bg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; }
.forms {
  display: grid; grid-template-columns: max-content 1fr; column-gap: clamp(16px, 4vw, 56px); align-items: baseline;
  margin-top: clamp(24px, 4vw, 48px); row-gap: 10px;
}
.forms .lab { color: var(--ink); font-size: 16px; }
.spread { margin: 0; font-size: clamp(26px, 4.4vw, 64px); line-height: 1.3; text-align: justify; text-align-last: justify; }
.muted { color: var(--muted); }
.blue { color: var(--blue); }
.field.blue { background: var(--blue); color: var(--ink); }
.pang .lab, .pang p { color: var(--ink); }
.pang .hl { color: var(--white); }

/* ---------------------------------------------------------------- four styles: a checkerboard, alternating when stacked */
.quads { display: grid; grid-template-columns: 1fr 1fr; }
.quad {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding: clamp(28px, 4vw, 56px) var(--pad);
  min-height: max(340px, calc((100vh - var(--head) - 50px) / 2)); background: var(--tan);
}
.aa { font-size: clamp(110px, 15vw, 230px); line-height: 1; color: var(--blue); }
.quad:nth-child(2), .quad:nth-child(3) { background: var(--blue); }
.quad:nth-child(2) .aa, .quad:nth-child(3) .aa { color: var(--white); }
.q-text p { margin: 0; font-size: clamp(22px, 2.8vw, 40px); line-height: 1.32; }
.q-text .lab { color: var(--ink); font-size: 16px; font-style: normal; font-weight: 400; margin-bottom: 8px; }
.q-text .num { font-size: clamp(18px, 2.1vw, 30px); }

/* ---------------------------------------------------------------- download */
.download { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 112px); }
.download .lede { margin-bottom: 26px; }
.files { border-collapse: collapse; margin: 34px 0 10px; min-width: min(100%, 460px); }
.files th, .files td { text-align: left; padding: 10px 28px 10px 0; border-bottom: 1px solid var(--line); }
.files th { font-weight: 400; color: var(--blue); font-size: 16px; }
.files a { color: var(--blue); }
.files a .ic, .foot a .ic { width: .85em; height: .85em; margin-right: .3em; }

/* ---------------------------------------------------------------- footer */
.foot { background: var(--blue); color: var(--ink); padding: 32px 0; font-size: 16px; }
.foot p { margin: 4px 0; }

/* ---------------------------------------------------------------- glyph page */
.g-head { padding: clamp(36px, 5vw, 64px) 0 12px; }
.g-head p { margin: 10px 0 0; font-size: 19px; }
.g-tools {
  position: sticky; top: var(--head); z-index: 5; background: var(--tan); border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.g-tools .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.search { position: relative; display: inline-flex; align-items: center; width: min(100%, 320px); }
.search .ic { position: absolute; left: 14px; width: 15px; height: 15px; opacity: .7; pointer-events: none; }
.search input[type=search] {
  width: 100%; font: inherit; font-size: 16px; padding: 8px 14px 8px 38px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--tan); color: var(--ink);
}
.g-tools .count { font-size: 15px; color: var(--blue); }
.cat { padding: 36px 0 8px; }
.cat > .wrap > h2 { color: var(--blue); font-size: clamp(30px, 4vw, 48px); margin-bottom: 4px; }
.block h3 { font-size: 16px; color: var(--ink); margin: 22px 0 10px; letter-spacing: .02em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.g {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  aspect-ratio: 1 / 1.08; padding: 8px 4px 6px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.35); font: inherit; color: var(--ink); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.g .c { font-size: 40px; line-height: 1.15; }
.g .u { font-size: 11px; color: #6F6C58; font-family: ui-monospace, Consolas, monospace; }
.g:hover, .g:focus-visible { background: var(--blue); color: var(--white); border-color: var(--blue); outline: none; }
.g:hover .u, .g:focus-visible .u { color: var(--white); }
.g[hidden] { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--tan); padding: 10px 18px; border-radius: 999px; font-size: 16px;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.glyphs-body.italic .g .c { font-style: italic; }
.glyphs-body.bold .g .c { font-weight: 700; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 820px) {
  body { font-size: 18px; }
  .hero-grid, .pair-grid { grid-template-columns: 1fr; }
  .hero-glyphs { order: -1; text-align: left; font-size: 44vw; margin: -4px 0 -2vw; }
  .hero-pair { text-align: left; font-size: 46vw; }
  .alphabets { grid-template-columns: 1fr; }
  .abc p, .digits { font-size: 4.3vw; }
  .quads { grid-template-columns: 1fr; }
  .quad { min-height: 0; }
  .quad:nth-child(3) { background: var(--tan); }
  .quad:nth-child(3) .aa { color: var(--blue); }
  .quad:nth-child(4) { background: var(--blue); }
  .quad:nth-child(4) .aa { color: var(--white); }
  .lines { grid-template-columns: 1fr; row-gap: 0; }
  .lines .lab { margin-top: 12px; }
  .forms { grid-template-columns: 1fr; }
  .spread { font-size: 6vw; }
  .sample { font-size: 44px; }
}
/* phones: name and GitHub on the first row, the menu on the second */
@media (max-width: 600px) {
  :root { --head: 98px; }
  .bar { flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; }
  .mark { font-size: 23px; }
  .menu { order: 3; width: 100%; justify-content: space-between; gap: 8px; }
  .menu a { font-size: 17px; padding: 4px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
  .g .c { font-size: 32px; }
}
