:root {
  --bg: #f7f5f1;
  --fg: #1a1a1a;
  --muted: #6e6a64;
  --line: rgba(26, 26, 26, 0.12);
  --accent-green: #1f7a3a;
  --accent-red: #d61f2c;
  --inset: clamp(14px, 2.8vw, 36px);
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  cursor: none;
  user-select: none;
}

.visual {
  position: fixed;
  inset: -6%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.visual__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.06);
  filter: saturate(0.9) contrast(1.02) brightness(1.08);
  animation: drift 28s ease-in-out infinite alternate;
  will-change: transform;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 52% at 18% 78%, rgba(247, 245, 241, 0.62) 0%, rgba(247, 245, 241, 0.28) 48%, transparent 72%),
    linear-gradient(90deg, rgba(247, 245, 241, 0.55) 0%, rgba(247, 245, 241, 0.22) 36%, transparent 58%),
    linear-gradient(180deg, rgba(247, 245, 241, 0.28) 0%, transparent 22%, transparent 58%, rgba(247, 245, 241, 0.55) 100%);
}

.grain {
  position: fixed;
  inset: -30%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  animation: grain-shift 1.4s steps(5) infinite;
}

.frame {
  position: fixed;
  inset: var(--inset);
  z-index: 3;
  pointer-events: none;
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 100dvh;
  padding:
    calc(var(--inset) + 20px)
    calc(var(--inset) + 20px)
    clamp(2.8rem, 8vh, 5.5rem)
    clamp(2.4rem, 8vw, 7.5rem);
  text-align: left;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(72vw, 580px);
  height: min(48vh, 380px);
  background: radial-gradient(ellipse at left bottom, rgba(247, 245, 241, 0.82) 0%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.mark {
  line-height: 0;
}

.mark__inner {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.mark__logo {
  display: block;
  width: clamp(120px, 18vw, 200px);
  height: auto;
}

.rule {
  width: 0;
  height: 1px;
  margin: clamp(1.4rem, 2.8vh, 2.4rem) 0;
  background: var(--fg);
  opacity: 0.28;
  animation: draw 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards;
}

.line {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  font-size: clamp(0.64rem, 1.15vw, 0.84rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  line-height: 1.15;
  color: var(--muted);
}

.line span {
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
}

.line span:first-child {
  animation: fade-up 1.15s cubic-bezier(0.16, 1, 0.3, 1) 1.05s forwards;
}

.line span:last-child {
  animation: fade-up 1.15s cubic-bezier(0.16, 1, 0.3, 1) 1.25s forwards;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 8;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(26, 26, 26, 0.55);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  will-change: transform;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw {
  to {
    width: 44px;
  }
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: scale(1.06) translate3d(-1%, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(1%, -1.2%, 0);
  }
}

@keyframes grain-shift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1.6%, 1.2%);
  }
  50% {
    transform: translate(1.2%, -1.8%);
  }
  75% {
    transform: translate(-0.8%, 1.6%);
  }
}

@media (max-width: 900px) {
  .line {
    letter-spacing: 0.26em;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .hero {
    padding-left: calc(var(--inset) + 28px);
    padding-bottom: clamp(2.4rem, 10vh, 4rem);
  }

  .visual__image {
    object-position: 55% center;
  }

  .mark__logo {
    width: clamp(110px, 28vw, 168px);
  }

  .line {
    letter-spacing: 0.2em;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-left: calc(var(--inset) + 18px);
    padding-bottom: calc(var(--inset) + 2rem);
  }

  .mark__logo {
    width: clamp(100px, 36vw, 140px);
  }

  .line {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  .rule {
    animation-name: draw-mobile;
  }
}

@keyframes draw-mobile {
  to {
    width: 32px;
  }
}

@media (hover: none) {
  body {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain,
  .visual__image,
  .mark__inner,
  .rule,
  .line span {
    animation: none;
  }

  .visual__image {
    transform: scale(1.06);
  }

  .mark__inner,
  .line span {
    opacity: 1;
    transform: none;
  }

  .rule {
    width: 44px;
  }
}
