@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --cream: #f4eadb;
  --muted: #c6b9aa;
  --red: #e3303c;
  --red-soft: #b92d33;
  --panel: rgba(17, 13, 11, .95);
  --border: rgba(244, 234, 219, .17);
  --scene-image: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #0b0908;
  color: var(--cream);
}

body {
  font-family: Montserrat, system-ui, sans-serif;
  overflow-x: hidden;
}

.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(250px, .72fr) minmax(250px, 1fr) auto;
  padding: clamp(28px, 4vw, 58px) clamp(28px, 6vw, 110px) clamp(28px, 4vw, 56px);
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: -4;
  background-image: var(--scene-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: none;
  image-rendering: auto;
}

.scene-shade {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(9,7,6,.02) 0%,
      rgba(9,7,6,0) 48%,
      rgba(9,7,6,.06) 72%,
      rgba(6,5,4,.18) 100%
    );
}

.hero {
  position: relative;
  align-self: start;
  justify-self: center;
  width: min(880px, 72vw);
  min-height: clamp(220px, 28vw, 330px);
  text-align: center;
  display: grid;
  place-items: start center;
  z-index: 2;
}

.hero-mask {
  display: none;
}

.hero-content {
  width: 100%;
}

.slogan {
  margin: 0 0 clamp(18px, 2vw, 30px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  text-transform: uppercase;
  letter-spacing: .46em;
  font-size: clamp(10px, .82vw, 14px);
  color: #e2d9ce;
  white-space: nowrap;
}

.slogan span {
  display: block;
  width: 42px;
  height: 1px;
  background: var(--red);
}

.countdown-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(10px, 1.2vw, 18px);
}

.countdown-main i {
  position: relative;
  width: 10px;
  height: clamp(64px, 6.7vw, 96px);
  margin: 2px 2px 0;
  background: transparent;
  opacity: .95;
}

.countdown-main i::before,
.countdown-main i::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--red);
  box-shadow: 0 0 10px rgba(227,48,60,.35);
}

.countdown-main i::before { top: 34%; }
.countdown-main i::after { top: 58%; }

.unit strong {
  display: flex;
  justify-content: center;
  gap: clamp(4px, .45vw, 8px);
  min-height: clamp(64px, 6.7vw, 96px);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: clamp(45px, 5.7vw, 84px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  text-shadow: 0 4px 12px rgba(0,0,0,.55);
}

.flip-digit {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: .72em;
  height: 1.08em;
  overflow: hidden;
  border-radius: .08em;
  color: #f4eadb;
  background:
    linear-gradient(180deg,
      rgba(42,38,35,.98) 0%,
      rgba(31,28,26,.99) 48.5%,
      rgba(18,16,15,.99) 49%,
      rgba(28,25,23,.99) 51%,
      rgba(20,18,17,.99) 100%);
  border: 1px solid rgba(244,234,219,.13);
  box-shadow:
    0 .08em .22em rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.flip-digit::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 49.2%;
  height: 1px;
  background: rgba(0,0,0,.86);
  box-shadow: 0 1px 0 rgba(255,255,255,.035);
  z-index: 2;
}

.flip-digit::after {
  content: "";
  position: absolute;
  top: calc(49.2% - 2px);
  left: 2px;
  right: 2px;
  height: 5px;
  background:
    linear-gradient(90deg,
      rgba(227,48,60,.75) 0 2px,
      transparent 2px calc(100% - 2px),
      rgba(227,48,60,.75) calc(100% - 2px));
  opacity: .7;
  z-index: 3;
  pointer-events: none;
}

.unit small {
  display: block;
  margin-top: clamp(10px, 1vw, 15px);
  font-size: clamp(8px, .72vw, 12px);
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #f0e6d9;
}

.status-grid {
  grid-row: 3;
  justify-self: center;
  width: min(1440px, 94vw);
  display: grid;
  grid-template-columns: 1.03fr 1.02fr 1.05fr;
  gap: clamp(10px, 1vw, 16px);
  z-index: 5;
}

.status-card {
  min-width: 0;
  min-height: 185px;
  padding: clamp(20px, 1.6vw, 28px) clamp(20px, 2vw, 34px);
  border: 1px solid var(--border);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(24,18,15,.97), rgba(13,11,10,.965));
  box-shadow:
    0 20px 50px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(13px);
}

.card-head,
.week-top,
.vacation-main {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.card-body,
.week-top > div:last-child {
  flex: 1;
  min-width: 0;
}

.status-icon {
  flex: 0 0 47px;
  width: 47px;
  height: 47px;
  color: var(--red);
}

.status-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-card h2 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(22px, 1.55vw, 28px);
  line-height: 1;
  font-weight: 600;
}

