html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #fff8ef;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.herocrayon {
  position: relative;
  width: clamp(230px, 76vw, 320px);
  animation: cardBob 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.herocrayon__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.herocrayon__frame-rect {
  fill: none;
  stroke: #33261c;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 16 11;
  filter: url(#rough1);
  animation: frameMarch 2s linear infinite;
}

.herocrayon__card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 20px;
}

.herocrayon__eyebrow {
  margin: 0;
  color: #c93000;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1;
  letter-spacing: 0.08em;
}

.herocrayon__title {
  margin: 0;
  color: #33261c;
  font-weight: 700;
  font-size: clamp(19px, 4.8vw, 25px);
  line-height: 1.2;
}

.herocrayon__underline {
  width: clamp(120px, 42vw, 170px);
  height: 16px;
  overflow: visible;
}

.herocrayon__underline-path {
  fill: none;
  stroke: #ffd23f;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 210;
  animation: underlineDraw 2s ease-out infinite;
}

.herocrayon__desc {
  margin: 0;
  color: rgba(51, 38, 28, 0.72);
  font-weight: 500;
  font-size: clamp(12px, 2.8vw, 14px);
  line-height: 1.4;
}

.herocrayon__cta {
  margin-top: 4px;
  border: 3px solid #33261c;
  border-radius: 999px;
  background: #ffd23f;
  color: #33261c;
  padding: 8px 24px;
  font-weight: 700;
  font-size: clamp(12px, 2.8vw, 14px);
  line-height: 1;
}

.herocrayon__cta:focus-visible {
  outline: 3px solid #33261c;
  outline-offset: 2px;
}

@keyframes frameMarch {
  to {
    stroke-dashoffset: -540;
  }
}
@keyframes underlineDraw {
  0% {
    stroke-dashoffset: 210;
  }
  45% {
    stroke-dashoffset: 0;
  }
  80% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -210;
  }
}
@keyframes cardBob {
  0%, 100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(-6px) rotate(0.5deg);
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .herocrayon__card {
    padding: 16px 16px;
    gap: 4px;
  }
  .herocrayon__eyebrow {
    display: none;
  }
  .herocrayon__underline {
    width: clamp(90px, 32vw, 120px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .herocrayon,
  .herocrayon__frame-rect,
  .herocrayon__underline-path {
    animation: none !important;
    transform: none;
  }
  .herocrayon__underline-path {
    stroke-dashoffset: 0;
  }
}
