/* ==========================================================================
   Font FM — Legi Rounded website
   Rebuilt 1:1 from Figma "Fernando website" (artboards 1920 / 1440 / 768 / 320)

   Layout model
   ------------
   Vertical metrics are identical on the 1920 and 1440 artboards, so every
   `top` on desktop is the literal pixel value from the design.  Horizontal
   metrics differ between the two artboards, so every `left`/`width` is a
   linear interpolation written as `calc(P% ± Xpx)` which resolves to the
   exact design value at BOTH 1440 and 1920 and scales smoothly between.

   The two structural gutters of the design:
     divider 1   676px @1920 / 516px @1440  ->  calc(33.3333% + 36px)
     divider 2  1284px @1920 / 964px @1440  ->  calc(66.6667% +  4px)

   The webfont's metrics (asc 1000 / desc 250 / upm 1000) mean `normal`
   line-height == 1.25em, matching Figma's "Auto" leading exactly, so
   Figma `top` + `line-height` reproduce glyph positions to the pixel.
   ========================================================================== */

:root {
  --red: #ff0000;
  --bg: #f8f8f8;
  --white: #fff;

  --d1: calc(33.33333% + 36px);
  --d2: calc(66.66667% + 3.67px);

  --font: 'Font 211 Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rule: 1px solid var(--red);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--red);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   Shared atoms
   -------------------------------------------------------------------------- */

/* 36px tall pill — nav item, tab, button */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, opacity .15s ease;
}

.pill--solid  { background: var(--red);   color: var(--white); }
.pill--light  { background: var(--white); color: var(--red); }
.pill--outline{ box-shadow: inset 0 0 0 1px var(--white); color: var(--white); }

a.pill:hover                       { background: rgba(255, 0, 0, .08); }
a.pill--solid:hover                { background: var(--red); opacity: .85; }
a.pill--light:hover                { background: var(--white); opacity: .85; }
a.pill--outline:hover              { background: rgba(255, 255, 255, .16); }

.rule  { position: absolute; height: 0; border-top: var(--rule); }
.vrule { position: absolute; width: 0;  border-left: var(--rule); }

/* --------------------------------------------------------------------------
   Weight dropdown
   -------------------------------------------------------------------------- */

.sel { position: relative; display: inline-block; }

.sel__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  color: inherit;
}

.sel__btn:hover      { background: rgba(255, 0, 0, .07); }
.sel.is-open .sel__btn { background: rgba(255, 0, 0, .07); }

.sel__chev { width: 8.2px; height: 4.2px; flex: none; transition: transform .18s ease; }
.sel.is-open .sel__chev { transform: rotate(180deg); }

.sel__menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  min-width: 156px;
  padding: 6px 0;
  background: var(--white);
  border: var(--rule);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .10);
  display: none;
}

.sel.is-open .sel__menu { display: block; }
.sel--right .sel__menu  { left: auto; right: 0; }
.sel--up .sel__menu     { top: auto; bottom: calc(100% + 4px); }

.sel__opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--red);
  white-space: nowrap;
}

.sel__opt:hover, .sel__opt:focus-visible { background: rgba(255, 0, 0, .09); }
.sel__opt[aria-selected='true']          { background: var(--red); color: var(--white); }

.w100{font-weight:100}.w200{font-weight:200}.w300{font-weight:300}.w400{font-weight:400}
.w500{font-weight:500}.w700{font-weight:700}.w800{font-weight:800}.w900{font-weight:900}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.hdr {
  position: relative;
  height: 120px;
  border-bottom: var(--rule);
  z-index: 50;
}

.hdr__logo { position: absolute; left: 68px; top: 32px; width: 56px; height: 56px; }
.hdr__logo img { width: 100%; height: 100%; }

.hdr__nav { position: absolute; display: flex; align-items: center; gap: 112px; }
.hdr__nav--a {                                     /*  963px @1920 /  682.67px @1440 */
  left: calc(58.402% - 158.32px);
  top: calc(1.0417vw + 28px);                      /*   48px @1920 /   43px    @1440 */
}
.hdr__nav--b {                                     /* 1380px @1920 / 1020px    @1440 */
  left: calc(75% - 60px);
  top: calc(0.625vw + 34px);                       /*   46px @1920 /   43px    @1440 */
}

