:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --inchiostro: #141413;
  --grigio: #8a8781;
  --filo: #e9e7e2;
  --tacca: #cfccc5;
  --bordo: #ecebe6;
  --accento: #ff4d12;
}

*, *::before, *::after { box-sizing: border-box; }

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

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 14px;
  overflow: hidden;
}

/* the component: one product-page snippet */
.ship {
  position: relative;
  width: min(360px, 90vw);
  padding: clamp(16px, 4.6vw, 20px) clamp(16px, 5vw, 22px) clamp(14px, 4vw, 18px);
  border: 1px solid var(--bordo);
  border-radius: 18px;
  background: var(--carta);
  box-shadow: 0 1px 1px rgba(20, 20, 19, 0.03), 0 10px 30px -18px rgba(20, 20, 19, 0.18);
  outline: none;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}
.ship:focus-visible { border-color: var(--inchiostro); }
@media (hover: hover) {
  .ship:hover { box-shadow: 0 1px 1px rgba(20, 20, 19, 0.03), 0 16px 36px -18px rgba(20, 20, 19, 0.24); }
}

.ship__top {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 22px;
}

.ship__ico {
  flex: none;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
}
.ship__ico svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
  overflow: visible;
}
.ico__seam { stroke: var(--grigio); }
.ico__lid { stroke: var(--accento); stroke-width: 1.4; }

/* labels that swap in place */
.swap {
  position: relative;
  display: block;
  height: 1.3em;
  overflow: hidden;
  clip-path: inset(-2px -4px);
}
.swap__t {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  white-space: nowrap;
  line-height: 1.3;
  --w: 100;
  font-variation-settings: "wdth" var(--w);
}
.swap--ships {
  flex: 1 1 auto;
  font-size: clamp(15px, 4.3vw, 16.5px);
  font-weight: 620;
  letter-spacing: -0.01em;
}
.swap--date {
  flex: none;
  width: 9.4em;
  font-size: clamp(12px, 3.4vw, 13px);
  color: var(--grigio);
  font-weight: 450;
}
.swap--date .swap__t { left: auto; right: 0; }

.ship__left {
  margin: 6px 0 0 28px;
  font-size: clamp(13px, 3.8vw, 14px);
  line-height: 1.35;
  color: var(--grigio);
  display: flex;
  align-items: center;
  gap: 0.32em;
  white-space: nowrap;
}

.time {
  display: inline-flex;
  align-items: center;
  line-height: 1.35;
  color: var(--inchiostro);
  font-weight: 600;
  font-variant-numeric: proportional-nums;
}
.time__h {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
.time__u { font-weight: 480; }

/* the odometer: a row of one-line windows */
.odo {
  display: inline-flex;
  align-items: center;
}
.odo__slot {
  position: relative;
  display: inline-block;
  height: 1.35em;
  overflow: hidden;
  clip-path: inset(0);
}
.odo__ch {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  line-height: 1.35;
}

/* the ruler of the day */
.track {
  position: relative;
  height: 46px;
  margin-top: 16px;
  overflow: hidden;
}
.track__base,
.track__rest {
  position: absolute;
  left: 0;
  top: 22px;
  width: 100%;
  height: 1px;
  transform-origin: 0 50%;
}
.track__base { background: var(--filo); }
.track__rest {
  top: 21.5px;
  height: 2px;
  background: var(--accento);
  border-radius: 2px;
  transition: height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.track__ticks { position: absolute; inset: 0; }
.tick {
  position: absolute;
  left: 0;
  top: 17px;
  width: 1px;
  height: 5px;
  background: var(--tacca);
}
.tick--mid { top: 14px; height: 8px; background: var(--grigio); }
.tick__day {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--grigio);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.cut,
.now {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 46px;
}
.cut__bar {
  position: absolute;
  left: -0.75px;
  top: 15px;
  width: 1.5px;
  height: 15px;
  border-radius: 1px;
  background: var(--accento);
  transform-origin: 50% 50%;
  transition: background-color 0.5s ease;
}
.cut.is-past .cut__bar { background: var(--tacca); }

.now__bar {
  position: absolute;
  left: -0.75px;
  top: 12px;
  width: 1.5px;
  height: 21px;
  border-radius: 1px;
  background: var(--inchiostro);
  transform-origin: 50% 100%;
}

.track__cutlabel,
.track__nowlabel {
  position: absolute;
  left: 0;
  width: max-content;
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.track__cutlabel { top: 34px; color: var(--accento); font-weight: 560; }
.track__nowlabel {
  top: 0;
  color: var(--inchiostro);
  font-weight: 560;
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* the second state: hover, focus or tap */
.ship.is-open .track__nowlabel { opacity: 1; }
.ship.is-open .track__rest { top: 21px; height: 3px; }

.measure {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .track__rest, .ship { transition: none; }
}
