@font-face {
  font-family: Manrope;
  src: url("assets/manrope-variable-v1.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #101827;
  --ink: #25272a;
  --ivory: #f4ecdf;
  --muted: #c2c4c8;
  --accent: #ff795b;
  --lacquer: #ed4b31;
  --accent-paper: #8e3023;
  --paper: #ece0cb;
  --paper-ink: #51483c;
  --paper-line: #82715b55;
  --line: #f4ecdf2a;
  --faded-rule: linear-gradient(90deg, transparent 23%, var(--lacquer) 50%, transparent 77%);
  --edge: clamp(1.25rem, 5.4vw, 7rem);
  --header-height: 4.75rem;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: Manrope, Arial, sans-serif;
  --ease: cubic-bezier(.2,.65,.24,1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; container-type: inline-size; }
body { margin: 0; color: var(--ivory); background: var(--navy); isolation: isolate; font: 400 1rem/1.6 var(--sans); }
/* Soft light and shadow move independently, like folds across navy cloth. */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: -23% -20%;
  pointer-events: none;
  will-change: transform;
}
body::before {
  background:
    radial-gradient(ellipse 19% 27% at 27% 33%, #465675 0%, #303e5a 31%, transparent 100%),
    radial-gradient(ellipse 22% 29% at 69% 69%, #3b4b69 0%, #263550 44%, transparent 100%),
    radial-gradient(ellipse 19% 19% at 79% 31%, #33425f 0%, transparent 100%),
    radial-gradient(ellipse 47% 49% at 50% 53%, #23324b 0%, #18243a 66%, transparent 100%);
  opacity: .78;
  transform: translate(-2%, 1%) rotate(-5deg);
  animation: navy-drift 7s -1.17s ease-in-out infinite;
}
body::after {
  background:
    radial-gradient(ellipse 20% 28% at 43% 42%, #090f1db8 0%, #0d1627a8 42%, transparent 100%),
    radial-gradient(ellipse 23% 22% at 74% 55%, #0b13228a 0%, transparent 100%),
    radial-gradient(ellipse 17% 23% at 30% 68%, #10192b8c 0%, transparent 100%);
  transform: translate(3%, -1%) rotate(3deg);
  animation: navy-folds 9.5s -3.06s ease-in-out infinite;
}
@keyframes navy-drift {
  0%, 100% { transform: translate(-6%, 2%) rotate(-6deg) scale(1.05, 1.09); }
  34% { transform: translate(3%, -5%) rotate(1deg) scale(1.09, 1.01); }
  68% { transform: translate(6%, 4%) rotate(5deg) scale(1.01, 1.06); }
}
@keyframes navy-folds {
  0%, 100% { transform: translate(4%, -5%) rotate(4deg) scale(1.07, 1.03); opacity: .83; }
  32% { transform: translate(-4%, 4%) rotate(-5deg) scale(1.02, 1.11); opacity: 1; }
  72% { transform: translate(3%, 7%) rotate(-1deg) scale(1.12, 1.01); opacity: .88; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { will-change: auto; }
}
@media (forced-colors: active) {
  body::before, body::after { display: none; }
}
h1, h2, p, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; }
img { display: block; max-width: 100%; -webkit-user-select: none; user-select: none; }
img::selection { background: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 2 * var(--edge), 88rem); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .6rem 1rem; background: var(--navy); transform: translateY(-200%); }
.skip:focus { transform: none; }

.header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  border-image: var(--faded-rule) 1;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; width: fit-content; }
.brand-name { font: 500 1.28rem/1 var(--display); }
.brand-badge {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: .27rem;
  color: var(--lacquer);
  border: 1px solid currentColor;
}
.brand-badge::before {
  content: "";
  background: currentColor;
  mask: url("assets/fenix-monogram.svg") center / contain no-repeat;
  forced-color-adjust: none;
}
.language {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .73rem;
  font-weight: 700;
}
.language { justify-self: end; min-width: 44px; justify-content: center; border: 0; background: transparent; cursor: pointer; }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .language:hover { color: var(--accent); }
}
.edition {
  display: inline-block;
  margin-inline-start: .08em;
  vertical-align: .13em;
  font: 650 .38em/.9 var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.055em;
}
.folio-word { display: inline-block; }
.intro .folio-word { animation: folio-cover 520ms cubic-bezier(.24, .7, .24, 1) both; }
.intro .hero .edition { animation: edition-ink 250ms ease-out 260ms both; }
@keyframes folio-cover {
  from { clip-path: inset(-20% 100% -20% -8%); }
  to { clip-path: inset(-20% -8% -20% -8%); }
}
@keyframes edition-ink { from { opacity: 0; } to { opacity: 1; } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.viewer { min-width: 0; }
.viewer-stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  aspect-ratio: 2.3;
}
.viewer-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 56% 49% at 49% 52%, #52617c48 0%, #2c374b38 55%, transparent 100%);
}
.viewer-still, .orbit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer-still img { width: 100%; height: 100%; object-fit: fill; }
.viewer-stage.interactive .viewer-still { visibility: hidden; }
.orbit-canvas { display: block; cursor: grab; touch-action: pan-y; }
.orbit-canvas.dragging { cursor: grabbing; }
.viewer-rail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  padding: .3rem clamp(.1rem, 1.4vw, 1rem) 0;
}
.viewer-tools, .orbit-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem clamp(.55rem, 2vw, 1.35rem);
}
.orbit-tools { gap: .15rem .55rem; }
.tool {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  background: transparent;
  padding: .35rem .18rem;
  font-size: .78rem;
  font-weight: 560;
  text-align: center;
  cursor: pointer;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .tool:hover { color: var(--accent); }
}
.tool:disabled { cursor: default; opacity: .65; }
.viewer-note { max-width: 38ch; margin-block: .72rem .3rem; color: var(--muted); font-size: .76rem; }
.viewer-note:only-child { margin-block: .3rem; }

.sample {
  color-scheme: light;
  width: min(100%, 50rem);
  margin-inline: auto;
  padding: clamp(1rem, 3.2vw, 2.5rem);
  background:
    repeating-linear-gradient(0deg, #86643c06 0 1px, transparent 1px 4px),
    linear-gradient(105deg, #f6eddb, var(--paper));
  color: var(--ink);
  box-shadow: .3rem 1rem 2.7rem #04070c63;
}
.sample-art { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.specimen-cell { min-width: 0; padding: 1rem clamp(.5rem, 2vw, 1.3rem) .6rem; }
.specimen-cell + .specimen-cell { border-left: 1px solid var(--paper-line); }
.specimen-cell p {
  margin-bottom: .2rem;
  color: var(--paper-ink);
  font-size: .68rem;
  font-weight: 740;
}
.specimen-drawing {
  position: relative;
  isolation: isolate;
  max-width: 16rem;
  margin-inline: auto;
}
.specimen-drawing::before, .specimen-drawing::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  z-index: -1;
  border-top: 1px solid var(--paper-line);
}
.specimen-drawing::before { top: 30%; border-top-style: dashed; opacity: .65; }
.specimen-drawing::after { top: 72.4%; }
.specimen-drawing canvas, .specimen-drawing img {
  display: block;
  width: 100%;
  height: auto;
}
#sample-note { border-top: 1px solid var(--paper-line); padding-top: .6rem; color: var(--paper-ink); font-size: .78rem; }
.sample fieldset { display: flex; flex-wrap: wrap; column-gap: clamp(.65rem, 2.4vw, 1.6rem); border: 0; margin: 0; padding: 0; min-width: 0; }
.choice { position: relative; display: flex; align-items: center; gap: .38rem; min-height: 44px; cursor: pointer; font-size: .77rem; font-weight: 700; color: var(--paper-ink); }
.choice input { margin: 0; width: .87rem; height: .87rem; flex: 0 0 auto; accent-color: var(--accent-paper); }
.choice:focus-within { color: var(--ink); }
.choice:has(input:checked) { color: var(--ink); }
.finish-chip {
  flex: 0 0 .78rem;
  height: .78rem;
  border-radius: 0;
  border: 1px solid #3029203d;
}
.ink-blue { background: #3e5777; }
.soft-black { background: #292826; }
.sample :focus-visible { outline-color: var(--accent-paper); }

/* Close the desk at its edge, then set the imprint into a full-width navy cover. */
.footer {
  background: linear-gradient(155deg, #19253a, var(--navy) 65%, #0d1422);
}
.colophon { padding-block: clamp(1.8rem, 4.6vw, 4rem); }
.colophon-wordmark {
  font: 500 clamp(2.75rem, 14vw, 6.25rem)/.92 var(--display);
}
@media (max-width: 600px) {
  .colophon-wordmark { font-size: min(clamp(2.75rem, 14vw, 6.25rem), 22vw); }
}

@media (max-width: 799px) {
  :root { --header-height: 4.2rem; }
  .wrap { width: min(100% - 2 * var(--edge), 43rem); }
}
@media (max-width: 600px) {
  .header { gap: .22rem; }
  .brand { gap: .43rem; }
  .brand-name { font-size: 1.18rem; }
  .brand-badge { width: 2.25rem; height: 2.25rem; padding: .22rem; }
  .viewer-stage { aspect-ratio: 1.4; }
  .viewer-tools { gap: .12rem .85rem; }
  .viewer-note { margin-top: .45rem; }
  .specimen-cell { padding-top: .65rem; }

}

.writing-pad { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--paper-line); }
.pad-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; }
.pad-heading h3 { margin: 0; font: 500 clamp(1.65rem, 4vw, 2.25rem)/1.05 var(--display); }
.pad-modes { display: flex; flex-wrap: wrap; gap: .5rem; }
.pad-button {
  min-block-size: 44px;
  min-inline-size: 44px;
  padding: 0 .375rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--paper-ink);
  cursor: pointer;
  font-size: .75rem;
  font-weight: 650;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.pad-button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent-paper); }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .pad-button:hover:not(:disabled) { color: var(--ink); border-color: var(--accent-paper); }
}
.pad-button:disabled { opacity: .52; cursor: default; }
.pad-paper {
  position: relative;
  isolation: isolate;
  height: clamp(6.5rem, 14vw, 10rem);
  border-block: 1px solid var(--paper-line);
  background: #fff3;
}
.pad-paper::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 65% .75rem auto;
  border-bottom: 1px solid var(--paper-line);
}
#signature-canvas, #signature-type { display: block; width: 100%; height: 100%; }
#signature-canvas { cursor: crosshair; touch-action: none; }
#signature-type {
  /* Sit the lettering on the printed rule, with room for descenders. */
  --signature-inset: calc(19% - .22em);
  position: absolute;
  inset: var(--signature-inset) 0 0;
  height: calc(100% - var(--signature-inset));
  padding: 0 .75rem;
  border: 0;
  background: transparent;
  color: #23374d;
  font: italic 500 clamp(1.5rem, 5.2vw, 3.25rem)/1 var(--display);
}
#signature-type:focus-visible { outline-offset: -2px; }
/* Exhibit: change the framing at each stage, rather than repeating a card grid. */
.object {
  border-top: 1px solid transparent;
  border-image: var(--faded-rule) 1;
  padding-block: clamp(3rem, 7vw, 7rem) clamp(3.5rem, 8vw, 8rem);
}
.object-heading { margin-bottom: 1rem; }
.object-heading h2, .desk-intro h2 {
  margin-top: .3em;
  font-size: clamp(3.5rem, 8.2vw, 8.5rem);
  line-height: .87;
  letter-spacing: -.055em;
}
.object-composition {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  align-items: end;
}
.nib-print {
  position: relative;
  z-index: 1;
  margin: 0 0 4.75rem -1.5rem;
  padding: clamp(.4rem, 1vw, .9rem);
  background: #e8dcc6;
  color: #504a3c;
  box-shadow: 0 12px 28px #080d1580;
  rotate: -4deg;
  transform-origin: 50% 80%;
}
.nib-print figcaption {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .65rem .2rem .12rem;
  font-size: .68rem; letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.viewer-stage::before { background: radial-gradient(ellipse 56% 49% at 49% 52%, #66788b38, transparent); }
.viewer-note { min-height: 1.25em; }

.ink-section {
  position: relative;
  overflow: clip;
  background: #554135;
  background-size: cover;
  border-block: 1px solid var(--line);
  padding-block: clamp(2.75rem, 8vw, 8rem);
}
.desk-layout {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.22fr);
  gap: clamp(1.5rem, 4.5vw, 6rem);
  align-items: center;
}
.desk-intro { position: relative; isolation: isolate; align-self: stretch; padding-top: clamp(.5rem, 2.5vw, 2.75rem); }
.desk-intro h2 { max-width: 7ch; font-size: clamp(3.6rem, 9.4vw, 8.25rem); }
.desk-intro p { margin-top: 1.25rem; color: #eee1cf; font-size: .9rem; }
.desk-pen {
  max-width: none; width: 112%; height: auto;
  margin: 1rem 0 -1rem -7%;
  transform: rotate(-27deg);
  filter: drop-shadow(8px 15px 5px #21150c85);
  pointer-events: none;
}
.desk-stationery { position: relative; isolation: isolate; min-width: 0; }
.desk-stationery::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 3.5% -1% 1% 2%; rotate: 3deg;
  background: #b2ab8d;
  border: 1px solid #a69a7e;
  box-shadow: 4px 14px 24px #21140890;
}
.sample {
  width: 100%; max-width: none; margin: 0;
  box-shadow: 0 3px 8px #25201768, 10px 16px 28px #28170a56;
}
.sample .writing-pad { margin-top: 1rem; }
.sample .pad-paper { height: clamp(6rem, 11vw, 9rem); }

@media (max-width: 799px) {
  .object-composition { grid-template-columns: minmax(0, 2.55fr) minmax(0, 1fr); }
  .nib-print { margin-bottom: 4.25rem; margin-left: -.6rem; }
  .desk-layout { grid-template-columns: 1fr; gap: 1.8rem; }
  .desk-intro { min-height: 12rem; }
  .desk-intro h2 { font-size: clamp(3.4rem, 9vw, 5.6rem); }
  .desk-pen {
    position: absolute; width: 62%; top: 18%; right: -12%; margin: 0;
    transform: rotate(-54deg); z-index: -1;
  }
}
@media (max-width: 600px) {
  .object-composition { display: block; }
  .object-heading { margin-bottom: .5rem; }
  .object-heading h2 { font-size: clamp(3rem, 11vw, 4.5rem); }
  .nib-print { width: min(66%, 14rem); margin: 1.1rem .5rem 0 auto; }
  .ink-section { padding-block: 1rem 3.5rem; }
  .desk-layout { gap: 1.25rem; }
  .desk-intro { min-height: 10.5rem; }
  .desk-intro p { margin-top: .65rem; font-size: .8rem; }
  .desk-pen { top: 25%; right: -14%; width: max(56%, 9rem); }
  .desk-stationery::before { right: -.4%; rotate: 2deg; }
}
/* A lacquer-coloured print mount makes the accent part of the object study. */
.nib-print { background: #f0e4ce; box-shadow: 0 9px 24px #080d15a0; margin-right: .85rem; isolation: isolate; }
.nib-print::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--lacquer); border: 1px solid #ff795b90;
  transform: translate(.75rem, -.5rem) rotate(7deg);
}
.nib-print::after {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #f0e4ce;
}
.nib-print[data-detail="clip"] .detail-nib { opacity: 0; }
.nib-print figcaption { padding: 0; }
@media (max-width: 600px) {
  .nib-print::before { transform: translate(.5rem, -.35rem) rotate(7deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Put the decisions where they have an effect, not in a duplicate configurator. */
.object-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; }
.object-heading h2 { margin-top: 0; }
.viewer-note:empty { display: none; }
.nib-print { padding-bottom: clamp(.4rem, 1vw, .9rem); }
.sample-art { margin-top: .25rem; }

/* Contact prints introduce the live pen. */
.object { padding-block: clamp(3rem, 8vw, 8rem); }
.object-heading { display: block; text-align: center; margin-bottom: clamp(1.8rem, 4vw, 4rem); }
.object-heading h2 { font-size: clamp(3.5rem, 9.8vw, 9rem); }
.object-composition { display: block; max-width: 67rem; margin-inline: auto; }
.contact-spread {
  display: grid;
  grid-template-columns: 1fr 1.16fr 1fr;
  align-items: center;
  width: min(100%, 55rem);
  margin: 0 auto clamp(2.25rem, 5vw, 5rem);
  padding: 0 1.1rem .7rem;
  perspective: 850px;
}
.contact-print, .contact-print.nib-print {
  position: relative; isolation: isolate;
  min-width: 0; width: auto; margin: 0; padding: clamp(.28rem, .8vw, .72rem);
  background: #e8dcc4; color: #594c3e;
  box-shadow:
    inset 1px 1px #fff7e5, inset -1px -1px #9d8968,
    2px 3px 3px #090c15a6, 7px 10px 14px #080b1370;
  rotate: var(--angle);
  translate: var(--offset) var(--rise);
}
.contact-print::before, .contact-print::after { content: none; }
.contact-print figcaption { color: var(--accent-paper); padding-top: .41rem; font: 600 clamp(.63rem, .8vw, .75rem)/1.35 var(--sans); }
.clip-print { --angle: -9deg; --offset: 8%; --rise: .7rem; z-index: 1; }
.contact-print.nib-print { --angle: -1deg; --offset: 0%; --rise: 0; z-index: 3; }
.seam-print { --angle: 8deg; --offset: -9%; --rise: 1rem; z-index: 2; }
.contact-image { position: relative; overflow: hidden; aspect-ratio: 1.35; background: #394456; }
.clip-print .contact-image { background: #5e5548; }
.seam-print .contact-image { background: #352c26; }
.contact-image img { position: absolute; display: block; max-width: none; height: auto; }
.clip-print img { width: 114%; top: 48%; left: -8%; transform: translateY(-50%) rotate(-24deg); }
.contact-image .detail-nib { width: 123%; top: 55%; left: 50%; transform: translate(-47%, -45%) rotate(-12deg); }
.seam-print img { width: 155%; top: 53%; left: -17%; transform: translateY(-50%) rotate(41deg); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .contact-print {
      animation: spread-prints linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 100%;
    }
    @keyframes spread-prints {
      from { transform: translateX(calc(var(--offset) * 1.5)) translateY(32px) rotate(calc(var(--angle) * -.8)); }
      to { transform: none; }
    }
  }
}
.viewer-rail { position: relative; align-items: center; flex-wrap: wrap; }
.desk-layout { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.desk-intro { align-self: center; padding-top: 0; }
.desk-intro h2 { margin: 0; }
.desk-pen { margin-top: 2rem; }
@media (max-width: 800px) {
  .desk-layout { grid-template-columns: 1fr; }
  .desk-intro { min-height: 9rem; align-self: stretch; padding-top: 1rem; }
}
@media (max-width: 600px) {
  .object-heading { margin-bottom: 1.8rem; }
  .contact-spread { padding-inline: .3rem; margin-bottom: 1.6rem; }
  .contact-print.nib-print { padding: .24rem; }
  .contact-print figcaption { padding-top: .2rem; }
  .desk-pen { margin-top: 0; }
}

.ink-section {
  background-image: linear-gradient(97deg, #22160e65, transparent 68%), var(--desk-photo, none);
  background-position: center, center 72%;
}
.desk-pen { filter: drop-shadow(9px 13px 4px #2b140883) drop-shadow(1px 2px 1px #20130b7a); }
@media (max-width: 600px) {
  .ink-section { background-position: center, 36% 65%; }
}
.seam-print figcaption { text-align: right; }
.contact-image .detail-nib { width: 118%; left: 52%; transform: translate(-46%, -45%) rotate(-12deg); }


/* The sheet is for writing first; the two comparison strokes are a reference underneath. */
.sample .writing-pad { margin-top: 0; border-top: 0; padding-top: .85rem; }
.sample .pad-paper { height: clamp(7.25rem, 12vw, 10rem); }
.ink-proof { border-top: 1px solid var(--paper-line); margin-top: .45rem; }
.ink-proof .sample-art { margin-top: 0; }
.ink-proof .specimen-cell { padding-block: .4rem .2rem; }
.ink-proof .specimen-drawing { max-width: 12rem; }
.ink-proof #sample-note { padding-top: .45rem; font-size: .72rem; }

.header-utilities { display: flex; align-items: center; justify-content: flex-end; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .contact-print { animation-range: entry 4% entry 96%; }
    .clip-print { --gather: 57%; }
    .seam-print { --gather: -57%; }
    .contact-print.nib-print { --gather: 0%; }
    @keyframes spread-prints {
      from { transform: translate(var(--gather), 34px) rotate(calc(var(--angle) * -.92)) scale(.86); }
      to { transform: none; }
    }
  }
}
.seam-print img { width: 132%; left: -13%; transform: translateY(-46%) rotate(31deg); }

/* One lighting direction: the pen's shadow is rendered against a floor, paper follows the window. */
.desk-pen {
  width: 126%; max-width: none; margin: .65rem 0 -1rem -10%;
  transform: none; filter: none; pointer-events: none;
}
.desk-stationery::before {
  inset: 1% 1.4% .7% .8%; rotate: 1.6deg;
  background:
    linear-gradient(140deg, #f5e8ce22, #6f533e45),
    var(--paper-texture, url("assets/folio-cotton-paper.webp")) 0 0 / 264px 264px repeat var(--paper);
  border: 1px solid #ad8f697a;
  border-radius: 1px 2px 3px 2px;
  box-shadow: 1px 2px 1px #1c110a70, 8px 15px 15px #170d0868;
}
.desk-stationery .sample {
  position: relative; transform: rotate(-1.45deg);
  background:
    linear-gradient(126deg, #fff7e926 4%, #fdf4dd0d 45%, #9f754633 100%),
    var(--paper-texture, url("assets/folio-cotton-paper.webp")) 0 0 / 264px 264px repeat var(--paper);
  border-radius: 1px 2px 3px 1px;
  box-shadow:
    0 1px 0 #a88b65, 1px 3px 2px #28180f80, 6px 11px 16px #21110a58,
    inset -1px -1px 2px #7c5d3640;
}
.desk-stationery .pad-paper { background: #fff5d212; }
@media (max-width: 799px) {
  .desk-pen { position: absolute; width: 54%; top: 3%; right: -4%; margin: 0; }
  .desk-stationery .sample { transform: none; }
}
@media (max-width: 600px) {
  .desk-pen { width: max(53%, 9rem); right: -6%; top: 17%; }
}
@media (min-width: 800px) { .desk-pen { margin-inline-start: -2%; } }
@media (max-width: 600px) { .desk-intro { min-height: 7.5rem; } }

/* The contact prints double as short paths into the live views. */
.print-detail {
  border: 0; background: none; color: inherit; padding: 0; font: inherit; cursor: pointer;
}
.print-detail:disabled { cursor: default; }
.print-detail:disabled::after { content: none; }
.print-detail::after { content: ""; position: absolute; inset: 0; }
.contact-print:has(.print-detail:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) { .print-detail:enabled:hover { color: #8e3023; } }
.viewer-stage { scroll-margin-block: 1.4rem; }
.viewer-stage[data-detail] {
  width: 100cqw;
  margin-inline: calc((100% - 100cqw) / 2);
  max-height: 72svh;
  outline-offset: -2px;
}

/* A blind impression in the lower corner, below the writing line. */
.desk-stationery .pad-paper::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(1.15rem, 2.3vw, 1.9rem);
  aspect-ratio: 1;
  inset: auto .8rem .55rem auto;
  background: linear-gradient(145deg, #72543570 0%, #b58e5f47 35%, #fff9e5b0 82%);
  mask: url("assets/folio-paper-impression.svg") center / contain no-repeat;
  pointer-events: none;
}
@media (forced-colors: active) { .desk-stationery .pad-paper::after { display: none; } }

/* Keep the title optically centered in short windows. */

.ink-section.desk-visible { --desk-photo: url("assets/folio-walnut-study.webp"); }
@media (max-width: 600px) {
  .embedded .ink-section.desk-visible { --desk-photo: url("assets/folio-walnut-study-mobile.webp"); }
  .embedded .ink-section:not(.desk-visible) { --paper-texture: none; }
  .embedded .ink-section:not(.desk-visible) .pad-paper::after { content: none; }
}

/* The pen points into the sheet instead of floating beside the chapter title. */
@media (min-width: 800px) {
  .desk-pen { margin-inline-start: 1.5%; }
}
@media (max-width: 600px) {
  .desk-pen { right: -3%; top: 34%; rotate: 8deg; }
}

/* Keep the longer Bulgarian chapter title to two lines without crowding the desk pen. */
:lang(bg) .desk-intro h2 { max-width: 11ch; font-size: clamp(3rem, 6.6vw, 6.35rem); }
@media (max-width: 600px) {
  :lang(bg) .desk-intro h2 { max-width: 10.4ch; font-size: clamp(2.15rem, 10.15vw, 3.3rem); }
}

/* Keep the selected product detail useful even when the browser cannot start WebGL. */
.viewer-still.detail-still img {
  display: block;
  width: 76%;
  margin-inline: auto;
  object-fit: contain;
}
@media (max-width: 600px) {
  .viewer-still.detail-still img { width: 94%; }
}

.viewer-stage[data-detail="clip"] .detail-still img,
.viewer-stage[data-detail="barrel"] .detail-still img {
  width: 100%;
  object-fit: cover;
}

/* Let enlarged navigation and longer Bulgarian labels reflow on narrow screens. */
@media (max-width: 600px) {
  .contact-print figcaption { overflow-wrap: anywhere; }
  :lang(bg) .object-heading h2 { font-size: min(clamp(3.5rem, 9.8vw, 9rem), 17vw); }
  .pad-heading h3, .desk-intro h2 { min-width: 0; overflow-wrap: anywhere; }
}

/* On the narrow desk, let the cap rest across the blank top margin of the sheet. */
@media (max-width: 420px) {
  .desk-intro { z-index: 1; }
  .desk-pen { top: calc(34% + clamp(29px, 71px - 10vw, 39px)); }
}

/* Viewer controls read as a caption beneath the object, not a second navigation bar. */
.viewer-tools, .orbit-tools { gap: .15rem clamp(.68rem, 1.9vw, 1.3rem); }
.tool { color: var(--muted); }
.tool.cap-action {
  color: var(--ivory);
  font-weight: 720;
  text-decoration: underline var(--lacquer);
  text-underline-offset: .35em;
}
.tool:focus-visible { color: var(--accent); }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .tool:hover { color: var(--accent); }
}
.viewer-rail .viewer-note:not(:empty) { flex: 1 0 100%; margin: .25rem 0 0; }
.finish-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.finish-name {
  margin-inline-end: .6rem;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.finish-option {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  cursor: pointer;
}
.finish-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
  cursor: pointer;
}
.finish-option .finish-chip {
  inline-size: 1.15rem;
  block-size: 1.15rem;
  border: 1px solid #f4ecdf5e;
  border-radius: 50%;
}
.finish-option input:checked + .finish-chip {
  outline: 2px solid var(--lacquer);
  outline-offset: 3px;
}
.finish-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
@media (max-width: 600px) {
  .viewer-rail { column-gap: 1rem; }
  .viewer-tools { flex: 1 0 100%; }
  .viewer-tools, .orbit-tools { gap: .15rem .52rem; }
  .tool, .finish-name { font-size: .75rem; }
  .contact-spread { margin-bottom: .85rem; }
}
@media (forced-colors: active) {
  .finish-option .finish-chip { forced-color-adjust: none; }
  .finish-option input:checked + .finish-chip { outline-color: Highlight; }
}


/* Keep the cover number legible even when the brightest fold passes behind it. */
@media (prefers-reduced-motion: no-preference) {
}
.object { scroll-margin-top: 1rem; }
.colophon {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}
.colophon-caption {
  margin-top: .62rem;
  font-size: .8rem;
  color: var(--muted);
}
.colophon-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(.4rem, 2vw, 1.55rem);
}
.colophon-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  font-size: .875rem;
  font-weight: 650;
  text-underline-offset: .26em;
}
.colophon-nav a:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .colophon-nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
}
@media (max-width: 760px) {
  body::before, body::after { inset: -24% -30%; }
}
@media (max-width: 420px) {
  .colophon-nav { column-gap: .85rem; }
  .colophon-nav a { overflow-wrap: anywhere; }
}

/* Register the cap's contact point to the blank top edge of the tablet sheet. */
@media (600px <= width <= 800px) {
  .desk-layout {
    --desk-gap: clamp(1.25rem, 3.5vw, 1.8rem);
    gap: var(--desk-gap);
  }
  .desk-intro { z-index: 1; }
  .desk-pen {
    position: absolute;
    width: 54%;
    top: calc(100% + var(--desk-gap) + .5rem);
    right: -4%;
    margin: 0;
    rotate: none;
    translate: 0 -78%;
  }
  .desk-stationery .sample { transform: none; }
}

/* Footer jumps focus the named section, with the keyboard cue on its heading. */
:is(#object, #ink):focus-visible { outline: none; }
#object:focus-visible #object-title { width: fit-content; margin-inline: auto; }
:is(#object, #ink):focus-visible :is(#object-title, #ink-title) { position: relative; }
:is(#object, #ink):focus-visible :is(#object-title, #ink-title)::before {
  content: "";
  position: absolute;
  inset-inline-start: -.68rem;
  inset-block-start: .07em;
  block-size: .66em;
  border-inline-start: 2px solid currentColor;
  pointer-events: none;
}

/* On a portrait tablet, turn the cover into a vertical composition. */

/* In forced-color modes, keep the desk and its writing surface on the system canvas. */
@media (forced-colors: active) {
  .ink-section, .desk-stationery .sample { background: Canvas; }
  .desk-stationery::before { display: none; }
  .desk-stationery .sample { border: 1px solid CanvasText; }
  .pad-modes .pad-button:not([aria-pressed="true"]) { border-bottom: 0; }
  .pad-modes .pad-button[aria-pressed="true"] { border-bottom-color: Highlight; }
}
@media (forced-colors: active) and (prefers-color-scheme: dark) {
  .ink-fallback { filter: brightness(0) invert(1); }
}

.header-utilities { gap: clamp(.3rem, 1vw, .95rem); }
.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-block-size: 44px;
  min-inline-size: 44px;
  font-size: .84rem;
  font-weight: 650;
}
.header-link:focus-visible { color: var(--accent); }
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .header-link:hover { color: var(--accent); }
}
.header-link.demo-exit {
  padding-inline-start: .55rem;
  text-decoration: underline;
  text-decoration-color: var(--lacquer);
  text-underline-offset: .28em;
}
@media (max-width: 389px) {
  .header:has(.demo-exit:not([hidden])) { grid-template-columns: auto 1fr; }
  .header-utilities:has(.demo-exit:not([hidden])) { flex-wrap: wrap; row-gap: 0; }
}
.header-utilities .language { position: relative; }
.header-utilities .language::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  block-size: .9rem;
  border-inline-start: 1px solid var(--line);
  pointer-events: none;
}

/* Writing-sheet polish, using Damir Sokolovsky's Unslop method (CC BY 4.0). */
.desk-stationery .sample .writing-pad { padding-top: 0; }
.desk-stationery .pad-heading h3 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 500;
}
.desk-stationery .sample .pad-paper {
  height: clamp(9.5rem, 17vw, 14rem);
  border: 0;
  background: none;
}
.desk-stationery .pad-paper::before {
  inset-inline: 0;
  border-color: #8b775559;
}
.desk-stationery #signature-type { padding-inline: 0; }
.desk-stationery .paper-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 1rem;
}
.desk-stationery .pad-modes,
.desk-stationery .pad-actions,
.desk-stationery .nib-toggle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
}
.desk-stationery .pad-button,
.desk-stationery .choice {
  position: relative;
  min-inline-size: 44px;
  justify-content: center;
  padding-inline: .25rem;
  border: 0;
  color: var(--paper-ink);
  font-size: .78rem;
  font-weight: 500;
}
.desk-stationery .choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.desk-stationery .pad-button[aria-pressed="true"],
.desk-stationery .choice:has(input:checked) {
  color: var(--accent-paper);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .3em;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .desk-stationery .pad-button:hover:not(:disabled),
  .desk-stationery .choice:hover { color: var(--accent-paper); }
}
.desk-stationery .pad-button:focus-visible,
.desk-stationery .choice:has(input:focus-visible) {
  outline: 2px solid var(--accent-paper);
  outline-offset: -3px;
  border-radius: 2px;
}
.desk-stationery .pad-button:disabled { opacity: .48; }
.desk-stationery .paper-prompt { color: var(--paper-ink); font-size: .72rem; line-height: 1.5; }
@media (prefers-reduced-motion: no-preference) {
  .prepare-headings h2[data-typewriter] > [data-copy],
  [data-typewriter].awaiting-reveal > [data-copy] { opacity: 0; }
  [data-typewriter].reveal-heading > [data-copy] {
    display: inline-block;
    max-inline-size: 100%;
    animation: heading-type-in .76s cubic-bezier(.25, .55, .35, 1) both;
  }
  .paper-prompt.reveal-heading > [data-copy] { animation-duration: .46s; }
}
@keyframes heading-type-in {
  from { clip-path: inset(-.28em 100% -.28em -.12em); }
  to { clip-path: inset(-.28em -.12em -.28em -.12em); }
}
.desk-stationery .ink-proof { border: 0; margin-top: .5rem; }
.desk-stationery .sample-art { display: flex; justify-content: flex-end; column-gap: 1rem; }
.desk-stationery .ink-proof .specimen-cell { width: min(34%, 8.5rem); padding: 0; border: 0; }
@media (max-width: 480px) { .desk-stationery .paper-controls { column-gap: .5rem; } }
.desk-stationery .specimen-drawing::before,
.desk-stationery .specimen-drawing::after { content: none; }
@media (forced-colors: active) {
  .desk-stationery .pad-button:focus-visible,
  .desk-stationery .choice:has(input:focus-visible) { outline-color: Highlight; }
  .desk-stationery .pad-paper::before { border-color: CanvasText; }
}

/* The title sits alone on wide covers; scrolling turns to the pen. */
.hero.wrap {
  width: 100%;
  display: grid;
  justify-items: center;
}
.hero-copy {
  width: min(100% - 2 * var(--edge), 88rem);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(1.05rem, 2.45vw, 2.6rem);
  padding-block: clamp(3.25rem, 9svh, 6rem) clamp(2.85rem, 7svh, 4.8rem);
  text-align: center;
}
.hero h1 {
  font-size: clamp(3.9rem, 22vw, 11rem);
  letter-spacing: -.065em;
  line-height: .77;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero .edition {
  color: var(--lacquer);
  font-size: max(1.2rem, .246em);
  font-weight: 700;
  vertical-align: .35em;
}
.hero-imprint {
  color: var(--ivory);
  font: 500 clamp(.82rem, 1.03vw, .94rem)/1.4 var(--sans);
  letter-spacing: .13em;
}
.cover-art {
  position: relative;
  width: min(81%, 36rem);
  margin-block: .8rem clamp(3.65rem, 9svh, 6.75rem);
}
.cover-art img {
  width: 100%;
  height: auto;
  transform: rotate(-13deg);
  filter: drop-shadow(.5rem 1rem .85rem #030811a0);
}

@media (min-width: 1000px) {
  .hero-copy {
    min-height: max(23rem, calc(100svh - var(--header-height)));
    padding-block: clamp(2rem, 6svh, 5rem);
  }
  .hero h1 { font-size: clamp(8.75rem, min(16.8vw, 35svh), 16rem); }
  .cover-art {
    width: 100%;
    height: clamp(10rem, 17vw, 17rem);
    margin: 0;
    overflow: clip;
  }
  .cover-art img {
    position: absolute;
    inset-inline-end: max(-9%, -8rem);
    inset-block-start: 42%;
    width: clamp(40rem, 68vw, 71rem);
    max-width: none;
    transform: translateY(-38%) rotate(-13deg);
  }
}
@supports (animation-timeline: view()) {
  @media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
    .cover-art img {
      animation: turn-cover linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 96%;
    }
    @keyframes turn-cover {
      from { translate: 8% 18%; opacity: .52; }
      to { translate: 0; opacity: 1; }
    }
  }
}

/* The nib print is the largest object on the contact sheet. */
.contact-spread {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr);
  width: min(100%, 53rem);
}
.clip-print { --angle: -10deg; --offset: 13%; --rise: -.55rem; }
.seam-print { --angle: 8deg; --offset: -12%; --rise: 1.1rem; }
.contact-print.nib-print { --angle: -2deg; }
.clip-print .contact-image { aspect-ratio: 1.02; }
.clip-print img { width: 106%; left: -4%; }
.seam-print .contact-image { aspect-ratio: 1.1; }
.contact-print figcaption { padding-inline: .12rem; }
.viewer-rail {
  border-block-start: 1px solid var(--line);
  padding-block-start: .55rem;
}

@media (min-width: 1000px) {
  .object {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.45fr);
    align-items: center;
    gap: clamp(2rem, 4.8vw, 4.25rem) clamp(1.2rem, 3.4vw, 3.5rem);
    padding-block: clamp(4.35rem, 7.5vw, 7rem);
  }
  .object-heading {
    text-align: start;
    margin: 0;
  }
  .object-heading h2 { font-size: clamp(4rem, 8vw, 8rem); }
  :lang(bg) .object-heading h2 { font-size: clamp(3.5rem, 7.3vw, 7.3rem); }
  #object:focus-visible #object-title { margin-inline: 0 auto; }
  .contact-spread { margin: 0 0 0 auto; }
  .object-composition {
    grid-column: 1 / -1;
    width: 100%;
  }
}
@media (max-width: 600px) {
  .hero-copy { gap: 1.1rem; }
  .hero h1 { font-size: max(3.8rem, 21.3vw); }
  .contact-spread { margin-bottom: 1rem; }
  .clip-print { --angle: -7deg; --offset: 9%; --rise: -.32rem; }
  .seam-print { --angle: 6deg; --offset: -8%; --rise: .63rem; }
}