.hdr__vrule { position: absolute; top: 0; left: var(--d2); width: 0; height: 120px; border-left: var(--rule); }

.hdr__tool { position: absolute; display: none; align-items: center; justify-content: center; }
.hdr__tool img { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   Family tab bar (home / specimen)
   -------------------------------------------------------------------------- */

.famnav { position: relative; height: 120px; z-index: 40; }

.famnav__track {
  position: absolute;
  left: 42.67px;
  top: 34px;                                  /* page y 154 */
  width: calc(var(--d2) - 42.67px);
  height: 52px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.famnav__track::-webkit-scrollbar { display: none; }
.famnav .pill { flex: none; }

/* --------------------------------------------------------------------------
   Sub navigation (interior pages)
   -------------------------------------------------------------------------- */

.subnav { position: relative; height: 120px; z-index: 40; }

.subnav__track {
  position: absolute;
  top: 34px;                                  /* page y 154 */
  left: calc(50% - 5px);                      /* 955px @1920 / 715px @1440 */
  width: 620px;
  height: 52px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav__track::-webkit-scrollbar { display: none; }
.subnav .pill { flex: none; }

/* ==========================================================================
   HOME
   ========================================================================== */

.home { position: relative; }

.home__rule-top { position: absolute; top: 0; left: 0; width: var(--d2); height: 0; border-top: var(--rule); }

.home__cols { position: relative; height: 2024px; }   /* page y 240 -> 2264 */

.home__vrule-1 { position: absolute; top: 0;      left: var(--d1); width: 0; height: 100%;  border-left: var(--rule); }
.home__vrule-2 { position: absolute; top: -240px; left: var(--d2); width: 0; height: 2264px; border-left: var(--rule); }

/* ---- left column: four display letters ---------------------------------- */

.home__left {
  position: absolute;
  top: 0;
  left: 28px;                                 /* optical axis of the design */
  width: calc(var(--d1) - 28px);
  height: 100%;
}

.home__left .rule { left: -28px; width: calc(100% + 28px); }

.glyph {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-size: 400px;
  line-height: 500px;
  user-select: none;
  white-space: nowrap;
}

.glyph--g { top: -70px;   line-height: 500px; }   /* page y 170, auto leading */
.glyph--m { top: 541px;   line-height: 200px; }   /* page y 781 */
.glyph--a { top: 981px;   line-height: 200px; }   /* page y 1221 */
.glyph--s { top: 1556px;  line-height: 200px; }   /* page y 1796 */

.lsel {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  /* the design shifts the pills off the glyph axis as the viewport narrows:
     centre 352px @1920 / 285.75px @1440 */
  padding-left: max(0px, calc(110px - 5.729vw));
}

.lsel--g { top: 360px; }    /* page y 600  */
.lsel--m { top: 821px; }    /* page y 1061 */
.lsel--a { top: 1272px; }   /* page y 1512 */
.lsel--s { top: 1839px; }   /* page y 2079 */

.home__left .rule--1 { top: 480px; }    /* page y 720  */
.home__left .rule--2 { top: 960px; }    /* page y 1200 */
.home__left .rule--3 { top: 1440px; }   /* page y 1680 */
.home__left .rule--4 { top: 1990px; }   /* page y 2230 */

/* ---- middle column ------------------------------------------------------ */

/* The middle column runs in reverse, so it is boxed into the columns area —
   nothing may cross the rule at page y 240 or spill out under the promo band.
   The box carries 20px of slack on each side so the dropdown pills, which hang
   16px to the left of the text edge, are never sliced by the clip. */
.home__midclip {
  position: absolute;
  top: 0;
  left: calc(42.083% - 41.33px);               /* column left − 20px */
  width: calc(16.25% + 145px);                 /* column width + 40px */
  height: 100%;
  overflow: hidden;
  contain: paint;
}

.home__mid {
  position: absolute;
  top: 120px;                                 /* page y 360 */
  left: 20px;
  right: 20px;
  width: auto;
  will-change: transform;
}

.home__mid > .sel { margin-left: -16px; }

.perex { font-size: 28px; line-height: 35px; }
.perex--xl { font-weight: 200; }
.perex--md { font-weight: 500; }

.home__mid .sel + .perex  { margin-top: 20px; }
/* the 1440 artboard opens this one gap up to 57px — interpolated so both match */
.home__mid .sel + .perex--md { margin-top: clamp(20px, calc(168px - 7.71vw), 72px); }
.home__mid .perex + .sel  { margin-top: 120px; }
.home__mid .perex + .sbox { margin-top: 120px; }

/* bordered "s" specimen box */
.sbox { position: relative; height: 473px; border: var(--rule); overflow: hidden; }

.sbox__txt   { position: absolute; top: 6px; left: 8.6px; right: 8.6px; font-size: 14px; line-height: 20px; }
.sbox__glyph { position: absolute; top: 100px; left: 0; right: 0; text-align: center; font-size: 200px; line-height: 250px; font-weight: 300; }
.sbox__arrow { position: absolute; top: 193.93px; left: 37.87%; width: 37.58px; height: 43.43px; transform: translate(-50%, -50%) rotate(-106.05deg) skewX(-2.04deg); }

/* ---- right column ------------------------------------------------------- */

.home__right {
  position: absolute;
  top: 0;                                      /* page y 240 */
  left: calc(74.792% - 40px);                  /* 1396px @1920 / 1037px @1440 */
  width: calc(22.431% - 15px);                 /*  416px @1920 /  308px @1440 */
  will-change: transform;
}

.home__right > .sel { margin-left: -16px; }

.shot { width: 100%; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }

.shot--captain { height: 453px; }
.shot--captain img { object-position: 50% 44.6%; }
.shot--studio  { height: 335px; }

.cap { font-size: 14px; line-height: 20px; }

.home__right .shot + .sel { margin-top: 40px; }
.home__right .sel + .cap  { margin-top: 20px; }
.home__right .cap + .shot { margin-top: 120px; }

/* --------------------------------------------------------------------------
   Promo band
   -------------------------------------------------------------------------- */

.band { position: relative; height: 420px; background: var(--red); color: var(--white); }

.band__title {
  position: absolute;
  top: 136px;
  left: 10.75%;                                /* 206.4px @1920 / 154.8px @1440 */
  font-size: 50px;
  line-height: 62.5px;
  font-weight: 500;
  white-space: nowrap;
}

.band__actions { position: absolute; top: 317px; right: 82px; display: flex; align-items: center; gap: 48px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.ftr { position: relative; height: 119px; }
.ftr--ruled { border-top: var(--rule); }

.ftr__row { position: absolute; top: 23px; left: 0; right: 0; height: 72px; }

.ftr__logo { position: absolute; left: 44px; top: 8px; width: 56px; height: 56px; }
.ftr__logo img { width: 100%; height: 100%; }

.ftr__copy {
  position: absolute;
  top: 22px;
  left: calc(48.542% - 191px);        /* 741px @1920 / 508px @1440 */
  font-size: 14px;
  line-height: 17.5px;
  white-space: nowrap;
}

.ftr__social {
  position: absolute;
  top: 22px;
  right: clamp(44px, calc(27.708% - 283px), 400px);   /* 249px @1920 / 116px @1440 */
  display: flex;
  align-items: center;
  gap: 24px;
}

.ftr__social a, .ftr__social img { width: 24px; height: 24px; }

/* ==========================================================================
   INTERIOR PAGES
   ========================================================================== */

.doc { position: relative; }

.doc__rule-top { position: absolute; top: 0; left: var(--d1); right: 0; height: 0; border-top: var(--rule); }

.doc__vrule {
  position: absolute;
  top: -120px;                                 /* from page y 120 */
  left: var(--d1);
  width: 0;
  height: calc(100% + 120px);
  border-left: var(--rule);
}

.doc__body {
  position: relative;
  margin-left: calc(73.229% - 426px);          /* 980px @1920 / 628.5px @1440 */
  width: 656px;
  padding: 120px 0 160px;                      /* first block at page y 360 */
}

.doc--about .doc { min-height: 1536px; }
.doc--about .doc__body { padding-bottom: 0; }

.doc h2 { font-size: 14px; line-height: 20px; font-weight: 400; margin-top: 60px; }
.doc h2:first-child { margin-top: 0; }
.doc p  { font-size: 14px; line-height: 20px; }
.doc h2 + p { margin-top: 16px; }
.doc p + p  { margin-top: 20px; }

.doc__figure {
  position: absolute;
  top: 540px;                                  /* page y 780 */
  left: calc(18.333% + 20px);                  /* 372px @1920 / 284px @1440 */
  width: calc(47.5% - 28px);                   /* 884px @1920 / 656px @1440 */
  aspect-ratio: 884 / 717;
  overflow: hidden;
}

.doc__figure img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.doc__map { margin-top: 40px; width: 744px; aspect-ratio: 744 / 580; overflow: hidden; }
.doc__map img { width: 100%; height: 100%; object-fit: cover; }

.doc__address { white-space: pre-line; }

/* the artboard leaves a heading-sized gap before this paragraph */
.doc p.doc__spaced { margin-top: 96px; }

/* Contact opens straight on the address, 60px under the rule */
.doc--contact .doc__body { padding-top: 60px; padding-bottom: 137px; }

/* --------------------------------------------------------------------------
   Drawer (tablet + phone navigation)
   -------------------------------------------------------------------------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  padding: 24px;
  display: none;
  overflow-y: auto;
}

.drawer.is-open { display: block; }

.drawer__close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.drawer__group { margin-top: 28px; }
.drawer__group h3 { font-size: 12px; line-height: 16px; font-weight: 500; opacity: .55; margin-bottom: 6px; }
.drawer a { display: block; font-size: 20px; line-height: 38px; }
.drawer a.is-active { font-weight: 500; }

/* ==========================================================================
   TABLET  768 – 1279   (Figma artboard "768")
   ========================================================================== */

@media (max-width: 1279px) {

  :root { --d1: calc(50% + 15px); }           /* 399px @768 */

  /* header */
  .hdr__logo { left: 48px; top: 32px; width: 50px; height: 50px; }
  .hdr__nav, .hdr__vrule { display: none; }

  .hdr__tool { display: flex; }
  .hdr__tool--search { right: 132px; top: 44px; width: 40px; height: 40px; }
  .hdr__tool--menu   { right: 44px;  top: 44px; width: 40px; height: 40px; }
  .hdr__tool--search img { width: 32px; height: 32px; }

  /* family tabs */
  .famnav__track { left: 23px; width: calc(100% - 23px); justify-content: flex-start; gap: 36px; }

  /* sub navigation */
  .subnav__track {
    left: 50%;
    transform: translateX(-50%);
    width: 462px;
    max-width: calc(100% - 46px);
  }

  /* home */
  .home__rule-top { width: 100%; }
  .home__cols { height: auto; min-height: 1920px; }
  .home__vrule-2 { display: none; }

  .home__left { left: 17px; width: calc(var(--d1) - 17px); }
  .home__left .rule { left: -17px; width: calc(100% + 17px); }

  .glyph { font-size: 300px; line-height: 360px; }

  .glyph--g { top: 10px;   }   /* page y 250  */
  .glyph--m { top: 491px;  }   /* page y 731  */
  .glyph--a { top: 944px;  }   /* page y 1184 */
  .glyph--s { top: 1450px; }   /* page y 1690 */

  .lsel { padding-left: 42px; }               /* design centres the pills at 229px */
  .lsel--g { top: 344px;  }   /* page y 584  */
  .lsel--m { top: 824px;  }   /* page y 1064 */
  .lsel--a { top: 1304px; }   /* page y 1544 */
  .lsel--s { top: 1784px; }   /* page y 2024 */

  .home__left .rule--4 { top: 1920px; }       /* page y 2160 */

  /* middle + right stack into one flowing column */
  .home__midclip { display: contents; }

  .home__mid { will-change: auto; }
  .home__right { will-change: auto; }

  .home__mid,
  .home__right {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-left: calc(50% + 99px);            /* 483px @768 */
    width: calc(50% - 148px);                 /* 236px @768 */
  }

  .home__mid { padding-top: 120px; }          /* page y 360 */
  .home__right { margin-top: 0; }             /* design butts image 1 against the s-box */

  .perex { font-size: 20px; line-height: 24px; }
  .home__mid .sel + .perex--md { margin-top: 20px; }
  .home__mid .perex + .sbox { margin-top: 240px; }

  .sbox { height: 432px; }
  .sbox__txt   { top: 4.6px; left: 5px; right: 5px; }
  .sbox__glyph { top: 90.6px; }
  .sbox__arrow { top: 187.07px; left: 32%; width: 34.15px; height: 33.57px; transform: translate(-50%, -50%) rotate(-103.45deg) skewX(3.27deg); }

  .home__right .shot + .sel { margin-top: 120px; }
  .home__right .cap + .shot { margin-top: 120px; }
  .shot--captain img { object-position: 100% 50%; }

  /* footer */
  .ftr__logo { left: 24px; }
  .ftr__copy { left: 246px; }
  .ftr__social { right: 33px; }

  /* interior pages */
  .doc__rule-top { left: 0; }
  .doc__vrule { display: none; }

  .doc__body {
    margin-left: auto;
    margin-right: auto;
    width: min(656px, calc(100% - 330px));
  }

  .doc--about .doc { min-height: 1436px; }

  .doc__figure {
    position: relative;
    top: auto;
    left: auto;
    width: min(656px, calc(100% - 330px));
    margin: 120px auto 0;
    aspect-ratio: 436 / 532;
  }

  .doc__map { width: 100%; }
}

/* ==========================================================================
   PHONE  < 768   (Figma artboard "320")
   ========================================================================== */

@media (max-width: 767px) {

  body { background: var(--white); }

  /* header */
  .hdr { height: 60px; }
  .hdr__logo { left: 16px; top: 14px; width: 32px; height: 32px; }
  .hdr__tool--search { right: 62px; top: 18px; width: 24px; height: 24px; }
  .hdr__tool--menu   { right: 14px; top: 18px; width: 24px; height: 24px; }
  .hdr__tool--search img { width: 22px; height: 22px; }

  /* family tabs */
  .famnav { height: 60px; border-bottom: var(--rule); }
  .famnav__track { left: 0; top: 4px; width: 100%; gap: 16px; padding: 8px; }
  .famnav .pill { padding: 8px; }

  .subnav { display: none; }

  /* home */
  .home { padding: 0 16px; }
  .home__rule-top, .home__vrule-1, .home__vrule-2 { display: none; }
  .home__left .rule { display: none; }

  .home__cols { height: auto; min-height: 0; }

  .home__left {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% + 32px);
    margin: 0 -16px;
    height: 1455px;                            /* page y 120 -> 1575 */
  }

  .glyph { font-size: 300px; line-height: 360px; }

  .glyph--g { top: -44px;  }   /* page y 76   */
  .glyph--m { top: 298px;  }   /* page y 418  */
  .glyph--a { top: 611px;  }   /* page y 731  */
  .glyph--s { top: 975px;  }   /* page y 1095 */

  .lsel { padding-left: 0; }
  .lsel--g { top: 286px;  }   /* page y 406  */
  .lsel--m { top: 626px;  }   /* page y 746  */
  .lsel--a { top: 929px;  }   /* page y 1049 */
  .lsel--s { top: 1299px; }   /* page y 1419 */

  .home__mid,
  .home__right { margin-left: 0; width: 100%; }

  .home__mid { padding-top: 0; }

  .home__mid > .sel,
  .home__right > .sel { margin-left: 0; display: flex; justify-content: center; }

  .perex { font-size: 20px; line-height: 25px; }
  .perex--md { line-height: 24px; }

  .home__mid .perex + .sel  { margin-top: 100px; }
  .home__mid .perex + .sbox { margin-top: 100px; }

  .sbox { height: 432px; }
  .sbox__txt   { top: 4.6px; left: 6px; right: 6px; }
  .sbox__glyph { top: 90.6px; }
  .sbox__arrow { top: 180.24px; left: 34.9%; width: 34.65px; height: 40.26px; transform: translate(-50%, -50%) rotate(-106.25deg) skewX(-2.41deg); }

  .home__right { margin-top: 100px; }

  .shot--captain img { object-position: 100% 50%; }

  .home__right .shot + .sel { margin-top: 100px; }
  .home__right .cap + .shot { margin-top: 100px; }

  /* band */
  .band {
    height: auto;
    min-height: 129px;
    margin: 28px 0 0;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 41px;
  }

  .band__title  { position: static; font-size: 14px; line-height: 20px; font-weight: 400; }
  .band__actions{ position: static; justify-content: space-between; gap: 16px; }
  .band__actions .pill--home { display: none; }

  /* footer — logo, social, copyright (mobile order) */
  .ftr { height: auto; margin: 0; padding: 24px; border-top: 0; }
  .ftr__row { position: static; height: auto; display: flex; flex-direction: column; gap: 12px; }
  .ftr__logo { position: static; order: 0; }
  .ftr__social { position: static; order: 1; }
  .ftr__copy { position: static; order: 2; left: auto; text-align: left; white-space: normal; }

  /* interior pages */
  .doc__rule-top, .doc__vrule { display: none; }
  .doc--about .doc { min-height: 1088px; }

  .doc__body { margin: 0; width: 100%; padding: 60px 16px 48px; }
  .doc--contact .doc__body { padding-top: 60px; padding-bottom: 48px; }
  .doc__figure { width: calc(100% - 32px); margin: 60px 16px 0; aspect-ratio: 289 / 270; }
  .doc__map { aspect-ratio: 4 / 3; }
}

/* Above 1920 the calc() interpolations simply keep going — every term is a
   percentage of the page, so the columns stay in proportion to their dividers.
   There is deliberately no cap here: pinning a column to a fixed pixel while
   its divider keeps moving would tear the grid apart. */

/* ==========================================================================
   SPECIMEN + PLAYGROUND
   Same grid, rules and pills as the rest of the site; the left rail carries
   the section label, the right rail the specimen itself.
   ========================================================================== */

.spec { position: relative; }

.spec__vrule {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--d1);
  width: 0;
  border-left: var(--rule);
}

.spec__row {
  position: relative;
  border-top: var(--rule);
  padding: 56px 0 72px;
}

.spec__row:first-child { border-top: 0; }

.spec__label {
  position: absolute;
  left: 68px;
  top: 56px;
  width: calc(var(--d1) - 148px);
}

.spec__label h2 { font-size: 14px; line-height: 20px; font-weight: 500; }
.spec__label p  { margin-top: 12px; font-size: 14px; line-height: 20px; opacity: .72; }

.spec__body {
  margin-left: calc(42.083% - 21.33px);   /* same axis as the home middle column */
  margin-right: 80px;
}

.spec__hero {
  padding: 72px 0 64px;
  border-top: 0;
}

.spec__hero h1 {
  margin-left: calc(42.083% - 21.33px);
  margin-right: 80px;
  font-size: 96px;
  line-height: 110px;
  font-weight: 500;
}

.spec__hero p {
  margin-left: calc(42.083% - 21.33px);
  margin-right: 80px;
  margin-top: 20px;
  max-width: 640px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 200;
}

/* ---- playground --------------------------------------------------------- */

.pg__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-bottom: 28px;
}

.pg__group { display: flex; align-items: center; gap: 10px; }

.pg__group > label {
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.pg__out { min-width: 48px; font-size: 14px; line-height: 20px; opacity: .72; }

.pg__range {
  -webkit-appearance: none;
  appearance: none;
  width: 132px;
  height: 20px;
  background: none;
  cursor: pointer;
}

.pg__range::-webkit-slider-runnable-track { height: 1px; background: var(--red); }
.pg__range::-moz-range-track             { height: 1px; background: var(--red); }

.pg__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: var(--red);
}

.pg__range::-moz-range-thumb {
  width: 14px; height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--red);
}

