﻿.first-view {
  --hero-top-offset: 90px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  min-height: max(100svh, clamp(800px, 69.24vw, 1160px));
  padding-top: var(--hero-top-offset);
  overflow: clip;
  text-align: center;
}
.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: absolute;
  inset: var(--hero-top-offset) 0 0;
}
.hero-visual canvas { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.hero-copy {
  position: relative;
  align-self: start;
  padding-top: clamp(140px, 15.35vw, 260px);
  pointer-events: none;
}
.hero-lead {
  font-size: clamp(20px, 2.222vw, 36px);
  font-weight: 700;
  line-height: 2;
}
.hero-copy h1 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 clamp(8px, 1.3vw, 20px);
  font-size: clamp(26px, 3.5vw, 60px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .13em;
}
.hero-copy h1 > span { white-space: nowrap; }
.hero-copy em { color: var(--color-accent); font-size: 1.29em; font-style: normal; }
.hero-times { font-size: .66em; }
.hero-english {
  position: relative;
  align-self: end;
  margin-bottom: clamp(96px, 8.3vw, 132px);
  color: rgb(255 255 255 / 90%);
  font: 400 clamp(38px, 12.36vw, 230px)/.919 var(--font-display);
  letter-spacing: 0;
  text-shadow: 0 0 21px rgb(0 0 0 / 28%);
  pointer-events: none;
  white-space: nowrap;
}
.hero-english span { font-size: .567em; }

@media (max-width: 767px) {
  .first-view {
    --hero-top-offset: 72px;
    grid-template-rows: auto auto;
    min-height: 0;
  }
  .hero-copy { grid-row: 1; padding-block: 64px; }
  .hero-lead { font-size: clamp(16px, 4.4vw, 24px); }
  .hero-copy h1 { font-size: clamp(18px, 5.35vw, 36px); letter-spacing: .06em; }
  .hero-english { grid-row: 2; margin-block: -16px 20px; font-size: 11.5vw; }
}


.hero-lead > span { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .hero-visual::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(
      to bottom,
      rgb(231 41 51 / 25%) 0%,
      var(--color-accent) 18%,
      var(--color-accent) 82%,
      rgb(231 41 51 / 20%) 100%
    );
    box-shadow: 0 0 14px rgb(231 41 51 / 55%);
    transform-origin: top center;
    pointer-events: none;
    animation: hero-axis-enter 880ms var(--ease-out) both;
  }
  .hero-ripples {
    animation: hero-reveal-left 740ms var(--ease-out) 180ms both;
  }
  .hero-lines {
    animation: hero-reveal-right 740ms var(--ease-out) 180ms both;
  }
  .hero-copy {
    --hero-copy-duration: 820ms;
    --hero-copy-lead-distance: 28px;
    --hero-copy-side-distance: 72px;
    --hero-copy-lead-delay: 380ms;
    --hero-copy-second-delay: 500ms;
    --hero-copy-main-delay: 600ms;
    --hero-copy-times-delay: 720ms;
  }
  .hero-lead > span {
    animation: hero-lead-enter var(--hero-copy-duration) var(--ease-out)
      var(--hero-copy-delay, var(--hero-copy-lead-delay)) both;
  }
  .hero-copy h1 > span {
    animation: hero-copy-enter var(--hero-copy-duration) var(--ease-out)
      var(--hero-copy-delay, 0ms) both;
  }
  .hero-lead > span:last-child { --hero-copy-delay: var(--hero-copy-second-delay); }
  .hero-copy h1 > span { --hero-copy-delay: var(--hero-copy-main-delay); }
  .hero-copy h1 > span:first-child {
    --hero-copy-start-x: calc(-1 * var(--hero-copy-side-distance));
  }
  .hero-copy h1 > span:last-child { --hero-copy-start-x: var(--hero-copy-side-distance); }
  .hero-copy h1 > .hero-times { --hero-copy-delay: var(--hero-copy-times-delay); }
  .hero-english {
    --hero-english-distance: 48px;
    animation: hero-english-enter 900ms var(--ease-out) 740ms both;
  }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .hero-copy {
    --hero-copy-lead-distance: 16px;
    --hero-copy-side-distance: 30px;
  }
  .hero-english {
    --hero-english-distance: 24px;
  }
}

@keyframes hero-axis-enter {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  8% {
    opacity: 1;
  }
  35%,
  42% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(1);
  }
}

@keyframes hero-reveal-left {
  from {
    clip-path: inset(0 0 0 100%);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes hero-reveal-right {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes hero-lead-enter {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(var(--hero-copy-lead-distance));
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}

@keyframes hero-copy-enter {
  from {
    opacity: 0;
    transform: translate(var(--hero-copy-start-x, 0px), var(--hero-copy-start-y, 0px));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-english-enter {
  from {
    opacity: 0;
    transform: translateY(var(--hero-english-distance));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.site-header:not([data-enhanced]) + main .first-view { padding-top: 0; }
