/* Font product page with a live type tester (includes/font-page.php).
   Sits on top of /product.css, which styles the gallery and the right-hand
   column the same way as the other product pages. Mono eyebrows, thin lines and the blue
   accent come from the menu and footer (menu.css, site.css). */

.fp {
  --fp-text: #fff;
  --fp-muted: rgba(255, 255, 255, 0.5);
  --fp-line: rgba(255, 255, 255, 0.12);
  --fp-panel: #0b0b11;
  --fp-accent: #5164F6;
  --fp-gutter: var(--nav-gutter, clamp(16px, 4vw, 56px));
  --fp-mono: 500 11px/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: var(--fp-text);
  font-family: 'Open Sans', sans-serif;
}
.fp *, .fp *::before, .fp *::after { box-sizing: border-box; }
.fp [hidden] { display: none !important; }

/* The font, with its own line grid: 17 pixels per 16-pixel em */
.fp-type { font-family: var(--fp-family), sans-serif; line-height: 1.0625; font-kerning: normal; }

.fp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font: var(--fp-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fp-muted);
}
.fp-eyebrow b { color: var(--fp-accent); font-weight: 500; }
.fp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fp-accent); box-shadow: 0 0 10px rgba(81, 100, 246, .8); }

/* ---------- gallery: product.css does the slider, these are the extras ---------- */

.fp .slider-wrapper:focus-visible { outline: 2px solid var(--fp-accent); outline-offset: 3px; }
.fp-thumb { padding: 0; margin: 0 0 6px; border: 0; background: none; line-height: 0; cursor: pointer; }
.fp-thumb:focus-visible { outline: none; }
.fp-thumb:focus-visible img { border-color: #fff; }

/* ---------- the tester ---------- */

/* The "Try it live" link lands below the fixed menu bar */
#fp-test { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.fp-tester {
  position: relative;
  border: 0.5px solid var(--fp-line);
  border-radius: 20px;
  background: var(--fp-panel);
  overflow: hidden;
}
.fp-bar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 0.5px solid var(--fp-line);
}
.fp-stage {
  min-height: clamp(220px, 18vw, 320px);
  padding: 28px 24px 36px;
  color: #fff;
  font-size: 96px;
  overflow-wrap: anywhere;
  outline: none;
  caret-color: var(--fp-accent);
  transition: background-color .25s, color .25s;
}
.fp-stage:focus-visible { box-shadow: inset 0 0 0 1px var(--fp-accent); }
.fp-tester--light .fp-stage { background: #f4f3ee; color: #0b0b11; }

.fp-controls {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px;
  padding: 18px 20px 6px; border-top: 0.5px solid var(--fp-line);
}
@media (min-width: 1100px) { .fp-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fp-ctl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fp-ctl-top { display: flex; justify-content: space-between; font: var(--fp-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fp-muted); }
.fp-ctl-top output { color: var(--fp-text); }
.fp-ctl input[type=range] { width: 100%; margin: 0; accent-color: var(--fp-accent); cursor: pointer; }

.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 6px; }
.fp-chip {
  font: 500 13px/1 'Open Sans', sans-serif; color: var(--fp-text);
  padding: 9px 14px; border-radius: 50px; border: 0.5px solid rgba(255, 255, 255, .35);
  background: transparent; cursor: pointer; transition: background-color .25s, border-color .25s;
}
.fp-chip:hover { border-color: #fff; }
.fp-chip[aria-pressed="true"] { background: var(--fp-accent); border-color: var(--fp-accent); }
.fp-chip--quiet { border-color: transparent; color: var(--fp-muted); }
.fp-chip--quiet:hover { color: #fff; border-color: transparent; }
.fp-chip:focus-visible, .fp-style:focus-visible, .fp-cell:focus-visible { outline: 2px solid var(--fp-accent); outline-offset: 2px; }
.fp-note { margin: 0; padding: 8px 20px 18px; font: var(--fp-mono); letter-spacing: .04em; line-height: 1.6; color: var(--fp-muted); text-transform: none; }

/* ---------- right column: the parts product.css leaves to each page ---------- */

.fp .license-mini { font: inherit; }
.fp .add-to-cart-btn {
  height: 50px; width: 100%; margin-bottom: 10px; padding: 10px 0;
  border: none; border-radius: 50px;
  background-color: #26242D; color: #fff;
  font: 16px 'Open Sans', sans-serif; text-align: center; cursor: pointer;
  transition: background-color .3s;
}
.fp .add-to-cart-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #FC5FAD, #5164F6, #5164F6, #21D4FD);
  background-size: 300% 300%;
  animation: gradientAnimation 5s ease infinite;
  box-shadow: 0 0 15px rgba(81, 100, 246, .6), 0 0 30px rgba(81, 100, 246, .4);
}
.fp .add-to-cart-btn:disabled { cursor: not-allowed; }
/* Jump link down to the tester */
.fp-try {
  display: block; height: 50px; margin-bottom: 10px; border: 0.5px solid rgba(255, 255, 255, .35); border-radius: 50px;
  color: #fff; font: 16px/49px 'Open Sans', sans-serif; text-align: center; text-decoration: none;
  transition: border-color .3s, background-color .3s;
}
.fp-try:hover { border-color: #fff; background: rgba(255, 255, 255, .04); }
.fp-try:focus-visible { outline: 2px solid var(--fp-accent); outline-offset: 2px; }

/* ---------- full-width sections ---------- */

.fp-section { max-width: 1720px; margin: 72px auto 0; padding: 0 var(--fp-gutter); }
.fp-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 8px; border-bottom: 0.5px solid var(--fp-line);
}

/* Styles: one row per named style */
.fp-styles { list-style: none; margin: 0; padding: 0; }
.fp-styles li { margin: 0; padding: 0; }
.fp-style {
  display: flex; align-items: center; gap: 24px; width: 100%;
  padding: 18px 12px; border: 0; border-bottom: 0.5px solid var(--fp-line); border-radius: 0;
  background: none; color: var(--fp-text); font: inherit; text-align: left; cursor: pointer;
  transition: background-color .25s;
}
.fp-style:hover { background: rgba(255, 255, 255, .04); }
.fp-style[aria-pressed="true"] { background: rgba(81, 100, 246, .12); }
.fp-style-text {
  flex: 1; min-width: 0; font-size: 48px; white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.fp-style-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; width: 170px; text-align: right; }
.fp-style-name { font-size: 15px; font-weight: 600; }

/* Waterfall */
.fp-fall-row { display: flex; align-items: baseline; gap: 24px; padding: 16px 12px; border-bottom: 0.5px solid var(--fp-line); }
.fp-fall-row .fp-eyebrow { width: 48px; flex: none; }
.fp-fall-text {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}

/* Glyphs */
.fp-glyphs { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 24px; margin-top: 16px; }
.fp-inspect {
  position: sticky; top: 80px; align-self: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  aspect-ratio: 1; border: 0.5px solid var(--fp-line); border-radius: 20px; background: var(--fp-panel);
}
.fp-inspect-glyph { font-size: 192px; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); border-top: 0.5px solid var(--fp-line); border-left: 0.5px solid var(--fp-line); }
.fp-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border: 0; border-right: 0.5px solid var(--fp-line); border-bottom: 0.5px solid var(--fp-line); border-radius: 0;
  background: none; color: var(--fp-text); font: inherit; font-size: 32px; cursor: pointer;
}
.fp-cell:hover { background: rgba(255, 255, 255, .05); }
.fp-cell[aria-pressed="true"] { background: var(--fp-accent); }

