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

html,
body {
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --paper: #f2eee5;
  --ink: #34322f;
  --muted: #55514c;
  --coral: #e98074;
  --coral-action: #b84f45;
  --coral-deep: #963d35;
  --sand: #ddd0bd;
  --taupe: #b9aca0;
}

html {
  background: var(--paper);
}

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", "Avenir Next", Avenir, Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

.hero__visual {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__shape {
  --drift-x: 34px;
  --drift-y: -26px;
  --shape-rotate: 0deg;
  position: absolute;
  display: block;
  border: 1px solid rgb(113 98 85 / 5%);
  border-radius: 50%;
  animation: shape-drift 22s ease-in-out infinite alternate;
  transform: translate3d(0, 0, 0) rotate(var(--shape-rotate)) scale(1);
  transform-origin: center;
  will-change: transform;
}

.hero__shape--one {
  --drift-x: -48px;
  --drift-y: 38px;
  top: -34%;
  right: -11%;
  width: 58vw;
  aspect-ratio: 1;
  background: rgb(221 208 189 / 18%);
  animation-duration: 21s;
  animation-delay: -7s;
}

.hero__shape--two {
  --drift-x: 40px;
  --drift-y: 52px;
  top: -29%;
  right: 18%;
  width: 45vw;
  aspect-ratio: 1;
  background: rgb(185 172 160 / 8%);
  animation-duration: 17s;
  animation-delay: -11s;
}

.hero__shape--three {
  --drift-x: -54px;
  --drift-y: -35px;
  --shape-rotate: -18deg;
  right: -25%;
  bottom: -30%;
  width: 67vw;
  aspect-ratio: 1.18;
  background: rgb(185 172 160 / 11%);
  animation-duration: 23s;
  animation-delay: -5s;
}

.hero__shape--four {
  --drift-x: 64px;
  --drift-y: -40px;
  --shape-rotate: -10deg;
  right: -5%;
  bottom: -48%;
  width: 77vw;
  aspect-ratio: 1.6;
  background: rgb(233 128 116 / 18%);
  animation-duration: 25s;
  animation-delay: -18s;
}

.hero__shape--five {
  --drift-x: -45px;
  --drift-y: 48px;
  --shape-rotate: 26deg;
  right: 20%;
  bottom: -45%;
  width: 50vw;
  aspect-ratio: 0.9;
  background: rgb(221 208 189 / 15%);
  animation-duration: 18s;
  animation-delay: -9s;
}

@keyframes shape-drift {
  from {
    transform:
      translate3d(0, 0, 0)
      rotate(var(--shape-rotate))
      scale(1);
  }

  to {
    transform:
      translate3d(var(--drift-x), var(--drift-y), 0)
      rotate(calc(var(--shape-rotate) + 2deg))
      scale(1.035);
  }
}

.hero__scale {
  --progress-angle: 0deg;
  --marker-angle: 0deg;
  position: absolute;
  top: 50%;
  left: 68%;
  width: min(74vh, 53vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hero__circle,
.hero__ticks,
.hero__marker-track {
  position: absolute;
  border-radius: inherit;
}

.hero__circle {
  inset: 2.8%;
  border: 1px solid rgb(52 50 47 / 12%);
}

.hero__ticks {
  inset: 0;
  background: conic-gradient(
    from 0deg,
    rgb(211 116 105 / 68%) 0deg var(--progress-angle),
    rgb(52 50 47 / 8%) var(--progress-angle) 360deg
  );
  -webkit-mask-image:
    radial-gradient(
      farthest-side,
      transparent calc(100% - 9px),
      #000 calc(100% - 8px)
    ),
    repeating-conic-gradient(
      #000 0deg 0.48deg,
      transparent 0.48deg 2deg
    );
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(
      farthest-side,
      transparent calc(100% - 9px),
      #000 calc(100% - 8px)
    ),
    repeating-conic-gradient(
      #000 0deg 0.48deg,
      transparent 0.48deg 2deg
    );
  mask-composite: intersect;
}

.hero__marker-track {
  inset: 2.8%;
  transform: rotate(var(--marker-angle));
  transition: transform 240ms linear;
}

.hero__marker {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--coral-action);
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-50%, -50%);
}

.hero__countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  color: rgb(201 91 80 / 88%);
  font-family: "Helvetica Neue", "Avenir Next", Avenir, Arial, sans-serif;
  font-size: clamp(3rem, 4.25vw, 4.8rem);
  font-variant-numeric: tabular-nums;
  font-weight: 100;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(43vw, 650px);
  margin-right: min(45vw, 690px);
  transform: translateY(-1vh);
}

