@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/outfit-300.woff2") format("woff2");
}

:root {
  --paper: #f7f4f0;
  --ink: #4a443e;
  --muted: #9a9188;
  --rule: rgba(92, 78, 66, 0.16);
  --countdown-size: 0.84rem;
  /* Cormorant Garamond の大文字は Outfit の数字より低い。高さで 1.5 倍にするための倍率 */
  --brand-scale: 1.67;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Outfit", "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 42% 34% at 50% 46%, rgba(255, 255, 255, 0.95) 0%, transparent 68%),
    radial-gradient(ellipse 58% 46% at 16% 18%, rgba(255, 255, 255, 0.92) 0%, transparent 62%),
    radial-gradient(ellipse 46% 40% at 84% 16%, rgba(255, 228, 206, 0.55) 0%, transparent 64%),
    radial-gradient(ellipse 40% 36% at 78% 82%, rgba(226, 214, 240, 0.42) 0%, transparent 66%),
    radial-gradient(ellipse 44% 34% at 12% 84%, rgba(210, 226, 240, 0.4) 0%, transparent 64%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 46%, rgba(214, 204, 194, 0.28) 100%),
    linear-gradient(168deg, #fffcfa 0%, #f3efe9 48%, #f8f5f2 100%);
  background-size: 170% 170%, 160% 160%, 170% 170%, 160% 160%, 160% 160%, 100% 100%, 100% 100%;
  animation: pearl-drift 24s ease-in-out infinite alternate;
}

body::after {
  inset: -35%;
  z-index: 0;
  background: linear-gradient(
    112deg,
    transparent 38%,
    rgba(255, 255, 255, 0.05) 44%,
    rgba(255, 255, 255, 0.78) 49%,
    rgba(255, 244, 228, 0.34) 52%,
    rgba(230, 222, 248, 0.22) 56%,
    transparent 64%
  );
  opacity: 0.72;
  animation: pearl-luster 18s ease-in-out infinite;
}

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.35rem;
  min-height: 100vh;
  padding: 2.5rem 1.5rem;
  animation: stage-in 1.5s ease both;
}

.brand {
  margin: 0;
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: calc(var(--countdown-size) * var(--brand-scale));
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: var(--ink);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand {
    background-image: linear-gradient(
      102deg,
      #514b45 0%,
      #514b45 38%,
      #c2b4a4 46%,
      #fffaf4 50%,
      #c2b4a4 54%,
      #514b45 62%,
      #514b45 100%
    );
    background-size: 260% 100%;
    background-position: 120% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: brand-sheen 12s ease-in-out infinite;
  }
}

.brand::selection {
  color: var(--ink);
  background: rgba(196, 178, 160, 0.35);
}

.countdown {
  display: flex;
  align-items: stretch;
  gap: 1.4rem;
  margin: 0;
}

.countdown:not(.is-ready) .value {
  opacity: 0;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-width: 2.75rem;
  gap: 0.45rem;
}

.unit + .unit {
  padding-left: 1.4rem;
  border-left: 1px solid var(--rule);
}

.value {
  font-size: var(--countdown-size);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--ink);
}

.value[data-unit="days"] {
  min-width: 3.2ch;
  text-align: center;
}

.label {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  line-height: 1;
  color: var(--muted);
}

@keyframes pearl-drift {
  from {
    background-position:
      42% 40%,
      0% 0%,
      100% 0%,
      100% 100%,
      0% 100%,
      50% 50%,
      0% 0%;
  }

  to {
    background-position:
      58% 56%,
      14% 12%,
      82% 8%,
      86% 88%,
      10% 82%,
      50% 50%,
      0% 0%;
  }
}

@keyframes pearl-luster {
  0%,
  100% {
    transform: translate3d(-12%, 0, 0) rotate(8deg);
    opacity: 0.28;
  }

  50% {
    transform: translate3d(12%, 0, 0) rotate(8deg);
    opacity: 0.8;
  }
}

@keyframes brand-sheen {
  0%,
  46% {
    background-position: 125% 50%;
  }

  72%,
  100% {
    background-position: -25% 50%;
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .stage {
    gap: 1.85rem;
  }

  .countdown {
    gap: 0.8rem;
  }

  .unit {
    min-width: 2.2rem;
  }

  .unit + .unit {
    padding-left: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .brand,
  .stage {
    animation: none;
  }

  .brand {
    background: none;
    color: var(--ink);
  }
}
