:root {
  --carta: #f4efe6;
  --carta-buia: #e9e1d3;
  --testo: #1d1b19;
  --grigio: #7d766d;
  --inchiostro: #24379a;
  --inchiostro-bagnato: #4766e6;
  --inchiostro-pozza: #0d1647;
  --lacca: #1f2b66;
  --lacca-luce: #7d8ccf;
  --lacca-buio: #0b1131;
  --l: 300px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--carta);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* a paper grain, barely there */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.38  0 0 0 0 0.28  0 0 0 0.09 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: min(4vh, 28px) 16px;
}

.hero {
  position: relative;
  width: min(100%, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 12px 5px 8px;
  border: 1px solid rgba(29, 27, 25, 0.1);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.8);
  font-size: clamp(11px, 1.7vh, 13px);
  font-weight: 560;
  letter-spacing: 0.02em;
}
.hero__brand svg { width: 16px; height: 16px; fill: none; stroke: var(--testo); stroke-width: 1.3; stroke-linejoin: round; }

.title {
  width: min(100%, 640px, 150vh);
  margin: min(1.4vh, 10px) 0 0;
}
.title__svg { display: block; width: 100%; height: auto; overflow: visible; }
.title__rule { stroke: var(--testo); stroke-opacity: 0.12; stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; }

.ink { font-family: "Pinyon Script", cursive; font-weight: 400; }
.ink--dry { fill: var(--inchiostro); }
.ink--pool { fill: var(--inchiostro-pozza); fill-opacity: 0.7; }
.ink--wet { fill: var(--inchiostro-bagnato); }

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

.hero__sub {
  max-width: 34ch;
  margin: min(0.6vh, 6px) 0 0;
  font-size: clamp(12.5px, 2.2vh, 16px);
  line-height: 1.45;
  color: var(--grigio);
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: min(2.4vh, 18px);
}
.hero__btn {
  display: inline-block;
  padding: min(1.5vh, 11px) 20px;
  border-radius: 999px;
  background: var(--testo);
  color: var(--carta);
  font-size: clamp(12px, 1.9vh, 14px);
  font-weight: 560;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 16px -8px rgba(29, 27, 25, 0.6);
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1), background-color 0.2s;
}
@media (hover: hover) {
  .hero__btn:hover { background: var(--inchiostro); transform: translateY(-1px); }
}
.hero__btn:active { transform: translateY(1px) scale(0.98); }
.hero__note { font-size: clamp(11.5px, 1.8vh, 13px); color: var(--grigio); }

/* the place on the desk where the pen rests */
.desk {
  width: 100%;
  height: calc(var(--l) * 0.2 + 2vh);
  margin-top: min(2vh, 16px);
}

.hero__hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--grigio);
  opacity: 0.8;
}

/* the pen, the cap and their shadows share one box: the nib tip is its origin */
.pen, .cap, .shade {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--l);
  height: calc(var(--l) / 10);
  transform-origin: calc(var(--l) * 0.015) 50%;
  pointer-events: none;
  will-change: transform;
}
.pen svg, .cap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pen { pointer-events: auto; cursor: pointer; z-index: 2; }
.cap { pointer-events: none; }

.shade i {
  position: absolute;
  left: 2%;
  right: 0.5%;
  top: 20%;
  bottom: 18%;
  border-radius: 999px;
  background: rgba(46, 34, 18, 0.55);
  filter: blur(var(--b, 3px));
}
.shade--pen i { left: 2%; }
.shade[data-shade="cap"] i { left: 0.5%; right: 67%; top: 14%; bottom: 14%; }
