:root {
  --ink: #1a1311;
  --gray: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --accent: #2563eb;
  --sky: #d8ecff;
  --sky-deep: #b8daf5;
  --cloud: #ffffff;
  --maxw: 920px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 15px;
}

img { max-width: 100%; display: block; height: auto; }

.demo-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.demo-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
}

.demo-header h1 {
  font-size: 18px;
  font-weight: 800;
}

.demo-header a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.demo-intro {
  margin-bottom: 20px;
}

.demo-intro h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  margin-bottom: 10px;
}

.demo-intro p {
  color: var(--gray);
  font-size: 14px;
}

/* ===== Hero illust ===== */
.hero-illust {
  position: relative;
  width: 100%;
  height: min(100vh, 860px);
  min-height: 520px;
  overflow: hidden;
  background-color: #d8ecff;
  background-image: url("../bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-illust__clouds {
  display: none;
}

.hero-illust__items {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: items-in 1s ease-in-out 0.5s forwards;
}

.hero-illust__item {
  position: absolute;
  animation-name: item-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  will-change: transform;
}

.hero-illust__item img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(26, 19, 17, .08));
}

.hero-illust__item--1 {
  top: 6%;
  left: 8%;
  width: min(9vw, 72px);
  --rot: -8deg;
  transform: rotate(var(--rot));
  animation-duration: 1.4s;
  animation-delay: 0.1s;
}

.hero-illust__item--2 {
  top: 2%;
  right: 4%;
  width: min(24vw, 220px);
  --rot: 18deg;
  transform: rotate(var(--rot));
  animation-duration: 1.8s;
  animation-delay: 0.25s;
}

.hero-illust__item--3 {
  top: 14%;
  left: 22%;
  width: min(11vw, 88px);
  --rot: -4deg;
  transform: rotate(var(--rot));
  animation-duration: 1.6s;
  animation-delay: 0.15s;
}

.hero-illust__item--4 {
  top: 28%;
  right: 18%;
  width: min(10vw, 80px);
  --rot: 6deg;
  transform: rotate(var(--rot));
  animation-duration: 1.5s;
  animation-delay: 0.35s;
}

.hero-illust__item--5 {
  bottom: 8%;
  left: 6%;
  width: min(20vw, 180px);
  --rot: -12deg;
  transform: rotate(var(--rot));
  animation-duration: 2s;
  animation-delay: 0.2s;
}

.hero-illust__item--6 {
  bottom: 18%;
  right: 10%;
  width: min(8vw, 64px);
  --rot: 0deg;
  transform: rotate(var(--rot));
  animation-duration: 1.3s;
  animation-delay: 0.4s;
}

.hero-illust__copy {
  position: absolute;
  top: calc(50% + 24px);
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  opacity: 0;
  animation: copy-in 0.8s ease-in-out 2s forwards;
}

.hero-illust__catch {
  font-size: clamp(28px, 5.6vw, 52px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .12em;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .6);
}

.hero-illust__sub {
  margin-top: 16px;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 700;
  letter-spacing: .18em;
  color: rgba(26, 19, 17, .72);
}

.hero-illust__scroll {
  position: absolute;
  left: clamp(16px, 4vw, 48px);
  bottom: clamp(20px, 5%, 40px);
  z-index: 2;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  writing-mode: vertical-rl;
  opacity: 0;
  animation: scroll-in 0.8s ease-in-out 2.4s forwards;
}

.hero-illust__scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 48px;
  margin-top: 10px;
  margin-inline: auto;
  background: rgba(26, 19, 17, .45);
}

@keyframes items-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes copy-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes scroll-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes item-float {
  from { transform: translateY(0) rotate(var(--rot, 0deg)); }
  to { transform: translateY(-14px) rotate(calc(var(--rot, 0deg) + 4deg)); }
}

.demo-note {
  margin-top: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 680px) {
  .hero-illust {
    min-height: 480px;
    height: 88vh;
  }

  .hero-illust__item--2 {
    width: min(36vw, 140px);
    top: 4%;
    right: -2%;
  }

  .hero-illust__item--5 {
    width: min(34vw, 130px);
    bottom: 10%;
  }

  .hero-illust__item--3 {
    left: 4%;
    top: 20%;
  }

  .hero-illust__catch {
    letter-spacing: .08em;
  }

  .hero-illust__sub {
    letter-spacing: .1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-illust__items,
  .hero-illust__copy,
  .hero-illust__scroll {
    animation: none;
    opacity: 1;
  }

  .hero-illust__copy {
    transform: translate(-50%, -50%);
  }

  .hero-illust__item {
    animation: none;
  }
}
