@font-face {
  font-family: FormaDJRArabicVariableWeb;
  font-weight: 1 900;
  font-display: swap;
  src: url("FormaDJRArabicVariable.woff2") format("woff2");
}

@layer page {
  .forma-arabic {
    color: #000;
    background: #fff;
    font-family: FormaDJRArabicVariableWeb, system-ui, sans-serif;
  }

  .forma-arabic .wrapper {
    margin-left: auto;
    margin-right: auto;
    max-width: 61rem;
    padding-left: calc(env(safe-area-inset-left) + 2rem);
    padding-right: calc(env(safe-area-inset-right) + 2rem);
    position: relative;
  }

  .forma-arabic section {
    padding: 4rem 0;
  }

  /* Title — live page keeps the inline chroma-green background. */
  .forma-arabic #title {
    background-color: #00ff00;
    display: block;
    overflow: visible;
    padding: 2em 0;
    position: relative;
    text-align: center;
    z-index: 1;
  }

  .forma-arabic .title-overlay,
  .forma-arabic .title-mark {
    max-width: 30em;
    max-height: 30em;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .forma-arabic .title-overlay { margin-bottom: 3rem; }
  .forma-arabic .title-mark { margin-bottom: 2rem; }

  .forma-arabic .title-label {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: bold;
    max-width: 100%;
    width: 100%;
  }

  /* Hero CTAs */
  .forma-arabic #title .try-buy-pdf {
    bottom: -1rem;
    left: 0;
    right: 0;
    overflow: visible;
    position: absolute;
  }

  .forma-arabic #title .try-buy-pdf a.button {
    appearance: none;
    background-color: red;
    border: 0;
    border-radius: 0.2rem;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-family: FormaDJRArabicVariableWeb, system-ui, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin: 0 0.5em;
    padding: 0.5em 1em;
    text-transform: uppercase;
    text-decoration: none;
  }

  .forma-arabic #title .try-buy-pdf a.button:hover,
  .forma-arabic #title .try-buy-pdf a.button:focus {
    background-color: #000;
    color: #fff;
  }

  /* Specimens */
  .forma-arabic .specimen {
    padding: 0;
    text-align: center;
  }

  .forma-arabic .specimen img {
    max-width: 100%;
    height: auto;
  }

  /* Intro copy */
  .forma-arabic #intro h2,
  .forma-arabic #intro2 h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.1;
    margin: 0 0 1.5rem;
    font-weight: 700;
  }

  .forma-arabic #intro p,
  .forma-arabic #intro2 p {
    font-size: 1.125rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
  }

  .forma-arabic #intro2 img {
    max-width: 100%;
    height: auto;
    margin-top: 2rem;
  }

  .forma-arabic a { color: inherit; }

  /* Interactive specimen */
  .forma-arabic .js-interactive-specimen {
    --opsz: 72;
    --wght: 400;
    font-family: FormaDJRArabicVariableWeb, system-ui, sans-serif;
    font-variation-settings: "opsz" var(--opsz), "wght" var(--wght);
    font-size: 56px;
    line-height: 0.9;
    margin-left: auto;
    margin-right: auto;
    max-width: none;
    outline: none;
    text-align: center;
    white-space: nowrap;
    width: 100%;
    direction: rtl;
  }

  @media screen and (min-width: 375px) { .forma-arabic .js-interactive-specimen { font-size: 64px; } }
  @media screen and (min-width: 414px) { .forma-arabic .js-interactive-specimen { font-size: 72px; } }
  @media screen and (min-width: 640px) { .forma-arabic .js-interactive-specimen { font-size: 116px; } }
  @media screen and (min-width: 768px) { .forma-arabic .js-interactive-specimen { font-size: 144px; } }
  @media screen and (min-width: 1024px) { .forma-arabic .js-interactive-specimen { font-size: 189px; margin: 0; } }
  @media screen and (min-width: 1040px) { .forma-arabic .js-interactive-specimen { font-size: 192px; } }

  .forma-arabic .interactive-specimen-axes {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    margin: 3rem 0 0;
    padding: 0;
  }

  @media screen and (min-width: 640px) {
    .forma-arabic .interactive-specimen-axes { gap: 2rem; }
  }

  .forma-arabic .interactive-specimen-axes li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .forma-arabic .interactive-specimen-axes label {
    color: red;
    display: block;
    font-family: ui-monospace, monospace;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    margin: 0;
    padding: 0;
  }

  .forma-arabic .interactive-specimen-axes label::after {
    content: ": " attr(data-val);
  }

  /* Range sliders */
  .forma-arabic input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    margin: 6.5px 0;
    width: 2.5in;
    max-width: 100%;
    background: transparent;
  }

  .forma-arabic input[type="range"]:focus { outline: 0; }

  .forma-arabic input[type="range"]::-webkit-slider-runnable-track {
    background: #ccc;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    height: 1px;
    width: 2.5in;
  }

  .forma-arabic input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #ccc;
    border: 0 solid #fff;
    border-radius: 13px;
    cursor: pointer;
    height: 13px;
    margin-top: -6px;
    width: 13px;
  }

  .forma-arabic input[type="range"]::-moz-range-track {
    background: #ccc;
    border: 0;
    height: 1px;
    width: 2.5in;
  }

  .forma-arabic input[type="range"]::-moz-range-thumb {
    background: #ccc;
    border: 0 solid #fff;
    border-radius: 13px;
    cursor: pointer;
    height: 13px;
    width: 13px;
  }
}
