/* Hourline, the booking page of a 30 minute intro call: who meets you, the week, the open times and the time zone */
:root {
  --carta: #f4f1ec;            /* warm white page */
  --card: #fffdfa;             /* the card */
  --inchiostro: #1b1a18;       /* type and the chosen day */
  --grigio: #8b867e;           /* small type */
  --spento: #c9c4bb;           /* full days */
  --filo: rgba(27, 26, 24, 0.1); /* hairlines */
  --filo-forte: rgba(27, 26, 24, 0.2);
  --accento: #3b4fd8;          /* the one accent: ink blue */
  --accento-velo: rgba(59, 79, 216, 0.09);
  --raggio: 20px;
  --bordo: clamp(12px, 3vw, 40px);
  --slot-h: clamp(34px, 7.2vh, 44px);
  --slot-gap: clamp(6px, 1.4vh, 9px);
  --giorno-h: clamp(46px, 11.5vh, 64px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, #faf8f4 0%, var(--carta) 60%);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  font-weight: 400;
  overflow: hidden;
}
p, h1, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.pagina {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--bordo);
}

.card {
  position: relative;
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  background: var(--card);
  border-radius: var(--raggio);
  box-shadow:
    0 0 0 1px rgba(27, 26, 24, 0.06),
    0 1px 1px rgba(27, 26, 24, 0.04),
    0 6px 14px -6px rgba(27, 26, 24, 0.1),
    0 28px 60px -24px rgba(40, 36, 30, 0.22);
  overflow: hidden;
  isolation: isolate;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 30%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
  z-index: 3;
}
.card__luce {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--x, 50%) var(--y, 30%), rgba(59, 79, 216, 0.06), transparent 70%);
  z-index: 0;
}

/* ---- who meets you ---- */
.chi {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3.6vh, 28px) 22px;
  border-right: 1px solid var(--filo);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.2vh, 16px);
}
.marchio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--grigio);
}
.chi__testa { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 6px 14px -6px rgba(27, 26, 24, 0.45), 0 0 0 3px var(--card), 0 0 0 4px var(--filo);
  flex: none;
}
.avatar svg { display: block; width: 100%; height: 100%; }
.chi__nome { font-size: 14px; font-weight: 600; }
.chi__ruolo { font-size: 12px; color: var(--grigio); margin-top: 2px; }
.chi__titolo {
  font-size: clamp(19px, 3.2vh, 23px);
  font-weight: 640;
  font-stretch: 92%;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.chi__dati { display: grid; gap: 8px; font-size: 13px; color: #55514b; }
.chi__dati li { display: flex; align-items: center; gap: 8px; }
.chi__dati svg { color: var(--grigio); flex: none; }
.chi__nota { font-size: 12.5px; line-height: 1.5; color: var(--grigio); }

/* ---- the week, the zone, the times ---- */
.destra {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3.6vh, 28px) 24px clamp(18px, 3.6vh, 26px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 14px);
  min-width: 0;
}
.destra__titolo { font-size: 15px; font-weight: 600; }

.giorni {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.giorni__pillola {
  position: absolute;
  left: 0;
  top: 0;
  height: var(--giorno-h);
  width: 40px;
  border-radius: 14px;
  background: var(--inchiostro);
  box-shadow: 0 8px 18px -8px rgba(27, 26, 24, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  opacity: 0;
  pointer-events: none;
}
.giorno {
  position: relative;
  height: var(--giorno-h);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: color 0.25s;
}
.giorno::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--filo);
  pointer-events: none;
  transition: box-shadow 0.25s;
}
.giorno__sett { font-size: 11px; color: var(--grigio); transition: color 0.25s; }
.giorno__num { font-size: clamp(15px, 2.8vh, 18px); font-weight: 600; font-variant-numeric: tabular-nums; }
.giorno.is-scelto { color: #fbf9f6; }
.giorno.is-scelto .giorno__sett { color: rgba(251, 249, 246, 0.6); }
.giorno.is-scelto::after { box-shadow: inset 0 0 0 1px transparent; }
.giorno.is-pieno { cursor: default; color: var(--spento); }
.giorno.is-pieno .giorno__sett { color: var(--spento); }
.giorno.is-pieno::after { box-shadow: none; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(27, 26, 24, 0.035) 5px 6px); }
.giorno.is-pieno .giorno__num { text-decoration: line-through; text-decoration-thickness: 1px; }
@media (hover: hover) {
  .giorno:not(.is-pieno):not(.is-scelto):hover::after { box-shadow: inset 0 0 0 1px var(--filo-forte); }
}

.riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
}
.riga__data { font-size: 13px; font-weight: 600; white-space: nowrap; }
.finestra {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  height: 1.35em;
  line-height: 1.35em;
}
.finestra__in { display: inline-block; }

.fuso-box { position: relative; }
.fuso {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  font-size: 12px;
  color: #55514b;
  box-shadow: inset 0 0 0 1px var(--filo);
  white-space: nowrap;
}
.fuso svg { color: var(--grigio); flex: none; }
.fuso__pre { color: var(--grigio); }
.fuso__finestra { color: var(--inchiostro); font-weight: 560; }
.fuso__giu { transition: transform 0.3s; }
.fuso[aria-expanded='true'] .fuso__giu { transform: rotate(180deg); }
@media (hover: hover) { .fuso:hover { box-shadow: inset 0 0 0 1px var(--filo-forte); } }