.work-time,
.vacation-time {
  margin-top: 2px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(35px, 2.65vw, 48px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-labels {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(18px, 2vw, 40px);
  margin-top: 8px;
  color: #d2c6ba;
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.progress-track {
  height: 11px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.11);
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d62f39, #ed3945);
  transition: width .5s linear;
}

.card-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0 0;
  color: #d0c2b4;
  font-size: 12px;
}

.note-icon {
  color: var(--red);
  font-size: 19px;
}

.week-top {
  align-items: center;
}

.week-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.week-summary strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 49px;
  font-weight: 600;
  line-height: .9;
}

.week-summary span {
  display: grid;
  gap: 2px;
  text-transform: uppercase;
}

.week-summary b,
.week-summary small {
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 500;
}

.week-summary small {
  color: #d6c9bd;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.week-day {
  min-width: 0;
  height: 71px;
  border: 1px solid rgba(244,234,219,.1);
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: rgba(255,255,255,.025);
  color: #d7cabc;
  font-size: 9px;
  text-transform: uppercase;
}

.week-dot {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
}

.week-day.done .week-dot {
  color: white;
  background: var(--red);
}

.week-day.off .week-dot {
  border-color: transparent;
  color: var(--cream);
  background: rgba(255,255,255,.06);
  border-radius: 7px;
  font-size: 19px;
}

.week-day.bridge .week-dot {
  color: #19110d;
  background: #f5d7a0;
}

.week-day.today {
  border-color: rgba(227,48,60,.55);
  box-shadow: inset 0 0 0 1px rgba(227,48,60,.18);
}

.week-note {
  min-height: 16px;
  margin-top: 8px;
  color: #cfc2b5;
  font-size: 11px;
}

.vacation-card {
  display: grid;
  align-content: start;
}

.vacation-labels {
  gap: 25px;
}

.vacation-detail {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr 86px;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  min-height: 60px;
}

.vacation-detail .plane {
  color: var(--red);
  font-size: 25px;
  transform: rotate(-12deg);
}

.vacation-detail strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  line-height: 1.05;
}

.vacation-detail span {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: #d5c7ba;
}

.vacation-thumb {
  width: 78px;
  height: 74px;
  justify-self: end;
  border-radius: 9px;
  overflow: hidden;
  background:
    linear-gradient(155deg, #84b7cf 0 44%, #e4d3a3 44% 59%, #4e744f 59% 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  opacity: .75;
}

.vacation-thumb.empty {
  display: none;
}

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

@media (min-aspect-ratio: 2/1) {
  .scene-bg { background-size: 100% auto; }
}

@media (max-width: 900px) {
  .scene {
    min-height: auto;
    grid-template-rows: auto minmax(300px, 50vh) auto;
    padding: 24px 14px 18px;
  }

  .scene-bg {
    background-position: 50% 20%;
    background-size: auto 68vh;
  }

  .scene-shade {
    background: linear-gradient(180deg, rgba(8,6,5,.03), rgba(8,6,5,0) 55%, rgba(8,6,5,.24) 82%, rgba(8,6,5,.38) 100%);
  }

  .hero {
    width: 100%;
    min-height: 245px;
  }

  .hero-mask {
    left: -15%;
    right: -15%;
    top: -18%;
    height: 120%;
  }

  .slogan {
    gap: 11px;
    letter-spacing: .27em;
  }

  .slogan span { width: 24px; }

  .countdown-main {
    gap: 7px;
  }

  .countdown-main i {
    height: 60px;
  }

  .unit strong {
    font-size: clamp(36px, 10vw, 58px);
    gap: 3px;
  }

  .unit small {
    margin-top: 11px;
    font-size: 7px;
    letter-spacing: .15em;
  }

  .status-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .status-card {
    min-height: auto;
  }

  .vacation-detail {
    grid-template-columns: 30px 1fr 70px;
  }

  .vacation-thumb {
    width: 64px;
    height: 60px;
  }
}

@media (max-width: 420px) {
  .scene {
    grid-template-rows: auto minmax(240px, 44vh) auto;
  }

  .slogan {
    font-size: 8px;
    letter-spacing: .2em;
  }

  .unit strong {
    font-size: 34px;
    gap: 2px;
  }

  .countdown-main i {
    height: 42px;
    width: 6px;
  }

  .status-card {
    padding: 18px;
  }

  .status-icon {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .work-time,
  .vacation-time {
    font-size: 34px;
  }

  .time-labels {
    gap: 16px;
    font-size: 7px;
  }
}


/* Finished/off workday states: keep the card calm once the day is over. */
.work-card.is-done h2,
.work-card.is-done .time-labels {
  display: none;
}

.work-card.is-done .card-head {
  align-items: center;
}

.work-card.is-done .work-time {
  margin-top: 0;
  font-size: clamp(38px, 2.9vw, 52px);
}

.work-card.is-off .time-labels {
  display: none;
}