.hero__content::before {
  position: absolute;
  inset: -45px -55px;
  z-index: -1;
  content: "";
  background: radial-gradient(
    ellipse at 42% 50%,
    rgb(242 238 229 / 96%) 0%,
    rgb(242 238 229 / 88%) 46%,
    rgb(242 238 229 / 52%) 62%,
    transparent 80%
  );
  border-radius: 46%;
  filter: blur(14px);
  pointer-events: none;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Helvetica Neue", "Avenir Next", Avenir, Arial, sans-serif;
  font-size: clamp(3rem, 4.4vw, 5rem);
  font-weight: 100;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

.hero__content p {
  max-width: 510px;
  margin: clamp(28px, 4.2vh, 46px) 0 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.58;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 25px;
  border: 1px solid var(--coral);
  border-radius: 10px;
  color: #fff;
  background: var(--coral-action);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.profile-link:hover {
  border-color: var(--coral-deep);
  color: #fff;
  background: var(--coral-deep);
  transform: translateY(-2px);
}

.profile-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.profile-link:active {
  transform: translateY(1px);
}

.hero__quote {
  position: absolute;
  bottom: clamp(42px, 7vh, 76px);
  left: clamp(48px, 7vw, 120px);
  z-index: 3;
  display: block;
  width: min(18vw, 240px);
  margin: 0;
  color: rgb(201 91 80 / 84%);
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", cursive;
  font-size: clamp(1.35rem, 1.7vw, 1.8rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.015em;
  text-wrap: balance;
  transform: rotate(-2deg);
}

@media (max-width: 760px) {
  .hero {
    display: block;
    padding:
      calc(clamp(48px, 7dvh, 68px) + env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      env(safe-area-inset-bottom)
      max(24px, env(safe-area-inset-left));
  }

  .hero__scale {
    top: 62%;
    left: 50%;
    width: min(calc(100vw - 28px), 52dvh, 440px);
  }

  .hero__countdown {
    top: 50%;
    left: 50%;
    font-family: "Helvetica Neue", "Avenir Next", Avenir, Arial, sans-serif;
    font-size: clamp(2.45rem, 11vw, 4.25rem);
    font-weight: 100;
    letter-spacing: 0.1em;
  }

  .hero__content {
    width: 100%;
    margin: 0;
    transform: none;
  }

  .hero__content::before {
    inset: -28px -20px -42px;
    background: radial-gradient(
      ellipse at 40% 45%,
      rgb(242 238 229 / 92%) 0%,
      rgb(242 238 229 / 82%) 44%,
      rgb(242 238 229 / 48%) 65%,
      transparent 84%
    );
  }

  h1 {
    max-width: 570px;
    font-size: clamp(2.55rem, 12vw, 4rem);
    line-height: 1.02;
  }

  .hero__content p {
    max-width: 460px;
    margin: 24px 0 20px;
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .profile-link {
    min-height: 48px;
    padding-inline: 20px;
    font-size: 0.88rem;
  }

  .hero__quote {
    position: absolute;
    bottom: clamp(30px, 6vh, 56px);
    left: 24px;
    z-index: 3;
    display: block;
    width: min(72vw, 290px);
    color: rgb(201 91 80 / 88%);
    font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", cursive;
    font-size: clamp(1.25rem, 6vw, 1.7rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0.015em;
    text-wrap: balance;
    transform: rotate(-2deg);
  }

  .hero__shape--one {
    top: -8%;
    right: -46%;
    width: 115vw;
  }

  .hero__shape--two {
    top: 20%;
    right: 25%;
    width: 88vw;
  }

  .hero__shape--three {
    right: -65%;
    bottom: -8%;
    width: 145vw;
  }

  .hero__shape--four {
    right: -48%;
    bottom: -20%;
    width: 160vw;
  }

  .hero__shape--five {
    right: 12%;
    bottom: -36%;
    width: 100vw;
  }
}

@media (max-width: 760px) and (max-height: 720px) {
  .hero {
    padding-top: calc(34px + env(safe-area-inset-top));
  }

  h1 {
    max-width: 500px;
    font-size: clamp(2.15rem, 10.5vw, 3.2rem);
  }

  .hero__content p {
    max-width: 390px;
    margin-block: 18px 16px;
    font-size: 0.84rem;
  }

  .hero__scale {
    top: 60%;
    width: min(calc(100vw - 40px), 48dvh, 350px);
  }

  .hero__countdown {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
  }

  .hero__quote {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .hero {
    display: grid;
    place-items: center start;
    padding:
      max(20px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(24px, env(safe-area-inset-left));
  }

  .hero__content {
    width: min(54vw, 390px);
  }

  h1 {
    max-width: 390px;
    font-size: clamp(2.1rem, 6.5vw, 3.3rem);
    line-height: 1;
  }

  .hero__content p {
    max-width: 330px;
    margin-block: 16px 14px;
    font-size: clamp(0.73rem, 1.8vw, 0.85rem);
    line-height: 1.4;
  }

  .profile-link {
    min-height: 44px;
    padding-inline: 18px;
    font-size: 0.82rem;
  }

  .hero__scale {
    top: 50%;
    left: 80%;
    width: min(88dvh, 48vw, 350px);
  }

  .hero__countdown {
    font-size: clamp(2rem, 5.2vw, 3rem);
  }

  .hero__quote {
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(24px, env(safe-area-inset-left));
    width: min(36vw, 230px);
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    line-height: 1.25;
  }
}

@media (max-width: 350px) and (orientation: portrait) {
  .hero {
    padding-right: 20px;
    padding-left: 20px;
  }

  h1 {
    font-size: clamp(2.1rem, 10.5vw, 2.5rem);
  }

  .hero__content p {
    font-size: 0.82rem;
  }

  .hero__quote {
    left: 20px;
    width: min(76vw, 250px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__shape {
    animation: none;
    transform: rotate(var(--shape-rotate));
    will-change: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