.fusi {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(27, 26, 24, 0.08), 0 16px 34px -12px rgba(27, 26, 24, 0.3);
  z-index: 5;
  visibility: hidden;
  opacity: 0;
  transform-origin: 85% 0;
}
.fusi button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  text-align: left;
}
.fusi__gmt { color: var(--grigio); font-variant-numeric: tabular-nums; }
.fusi button[aria-selected='true'] { background: var(--accento-velo); color: var(--accento); }
.fusi button[aria-selected='true'] .fusi__gmt { color: var(--accento); opacity: 0.7; }
.fusi button.is-su { background: rgba(27, 26, 24, 0.05); }
@media (hover: hover) { .fusi button:hover { background: rgba(27, 26, 24, 0.05); } }

.orari {
  position: relative;
  height: calc(var(--slot-h) * 4 + var(--slot-gap) * 3);
  display: flex;
  flex-direction: column;
  gap: var(--slot-gap);
}
.orari__vuoto {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--grigio);
  border-radius: 14px;
  background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(27, 26, 24, 0.025) 7px 8px);
  box-shadow: inset 0 0 0 1px var(--filo);
}

.slot {
  position: relative;
  height: var(--slot-h);
  flex: none;
}
.slot__ora,
.slot__ok {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot__ora {
  left: 0;
  width: 100%;
  color: var(--accento);
  background: var(--card);
  box-shadow: inset 0 0 0 1px rgba(59, 79, 216, 0.28), 0 1px 2px rgba(27, 26, 24, 0.04);
  overflow: hidden;
}
.slot__ora::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at var(--x, 50%) 50%, rgba(59, 79, 216, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.slot__ora.is-su::before { opacity: 1; }
.slot__ora.is-su { box-shadow: inset 0 0 0 1.5px var(--accento), 0 6px 14px -8px rgba(59, 79, 216, 0.5); }
.slot.is-aperto .slot__ora {
  color: #fbf9f6;
  background: #55514b;
  box-shadow: inset 0 0 0 1px transparent;
}
.slot__ora .tempo { position: relative; display: inline-flex; }
.slot__ok {
  right: 0;
  width: 50%;
  color: #fbf9f6;
  background: linear-gradient(180deg, #4659e0, var(--accento));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 18px -8px rgba(59, 79, 216, 0.8);
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}
.slot__ok::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(var(--lx, 0%)) skewX(-16deg);
}

.cifra { display: inline-block; height: 1.3em; line-height: 1.3em; overflow: hidden; }
.cifra__in { display: flex; flex-direction: column; }

/* ---- booked ---- */
.fatto {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--card);
  padding: clamp(18px, 3.6vh, 28px) 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4px, 1vh, 8px);
  visibility: hidden;
  clip-path: inset(0 round 12px);
}
.fatto__spunta { width: clamp(34px, 7vh, 44px); height: auto; margin-bottom: clamp(2px, 1vh, 8px); }
.fatto__cerchio { fill: var(--accento-velo); stroke: var(--accento); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: 22px 22px; }
.fatto__segno { fill: none; stroke: var(--accento); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.fatto__titolo { font-size: clamp(18px, 3.4vh, 22px); font-weight: 640; font-stretch: 92%; letter-spacing: -0.015em; }
.fatto__quando { font-size: 13px; font-weight: 560; }
.fatto__nota { font-size: 12.5px; color: var(--grigio); }
.linea {
  --ora-h: clamp(30px, 8vh, 54px);
  position: relative;
  align-self: stretch;
  margin-top: auto;
  height: calc(var(--ora-h) * 3);
  padding-left: 46px;
}
.linea__ora {
  height: var(--ora-h);
  border-top: 1px solid var(--filo);
  position: relative;
}
.linea__ora span {
  position: absolute;
  left: -46px;
  top: -0.6em;
  font-size: 11px;
  color: var(--grigio);
}
.linea__altro,
.evento {
  position: absolute;
  left: 52px;
  right: 6px;
  border-radius: 9px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  overflow: hidden;
}
.linea__altro {
  top: calc(var(--ora-h) * 2 + 3px);
  height: calc(var(--ora-h) * 0.5 - 5px);
  color: var(--grigio);
  background: repeating-linear-gradient(135deg, rgba(27, 26, 24, 0.035) 0 6px, rgba(27, 26, 24, 0.06) 6px 7px);
}
.evento {
  top: 0;
  height: calc(var(--ora-h) * 0.5 - 5px);
  color: var(--accento);
  font-weight: 600;
  padding-left: 14px;
  background: #eef0fd;
  box-shadow: 0 0 0 1px rgba(59, 79, 216, 0.12), 0 10px 20px -10px rgba(59, 79, 216, 0.55);
}
.evento::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 2px;
  background: var(--accento);
}
.evento__ora { font-weight: 500; opacity: 0.75; }

/* ---- phone, and short screens ---- */
@media (max-width: 600px) {
  .card { grid-template-columns: 1fr; }
  .chi {
    border-right: 0;
    border-bottom: 1px solid var(--filo);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: 'testa titolo' 'testa dati';
    column-gap: 10px;
    row-gap: 2px;
  }
  .marchio, .chi__nota, .chi__nomi { display: none; }
  .chi__testa { grid-area: testa; }
  .avatar { width: 36px; height: 36px; }
  .chi__titolo { grid-area: titolo; font-size: 16px; align-self: end; }
  .chi__dati { grid-area: dati; display: flex; gap: 12px; font-size: 12px; }
  .chi__dati svg { width: 13px; height: 13px; }
  .destra { padding: 12px 14px 14px; gap: 10px; }
  .destra__titolo { display: none; }
  .giorni { gap: 3px; }
  .giorno, .giorni__pillola { border-radius: 11px; }
  .giorno__sett { font-size: 10px; }
  .fuso__pre { display: none; }
  .fatto { padding: 12px 14px; }
  .fatto__nota { display: none; }
  .linea { --ora-h: clamp(28px, 7vh, 40px); }
}
@media (max-height: 560px) and (min-width: 601px) {
  .chi__nota { display: none; }
}