/* ---------- phones ---------- */

/* product.css switches the gallery to full width at 600px; between that and 767px it would sit at 47% */
@media (min-width: 601px) and (max-width: 767px) {
  .fp .product-gallery { width: auto; margin: 0 20px 20px; }
}

@media (max-width: 767px) {
  .fp .wrapper { display: block; }
  /* Dots under the image rather than over it, where the images keep their small print */
  .fp .dots { position: static; margin-top: 12px; }
  .fp-tester { border-radius: 16px; }
  .fp-stage { min-height: 220px; padding: 20px 16px 28px; }
  .fp-bar, .fp-controls, .fp-chips, .fp-note { padding-left: 16px; padding-right: 16px; }
  .fp-controls { grid-template-columns: minmax(0, 1fr); }
  .fp .container-product { margin: 0 20px; width: auto; padding: 0; }
  .fp-section { margin-top: 56px; }
  .fp-style { gap: 12px; padding: 14px 4px; }
  .fp-style-text { font-size: 32px; }
  .fp-style-meta { width: 96px; }
  .fp-style-meta .fp-eyebrow { display: none; }
  .fp-fall-row { gap: 12px; padding: 12px 4px; }
  .fp-fall-row .fp-eyebrow { width: 40px; }
  .fp-glyphs { grid-template-columns: minmax(0, 1fr); }
  .fp-inspect { position: static; aspect-ratio: auto; height: 220px; }
  .fp-inspect-glyph { font-size: 128px; }
  .fp-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .fp-cell { font-size: 32px; }
}