.pg__toggle {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 20px;
  box-shadow: inset 0 0 0 1px var(--red);
}

.pg__toggle.is-on { background: var(--red); color: var(--white); }

.pg__sample {
  border: var(--rule);
  padding: 32px;
  min-height: 260px;
  outline: none;
  overflow-wrap: anywhere;
}

#playground.is-inverted .pg__sample { background: var(--red); color: var(--white); }

.pg__hint { margin-top: 12px; font-size: 14px; line-height: 20px; opacity: .6; }

/* ---- weights ------------------------------------------------------------ */

.wt { display: block; }

.wt__row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 14px 0;
  border-top: var(--rule);
  width: 100%;
  text-align: left;
}

.wt__row:first-child { border-top: 0; }
.wt__row:hover .wt__line { opacity: .65; }

.wt__name { flex: none; width: 104px; font-size: 14px; line-height: 20px; }
.wt__line { font-size: 40px; line-height: 52px; }

/* ---- waterfall ---------------------------------------------------------- */

.wf__row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 10px 0;
  border-top: var(--rule);
  overflow: hidden;
}

.wf__row:first-child { border-top: 0; }
.wf__size { flex: none; width: 48px; font-size: 14px; line-height: 20px; opacity: .72; }
.wf__line { white-space: nowrap; line-height: 1.12; }

