:root {
  --cream: #f3ead8;        /* le pareti della prima pagina */
  --ink: #1f2a2c;          /* le scritte sul crema */
  --lagoon: #1f6f6a;       /* il verde laguna della seconda pagina */
  --foam: #f1ece1;         /* le scritte sul verde */
  --accent: #e2582b;       /* il terracotta del pulsante */
  --tape: #e9d8a6;         /* il nastro di carta */
  --tray: #e7e1d7;         /* la vaschetta di plastica */
  --wood: #c48a4f;         /* il manico di legno */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--cream);
  font-family: 'Instrument Sans Variable', system-ui, sans-serif;
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  max-height: 100vh;
  overflow: hidden;
}

/* ---- the two pages ---- */
.page {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(14px, min(3.4vw, 4vh), 40px) clamp(16px, 4vw, 56px);
  visibility: hidden;
}
.page.is-on { visibility: visible; }
.page--a { background: var(--cream); color: var(--ink); --chipline: rgba(31, 42, 44, .16); }
.page--b { background: var(--lagoon); color: var(--foam); --chipline: rgba(241, 236, 225, .22); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(12px, min(1.4vw, 2.2vh), 15px);
  font-stretch: 92%;
  font-weight: 560;
}
.brand { display: inline-flex; align-items: center; gap: .5em; letter-spacing: .01em; }
.brand__mark { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.nav { display: flex; gap: clamp(12px, 2.4vw, 28px); }
.nav__link {
  position: relative;
  color: inherit;
  text-decoration: none;
  opacity: .62;
  transition: opacity .3s;
}
.nav__link.is-here { opacity: 1; }
/* a dab of paint behind the link, not an underline */
.nav__link::before {
  content: '';
  position: absolute;
  left: -6px; right: -6px; top: 52%;
  height: .62em;
  border-radius: 40% 60% 55% 45% / 60% 50% 50% 40%;
  background: var(--accent);
  opacity: 0;
  transform: translateY(-50%) scaleX(.2) rotate(-2deg);
  transform-origin: left center;
  transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), opacity .25s;
  z-index: -1;
}
@media (hover: hover) {
  .nav__link:hover { opacity: 1; }
  .nav__link:hover::before { opacity: .28; transform: translateY(-50%) scaleX(1) rotate(-2deg); }
}

.body {
  align-self: center;
  max-width: min(44rem, 78%);
}
.kicker {
  font-size: clamp(11px, min(1.2vw, 1.9vh), 13px);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: clamp(8px, 1.6vh, 18px);
}
.title {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 560;
  font-size: clamp(30px, min(8.4vw, 11.5vh), 112px);
  line-height: .98;
  letter-spacing: -.02em;
  font-variation-settings: 'SOFT' 100, 'WONK' 1, 'opsz' 144;
}
.title__line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.title__in { display: inline-block; }
.lede {
  margin-top: clamp(10px, 2vh, 22px);
  max-width: 30em;
  font-size: clamp(13px, min(1.6vw, 2.4vh), 18px);
  line-height: 1.45;
  opacity: .82;
}

.go {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  margin-top: clamp(12px, 2.8vh, 30px);
  padding: .78em 1.1em .78em .8em;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8ee;
  text-decoration: none;
  font-size: clamp(12px, min(1.45vw, 2.2vh), 16px);
  font-weight: 600;
  font-stretch: 96%;
  box-shadow: 0 6px 18px -8px rgba(120, 40, 10, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: font-stretch .45s cubic-bezier(.3, 1.6, .5, 1), transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.go__chip {
  width: 1.15em; height: 1.15em;
  border-radius: 3px;
  background: var(--lagoon);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
  transform: rotate(-8deg);
  transition: transform .5s cubic-bezier(.3, 1.8, .5, 1);
}
.page--b .go__chip { background: var(--cream); }
.go__arrow { width: 1.5em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
@media (hover: hover) {
  .go:hover { font-stretch: 112%; transform: translateY(-1px); }
  .go:hover .go__chip { transform: rotate(12deg) scale(1.12); }
  .go:hover .go__arrow { transform: translateX(3px); }
}
.go:active { transform: translateY(1px) scale(.98); }
.go:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* three paint chips on the right, like a fan deck */
.chips {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  top: 50%;
  display: grid;
  gap: 8px;
  transform: translateY(-50%) rotate(4deg);
  width: clamp(70px, min(13vw, 18vh), 170px);
}
.chip {
  display: block;
  height: clamp(30px, min(5.6vw, 8vh), 70px);
  border-radius: 4px;
  background: var(--c);
  box-shadow: 0 0 0 1px var(--chipline), 0 8px 18px -12px rgba(0, 0, 0, .5);
  position: relative;
}
.chip b {
  position: absolute;
  left: 8px; bottom: 5px;
  font-size: clamp(9px, min(1vw, 1.5vh), 11px);
  font-weight: 600;
  color: rgba(31, 42, 44, .78);
  background: rgba(255, 255, 255, .78);
  padding: 1px 5px;
  border-radius: 2px;
}

.foot {
  display: flex;
  justify-content: space-between;
  font-size: clamp(11px, min(1.2vw, 1.9vh), 13px);
  opacity: .6;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 25%, transparent);
  padding-top: 10px;
}

/* ---- the painting ---- */
.paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.sheen { opacity: 0; }
.streaks { opacity: .9; }
.tray { visibility: hidden; }
.tray__shadow { fill: rgba(0, 0, 0, .16); filter: blur(4px); }
.tray__body { stroke: rgba(0, 0, 0, .14); stroke-width: 1; }
.tray__poolshine { fill: rgba(255, 255, 255, .28); }
.tray__ribs path { stroke: rgba(0, 0, 0, .12); stroke-width: 1.4; stroke-linecap: round; fill: none; }
.tray__lip { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 1.5; }
.roller { visibility: hidden; }
.roller__shadow { fill: rgba(0, 0, 0, .14); filter: blur(5px); }
.roller__wire { fill: none; stroke: #6f787f; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.roller__wireshine { fill: none; stroke: #dfe5e9; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.roller__handle { stroke: rgba(70, 35, 10, .35); stroke-width: 1; }
.roller__grain path { stroke: rgba(80, 40, 12, .3); stroke-width: .9; fill: none; stroke-linecap: round; }
.roller__hole { fill: rgba(40, 20, 6, .55); }
.sleeve__base { fill: #f4efe6; }
.sleeve__cap { fill: #8f979d; stroke: rgba(0, 0, 0, .25); stroke-width: 1; }

/* masking tape */
.tape {
  position: absolute;
  left: 0; right: 0;
  height: clamp(10px, min(1.8vw, 2.6vh), 22px);
  background:
    repeating-linear-gradient(90deg, rgba(120, 90, 30, .06) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(0, 0, 0, .06)),
    var(--tape);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  z-index: 6;
  visibility: hidden;
  transform-origin: left center;
}
.tape--top { top: 0; }
.tape--bottom { bottom: 0; }
.tape__tear {
  position: absolute;
  right: -6px; top: 0; bottom: 0;
  width: 12px;
  background: inherit;
  clip-path: polygon(0 0, 50% 0, 30% 18%, 60% 34%, 35% 52%, 62% 70%, 32% 86%, 50% 100%, 0 100%);
}

@media (max-width: 640px) {
  .body { max-width: 74%; }
  .chips { width: 58px; gap: 6px; right: 14px; }
  .chip { height: 34px; }
  .chip b { display: none; }
  .lede { max-width: 18em; }
}

@media (prefers-reduced-motion: reduce) {
  .go, .go__chip, .go__arrow, .nav__link::before { transition: none; }
}
