:root {
  --ink: #000;
  --paper: #fff;
  --pad: clamp(20px, 6vw, 100px);
  --section-pad: clamp(56px, 9vw, 140px);
  --floating-action-height: clamp(54px, 5.2vw, 76px);
  --floating-action-bottom: max(16px, env(safe-area-inset-bottom));
  font: 16px/1.5 "Filson Pro", Arial, sans-serif;
  color-scheme: dark;
  color: var(--paper);
  background: var(--ink);
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.wrap { padding-inline: var(--pad); margin-inline: auto; max-width: 1740px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 26px;
  min-height: 74px;
  padding: 12px var(--pad);
  border-bottom: 1px solid #fff3;
}

.brand { font-size: 1.65rem; font-weight: 900; letter-spacing: -.015em; }
.masthead nav { font-size: .79rem; display: flex; flex-wrap: wrap; gap: 5px clamp(14px, 3vw, 42px); }
.masthead a { text-decoration: none; }
.masthead a:hover { text-decoration: underline; }

.hero { padding: 0 var(--pad) clamp(38px, 5vw, 76px); overflow: clip; }
.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: clamp(310px, 35vw, 490px);
}

.pepper {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(57%, 690px);
  height: auto;
  transform: translate(-50%, -50%) rotate(-15deg);
  filter: grayscale(1) brightness(.66) sepia(1) saturate(var(--pepper-saturation, 0)) hue-rotate(-48deg);
  pointer-events: none;
}

.hero-type { width: 100%; text-align: center; padding-block: 36px 27px; }

.hero h1 {
  font: 100 clamp(3.9rem, 16.3vw, 17.5rem)/1.01 "Filson Variable", "Filson Pro", sans-serif;
  font-variation-settings: "wght" var(--hero-weight, 100);
  letter-spacing: -.015em;
  white-space: nowrap;
}

.hero-type p, .glyph-plate h2 { font-size: clamp(1.05rem, 2.8vw, 2.4rem); line-height: 1.13; margin-top: .45em; letter-spacing: normal; }
.heat { position: relative; max-width: 760px; margin-inline: auto; text-align: center; }
.heat-reading { display: flex; justify-content: space-between; gap: 12px; text-align: left; font-size: .875rem; }
.heat-reading output { white-space: nowrap; font-variant-numeric: tabular-nums; }

input[type="range"] {
  display: block;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
}

input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: currentColor; }
input[type="range"]::-moz-range-track { height: 1px; background: currentColor; }
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -7px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
}
input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: currentColor; }

.weights { display: grid; justify-items: center; gap: clamp(11px, 1.1vw, 18px); padding-top: 13px; }
.weight-row { display: flex; justify-content: center; gap: clamp(8px, 1.8vw, 24px); }
.weights button, .pill { border: 1px solid currentColor; border-radius: 100px; background: transparent; }
.weights button {
  min-height: 44px;
  padding: .14em clamp(10px, 2.7vw, 32px) .18em;
  font-family: "Filson Variable", "Filson Pro", sans-serif;
  font-size: clamp(1.03rem, 3.5vw, 2.75rem);
  font-variation-settings: "wght" var(--weight);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.weights button[aria-pressed="true"], .weights button:hover, .pill:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 9px 18px; text-decoration: none; font-weight: 500; }
.heat-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 48px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: #ed3808;
  font-size: clamp(1.05rem, 1.65vw, 1.4rem);
  font-weight: 700;
}
.heat-play:not(:disabled):hover #play-label { text-decoration: underline; text-underline-offset: .22em; }
.play-icon { width: 0; height: 0; border-block: 5px solid transparent; border-left: 7px solid currentColor; }
.heat-play[aria-pressed="true"] .play-icon { width: 8px; height: 10px; border: 0; border-inline: 2px solid currentColor; }

