@layer components {
  /* Original composition: a fixed circular outline and a travelling fine rule. */
  .hero-flow {
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(15rem, 4fr) minmax(0, 9fr);
    align-items: center;
    gap: clamp(36px, 4.5vw, 72px);
    min-height: calc(100svh - var(--site-header-size));
    padding-block: clamp(36px, 5svh, 72px);
    padding-inline: max(var(--page-gutter), calc((100% - var(--content-max)) / 2));
  }

  .hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: clip;
    pointer-events: none;
  }

  .hero-decoration-circle {
    position: absolute;
    top: 14%;
    left: calc(var(--page-gutter) - 160px);
    width: clamp(280px, 29vw, 440px);
    aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--red) 14%, transparent);
    border-radius: 50%;
    animation: hero-outline-travel 22s ease-in-out infinite alternate;
  }

  .hero-decoration-line {
    position: absolute;
    bottom: 12%;
    left: 12%;
    width: clamp(120px, 21vw, 300px);
    height: 1px;
    background: color-mix(in srgb, var(--red) 18%, transparent);
    animation: hero-rule-travel 18s ease-in-out infinite alternate;
  }

  .hero-decoration-line::after {
    content: "";
    position: absolute;
    top: -3px;
    right: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--red) 40%, transparent);
  }

  .hero-flow .hero-copy {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 28px;
    min-width: 0;
    color: var(--ink);
  }

  .hero-flow h1 {
    writing-mode: vertical-rl;
    text-orientation: upright;
    inline-size: 9em;
    margin: 0;
    font-family: var(--font);
    font-size: clamp(32px, 3vw, 44px);
    font-weight: 700;
    font-style: normal;
    line-height: 1.6;
    letter-spacing: .035em;
    white-space: nowrap;
  }

  .hero-flow h1 > span { display: block; }
  .hero-flow h1 em { color: var(--red); font-weight: inherit; font-style: normal; }

  .hero-flow .hero-caption {
    max-width: 22em;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.9;
  }

  .hero-flow .hero-media {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: var(--sand) url('../images/sukiyaki-poster.jpg') center / cover no-repeat;
  }

  .hero-flow .hero-media video {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: inherit;
    object-fit: cover;
    object-position: center;
  }

  @keyframes hero-outline-travel {
    from { transform: translate(-18px, 14px); }
    to { transform: translate(20px, -12px); }
  }

  @keyframes hero-rule-travel {
    from { transform: translateX(-24px); }
    to { transform: translateX(24px); }
  }

  @media (max-width: 1023px) {
    .hero-flow {
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
      min-height: 0;
      gap: 36px;
      padding-block: 36px 56px;
    }

    .hero-flow .hero-copy { justify-items: start; gap: 24px; }

    .hero-flow h1 {
      writing-mode: horizontal-tb;
      inline-size: auto;
      font-size: clamp(30px, 6vw, 44px);
      line-height: 1.55;
      letter-spacing: .015em;
      white-space: normal;
    }

    .hero-decoration-circle { top: -48px; left: auto; right: -100px; width: 340px; }
    .hero-decoration-line { bottom: 28px; left: var(--page-gutter); width: 160px; }
  }

  @media (max-width: 599px) {
    .hero-flow { gap: 30px; padding-block: 28px 48px; }
    .hero-flow .hero-copy { gap: 22px; }
    .hero-flow h1 { font-size: clamp(29px, 8vw, 38px); }
    .hero-flow .hero-media { border-radius: 12px; }
    .hero-decoration-circle { top: -56px; right: -152px; width: 300px; }
    .hero-decoration-line { width: 112px; bottom: 23px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-decoration-circle, .hero-decoration-line { animation: none; }
  }
}