/* ---- character set ------------------------------------------------------ */

.glyphset h3 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  margin: 32px 0 12px;
}

.glyphset h3:first-child { margin-top: 0; }

.glyphgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  border-top: var(--rule);
  border-left: var(--rule);
}

.glyphgrid__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-right: var(--rule);
  border-bottom: var(--rule);
  font-size: 26px;
  line-height: 1;
  transition: background-color .12s ease, color .12s ease;
}

.glyphgrid__cell:hover { background: var(--red); color: var(--white); }

/* ---- text sizes --------------------------------------------------------- */

.sizes__row { padding: 18px 0; border-top: var(--rule); }
.sizes__row:first-child { border-top: 0; }
.sizes__meta { font-size: 14px; line-height: 20px; opacity: .72; margin-bottom: 8px; }
.sizes__text { max-width: 44em; }

/* ---- language ----------------------------------------------------------- */

.langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.langs__item h3 { font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 6px; opacity: .72; }
.langs__item p  { font-size: 22px; line-height: 30px; font-weight: 300; }

@media (max-width: 1279px) {
  .spec__vrule { display: none; }
  .spec__row { padding: 40px 0 48px; }
  .spec__label { position: static; width: auto; margin: 0 0 24px; padding: 0 24px; }
  .spec__body { margin: 0; padding: 0 24px; }
  .spec__hero { padding: 48px 0 40px; }
  .spec__hero h1 { margin: 0; padding: 0 24px; font-size: 64px; line-height: 74px; }
  .spec__hero p  { margin: 20px 0 0; padding: 0 24px; font-size: 18px; line-height: 26px; }
  .langs { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .spec__label, .spec__body, .spec__hero h1, .spec__hero p { padding: 0 16px; }
  .spec__hero h1 { font-size: 44px; line-height: 52px; }
  .pg__sample { padding: 20px; min-height: 200px; }
  .wt__row { flex-direction: column; gap: 4px; align-items: stretch; }
  .wt__name { width: auto; }
  .wt__line { font-size: 30px; line-height: 40px; }
  .glyphgrid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
  .glyphgrid__cell { font-size: 20px; }
}