/* The columns share a height. Each row follows its image proportions. */
.gallery {
  --gallery-gap: 5px;
  display: grid;
  grid-template-columns: 1fr .682fr .793fr;
  gap: var(--gallery-gap);
  padding: var(--gallery-gap);
  aspect-ratio: 1.18;
}

.gallery-column { display: grid; gap: var(--gallery-gap); min-width: 0; min-height: 0; }
.gallery-column:nth-child(1) { grid-template-rows: 1.5fr .596fr; }
.gallery-column:nth-child(2) { grid-template-rows: 1.322fr 1fr .75fr; }
.gallery-column:nth-child(3) { grid-template-rows: .575fr 1.569fr .5fr; }
.gallery figure { position: relative; min-height: 0; overflow: hidden; }
.gallery img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

.paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.tester, .voices, .about { padding-block: var(--section-pad); }
h2 {
  width: 80vw;
  max-width: 100%;
  margin: 0 auto clamp(35px, 5vw, 72px);
  font-size: clamp(2.2rem, 12.5vw, 13.5rem);
  font-weight: 700;
  line-height: .97;
  letter-spacing: -.02em;
  text-align: center;
}
.controls { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: clamp(12px, 3vw, 44px); align-items: end; padding-block: 8px; }
.controls label { display: grid; grid-template-columns: 1fr auto; gap: 5px; font-size: .9rem; min-width: 0; }
.controls output { font-variant-numeric: tabular-nums; white-space: nowrap; }
.controls input { grid-column: 1 / -1; }
.face-control select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #0006; border-radius: 4px; background: var(--paper); }
.type-area {
  min-height: 1.6em;
  padding: .23em 0 .30em;
  margin: 14px 0 8px;
  border-block: 1px solid #0005;
  font: 700 clamp(38px, 7vw, 96px)/1.08 "Filson Pro", Arial, sans-serif;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.style-list summary { width: fit-content; min-height: 44px; padding: 9px 0; cursor: pointer; }
.families { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px clamp(20px, 5vw, 76px); padding-top: 12px; }
.family h3 { font-weight: 700; font-size: clamp(1.3rem, 2.5vw, 2rem); margin-bottom: 8px; }
.style-row { display: grid; grid-template-columns: minmax(84px, .7fr) minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; min-height: 45px; text-align: start; border: 0; border-top: 1px solid #0004; padding: 4px 8px; background: none; }
.style-row:last-child { border-bottom: 1px solid #0004; }
.style-row:hover, .style-row[aria-pressed="true"] { background: #0000000c; }
.style-row .row-name { font-size: .9rem; }
.style-row .row-sample { justify-self: end; font-size: clamp(1.05rem, 2.8vw, 2.35rem); line-height: 1.15; white-space: nowrap; overflow: hidden; max-width: 100%; }
.arabic-styles { grid-column: 1 / -1; }
.arabic-styles .style-row { max-width: 100%; }

/* Equal row heights keep both style lists aligned, including the missing italic. */
.families { --style-row-height: clamp(45px, 3.65vw, 58px); }
.style-row { height: var(--style-row-height); }
.unavailable-style { color: #595959; font-size: .9rem; }
.unavailable-style span { justify-self: end; }
.unavailable-style:hover { background: none; }

.voices h2 { margin-bottom: clamp(24px, 4vw, 48px); }
.section-intro { max-width: 62ch; margin-inline: auto; text-align: center; }
.voices .section-intro { color: #fffc; }
.voice-sheet {
  display: grid;
  gap: clamp(16px, 2.4vw, 34px);
  width: 80%;
  margin: clamp(30px, 5vw, 70px) auto 0;
}
.voice-line {
  display: block;
  width: 100%;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: clamp(15px, 2.4vw, 38px) clamp(13px, 4vw, 64px);
  background: #000;
  color: #fff;
  text-align: center;
}
.voice-line[data-family="soft"] { color: #ed3808; }
.voice-meta { display: block; font-size: .875rem; margin-top: 7px; color: #fffc; }
.voice-phrase {
  display: block;
  font: 400 clamp(1.35rem, 7.25vw, 9.15rem)/1.14 "Filson Pro", Arial, sans-serif;
  letter-spacing: -.012em;
  overflow-wrap: anywhere;
}
.voice-line[data-family="soft"] .voice-phrase { font-family: "Filson Soft", Arial, sans-serif; }
.voice-line:hover { background: #101010; }
.voice-line:focus-visible { outline-offset: 4px; }

.image-break { width: 100%; }
.image-break img {
  display: block;
  width: 100%;
  height: auto;
}

.campaign, .opentype { padding-block: var(--section-pad); }
.campaign { border-top: 1px solid #fff4; }
.section-heading-with-pepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-items: center;
}
.section-heading-with-pepper h2 { grid-area: 1 / 2; width: auto; margin: 0; }
.heading-pepper {
  display: block;
  width: min(80%, clamp(24px, 8vw, 110px));
  height: auto;
  filter: grayscale(1);
}
.heading-pepper-left { grid-area: 1 / 1; transform: rotate(26deg) scaleX(-1); }
.heading-pepper-right { grid-area: 1 / 3; transform: rotate(-24deg); }
.campaign .section-heading-with-pepper { margin-bottom: 22px; }
.campaign .section-intro { color: #fffc; }
.contributions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(28px, 4vw, 56px) clamp(12px, 1.8vw, 28px);
  margin: clamp(30px, 6vw, 75px) auto 0;
  padding-inline: var(--pad);
  max-width: 1740px;
}
.contribution-media { width: 100%; aspect-ratio: 1380 / 1920; }
img.contribution-media { display: block; height: auto; }
.contribution figcaption { padding-top: clamp(14px, 2vw, 24px); }
.contribution h3 { font-size: clamp(1.3rem, 2.25vw, 2.15rem); line-height: 1.12; }
.contribution-expression {
  display: block;
  margin-bottom: .5em;
  color: #fffc;
  font-size: .875rem;
  font-weight: 400;
}
.contribution p { font-size: .94rem; margin-top: 9px; }
.contribution .contribution-country { margin-top: 4px; font-size: .875rem; font-weight: 700; }
.contribution figcaption p:last-child { color: #fffc; }
.contribution-placeholder {
  display: grid;
  align-content: center;
  place-items: center;
  gap: .75rem;
  padding: 12px;
  border: 1px solid #fff4;
  color: #fffb;
  text-align: center;
  font-size: .875rem;
}
.placeholder-language {
  color: var(--paper);
  font-size: clamp(1.35rem, 3.2vw, 3.65rem);
  font-weight: 700;
  line-height: 1.12;
}
.contribution-invite {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 22px);
  padding: clamp(14px, 3vw, 46px);
  background: #ed3808;
  color: var(--ink);
}
.contribution-invite h3 { font-size: clamp(1.25rem, 3.2vw, 3.65rem); }
.contribution-invite { text-align: center; }
.contribution-invite p { margin: 0; max-width: 28ch; }
@media (max-width: 820px) {
  .contributions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .contributions { grid-template-columns: 1fr; }
  .contribution-invite { padding-inline: 8%; }
}

.opentype {
  padding-bottom: max(var(--section-pad), clamp(92px, 13vw, 195px));
  background: #ed3808;
  color: var(--ink);
}
.opentype .section-heading-with-pepper { margin-bottom: clamp(34px, 6vw, 90px); }
.feature-board { --grid-rule: #0005; }
.feature-card {
  display: grid;
  grid-template-rows: auto 1fr;
}
.feature-card h3 {
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: clamp(12px, 2vw, 26px);
}
.feature-examples {
  display: grid;
  align-content: center;
  gap: .13em;
  font-size: clamp(1.2rem, 3.45vw, 4.3rem);
  font-weight: 400;
  line-height: 1.16;
}
.feature-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  gap: .2em;
}
.feature-glyph { white-space: pre-wrap; overflow-wrap: anywhere; font-variant-ligatures: none; }
.feature-pair .feature-glyph { text-align: start; }
.feature-pair .feature-off { text-align: end; color: #4a2118; }
.feature-arrow { color: #4a2118; font-size: .7em; }
.feature-specimen { white-space: pre-line; text-align: center; }

.about p { max-width: 59ch; margin-inline: auto; font-size: clamp(1.05rem, 2vw, 1.45rem); }
.about p + p { margin-top: .85em; }
.about .signature { font-weight: 700; margin-block: 1.45em 1.3em; }
.specimen-cta { display: flex; width: fit-content; margin-inline: auto; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.specimen-cta:hover { color: var(--paper); background: var(--ink); }
.specimen-cta span { padding-left: 9px; border-left: 1px solid currentColor; font-size: .8em; }

@media (max-width: 850px) {
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .masthead { padding-block: 10px; gap: 5px 14px; }
  .masthead nav { font-size: .78rem; }
  .hero-stage { min-height: 248px; }
  .hero-type p { max-width: 25ch; margin-inline: auto; }
  .pepper { width: 78%; }
  .gallery { display: block; padding: 0; aspect-ratio: auto; }
  .gallery-column { display: contents; }
  .gallery figure { margin-bottom: var(--gallery-gap); }
  .gallery img { position: static; height: auto; }
  h2 { font-size: clamp(2.15rem, 12.5vw, 4.4rem); }
  .feature-examples { font-size: clamp(1.65rem, 7vw, 3rem); }
  .heat-reading { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}

.languages { padding-block: var(--section-pad); background: var(--ink); color: var(--paper); }
.languages h2 { margin-bottom: clamp(22px, 4vw, 52px); }
.language-showcase, .feature-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 80vw);
  margin: clamp(30px, 5vw, 72px) auto;
  border-bottom: 1px solid var(--grid-rule);
}
.language-showcase { --grid-rule: #fff4; }
.feature-board { margin-bottom: 0; }
.language-example, .feature-card {
  min-width: 0;
  padding: clamp(14px, 3vw, 40px);
  border-top: 1px solid var(--grid-rule);
}
.language-example:nth-child(even), .feature-card:nth-child(even) { border-left: 1px solid var(--grid-rule); }
.language-example {
  display: block;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  text-align: start;
}
.language-example:hover { background: #fff1; }
.language-example:focus-visible { outline-offset: -3px; }
.language-label { display: flex; justify-content: space-between; gap: .5em; font-size: .875rem; margin-bottom: .6em; }
.language-sample {
  display: block;
  font-size: clamp(1.75rem, 5.2vw, 6.25rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.15;
  white-space: nowrap;
}
.language-sample > span { display: inline-block; }
.language-arabic { grid-column: 1 / -1; }
.language-arabic .language-sample {
  font-family: "Filson Pro Arabic", sans-serif;
  letter-spacing: normal;
  line-height: 1.5;
}
.language-index { width: min(100%, 80vw); margin-inline: auto; }
.language-index summary { display: list-item; width: fit-content; margin-inline: auto; cursor: pointer; }
.language-names {
  columns: 4 120px;
  column-gap: 22px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  font-size: .925rem;
}
.language-names li { break-inside: avoid; padding-block: 4px; }

.credits { padding-bottom: calc(var(--floating-action-height) + var(--floating-action-bottom) + 22px); }
.credit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.credits h2 {
  width: auto;
  margin: 0 0 10px;
  font-size: clamp(1rem, 2.5vw, 1.75rem);
  letter-spacing: normal;
  text-align: start;
}
.credits ul { list-style: none; padding: 0; margin: 0; }
.credits li { color: #fffc; }

@media (max-width: 620px) {
  .language-showcase, .feature-board { grid-template-columns: 1fr; width: 100%; }
  .language-example:nth-child(even), .feature-card:nth-child(even) { border-left: 0; }
  .language-sample { font-size: clamp(2.15rem, 8vw, 3.8rem); }
  .language-index { width: 100%; }
  .hero h1 { font-size: clamp(3rem, 15.4vw, 6rem); }
}

.tester { padding-block: clamp(40px, 6vw, 90px); }
.tester h2 { font-size: clamp(2.65rem, 8.8vw, 8.4rem); margin-bottom: clamp(22px, 3vw, 42px); }
.face-control { display: grid; gap: 5px; max-width: 22rem; font-size: .9rem; }
.tester .wrap { width: 70%; max-width: none; padding-inline: 0; }
.tester .type-area { text-align: center; }

.glyph-plate { background: #000; overflow: clip; padding-block: clamp(32px, 4vw, 64px) clamp(36px, 5vw, 80px); }
.glyph-studies {
  padding-inline: 10%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 12px;
}
.glyph-study { min-width: 0; border-right: 1px solid #fff3; }
.glyph-study:last-child { border-right: 0; }
.glyph-study svg { display: block; width: 100%; height: auto; overflow: visible; }
.glyph-guides, .glyph-handles { fill: none; stroke: #777; stroke-width: 2; }
.glyph-bleed { display: none; }
.glyph-study:first-child .glyph-bleed-start,
.glyph-study:last-child .glyph-bleed-end { display: inline; }
.glyph-form { fill: #171717; stroke: #f5f5f5; stroke-width: 4; }
.glyph-metric { fill: #d7d7d7; stroke: #000; stroke-width: 5; paint-order: stroke; font: 30px monospace; }
.glyph-offcurve { fill: #000; stroke: #fff; stroke-width: 2.5; }
.glyph-oncurve { fill: #fff; }

.credits { --tape-overlap: clamp(72px, 12vw, 188px); position: relative; padding-top: 0; }
.credit-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(0, 3.8fr) minmax(10rem, 1fr);
  gap: clamp(14px, 2vw, 32px);
  align-items: start;
}
.credit-design, .credit-kerning { padding-top: clamp(42px, 8vw, 120px); }
.credit-contact { margin-top: 24px; }
.credit-contact p { margin-bottom: 10px; font-size: .9rem; color: #fffc; }
.footer-tape { width: 100%; margin-top: calc(-1 * var(--tape-overlap)); pointer-events: none; }
.footer-tape svg { display: block; width: 100%; height: auto; }

@media (max-width: 800px) {
  .glyph-studies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glyph-study:nth-child(even) { border-right: 0; }
  .glyph-study:nth-child(odd) .glyph-bleed-start,
  .glyph-study:nth-child(even) .glyph-bleed-end { display: inline; }
  .credit-grid { grid-template-columns: 1fr 1fr; }
  .footer-tape { grid-column: 1 / -1; grid-row: 1; width: min(92%, 560px); justify-self: center; }
  .credit-design, .credit-kerning { padding-top: 0; }
}

.floating-actions {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: var(--floating-action-bottom);
  display: flex;
  gap: clamp(8px, 1vw, 14px);
}
.floating-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--floating-action-height);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
}
.buy-sticker {
  min-width: clamp(85px, 9.5vw, 142px);
  padding: 10px 24px;
  background: #ed3808;
  font-size: clamp(1.05rem, 1.65vw, 1.6rem);
  font-weight: 900;
  letter-spacing: .06em;
}
.buy-sticker:hover { background: var(--paper); }
.specimen-sticker {
  gap: .55em;
  padding: 10px clamp(13px, 2vw, 26px);
  background: var(--paper);
  font-size: clamp(.85rem, 1.2vw, 1.125rem);
  font-weight: 700;
}
.specimen-sticker:hover { background: #eaeaea; }
.floating-actions a:focus-visible { outline-color: var(--ink); box-shadow: 0 0 0 5px var(--paper); }

@media (max-width: 620px) {
  .tester .wrap { width: 90%; }
  .families { grid-template-columns: 1fr; }
  .masthead nav { font-size: .72rem; }
}
